X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fntfs.c;h=b35300848a11334f3b7fbf59b7eea8ee2b33244f;hb=4d53df4d7399d35b51bd69d76e00539d1de825e0;hp=87881b1ff048a1195208cd8db22be2fcd8e666db;hpb=887290e949d54c6ac4c9b787231e588f84f2367c;p=libguestfs.git diff --git a/daemon/ntfs.c b/daemon/ntfs.c index 87881b1..b353008 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -1,5 +1,5 @@ /* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,16 +25,22 @@ #include "daemon.h" #include "actions.h" +#include "optgroups.h" int -do_ntfs_3g_probe (int rw, char *device) +optgroup_ntfs3g_available (void) +{ + int r = access ("/bin/ntfs-3g.probe", X_OK); + return r == 0; +} + +int +do_ntfs_3g_probe (int rw, const char *device) { char *err; int r; const char *rw_flag; - IS_DEVICE (device, -1); - rw_flag = rw ? "-w" : "-r"; r = commandr (NULL, &err, "ntfs-3g.probe", rw_flag, device, NULL);