X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fdir.c;h=383acd201739b17a3f1f6bea6fe7025b4e45e2ff;hp=3a4647cd142990a3e6cb14743cc2c55105004a82;hb=4d900cdac8258daa2e99c6ceb2a4985154e94150;hpb=61ab83d19009a8006dd73ebe16d22494b78be4d1 diff --git a/daemon/dir.c b/daemon/dir.c index 3a4647c..383acd2 100644 --- a/daemon/dir.c +++ b/daemon/dir.c @@ -25,7 +25,7 @@ #include #include -#include "../src/guestfs_protocol.h" +#include "guestfs_protocol.h" #include "daemon.h" #include "actions.h" @@ -190,28 +190,6 @@ do_mkdir_p (const char *path) return 0; } -int -do_is_dir (const char *path) -{ - int r; - struct stat buf; - - CHROOT_IN; - r = lstat (path, &buf); - CHROOT_OUT; - - if (r == -1) { - if (errno != ENOENT && errno != ENOTDIR) { - reply_with_perror ("stat: %s", path); - return -1; - } - else - return 0; /* Not a directory. */ - } - - return S_ISDIR (buf.st_mode); -} - char * do_mkdtemp (const char *template) {