X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fmodprobe.c;h=106304312a3108944638c53ee0a2d06a6684b0a0;hb=43942b08cfbcf91bef29ec532f3d097a8519c982;hp=ac62b349e162669583882fb596cc34e784a31c74;hpb=2d9953097b6d3b71122d444a4550047e97aee009;p=libguestfs.git diff --git a/daemon/modprobe.c b/daemon/modprobe.c index ac62b34..1063043 100644 --- a/daemon/modprobe.c +++ b/daemon/modprobe.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -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);