X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fmodprobe.c;h=0d7318c3742e6a8c077e522258083a976d6b1724;hp=ac62b349e162669583882fb596cc34e784a31c74;hb=428a45c3e15f03e9861e1b551e1ae8da821dba5f;hpb=2d9953097b6d3b71122d444a4550047e97aee009 diff --git a/daemon/modprobe.c b/daemon/modprobe.c index ac62b34..0d7318c 100644 --- a/daemon/modprobe.c +++ b/daemon/modprobe.c @@ -28,15 +28,14 @@ int optgroup_linuxmodules_available (void) { - int r = access ("/sbin/modprobe", X_OK); - return r == 0; + return prog_exists ("modprobe"); } int do_modprobe (const char *module) { char *err; - int r = command (NULL, &err, "/sbin/modprobe", module, NULL); + int r = command (NULL, &err, "modprobe", module, NULL); if (r == -1) { reply_with_error ("%s", err);