X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fmknod.c;h=50865a62664ffe41a0d8ab672785b5420fd1da14;hb=e17c5a24b8dbbef76e183856c4c770b4754c4539;hp=6ff88efab1f2dd7fe8875a42ffec56113f28dd5b;hpb=edb9b3abc03c0a0f84b1cbd9cf5920e3c84e5c18;p=libguestfs.git diff --git a/daemon/mknod.c b/daemon/mknod.c index 6ff88ef..50865a6 100644 --- a/daemon/mknod.c +++ b/daemon/mknod.c @@ -29,6 +29,21 @@ #include "../src/guestfs_protocol.h" #include "daemon.h" #include "actions.h" +#include "optgroups.h" + +#ifdef HAVE_MKNOD +int +optgroup_mknod_available (void) +{ + return 1; +} +#else +int +optgroup_mknod_available (void) +{ + return 0; +} +#endif int do_mknod (int mode, int devmajor, int devminor, const char *path) @@ -41,14 +56,13 @@ do_mknod (int mode, int devmajor, int devminor, const char *path) CHROOT_OUT; if (r == -1) { - reply_with_perror ("mknod: %s", path); + reply_with_perror ("%s", path); return -1; } return 0; #else - reply_with_error ("%s is not available", __func__); - return -1; + NOT_AVAILABLE (-1); #endif }