search for: which_prog

Displaying 2 results from an estimated 2 matches for "which_prog".

2009 Nov 18
1
[PATCH] daemon/RHEL: Choose correct udev settle script.
....c b/daemon/guestfsd.c index db0bff9..9375ede 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -976,5 +976,25 @@ device_name_translation (char *device, const char *func) void udev_settle (void) { - command (NULL, NULL, "/sbin/udevadm", "settle", NULL); + static int which_prog = 0; + + if (which_prog == 0) { + if (access ("/sbin/udevsettle", X_OK) == 0) + which_prog = 2; + else if (access ("/sbin/udevadm", X_OK) == 0) + which_prog = 1; + else + which_prog = 3; + } + + switch (which_prog) { + case 1: + command (NULL, NULL...
2009 Dec 18
1
[PATCH] daemon: Work around udevsettle issue (RHBZ#548121).
...'. The old 'udevsettle' + * command was left as a symlink. Then in Fedora 13 the old symlink + * remained but it stopped working (RHBZ#548121), so we have to be + * careful not to assume that we can use 'udevsettle' if it exists. */ void udev_settle (void) { - static int which_prog = 0; - - if (which_prog == 0) { - if (access ("/sbin/udevsettle", X_OK) == 0) - which_prog = 2; - else if (access ("/sbin/udevadm", X_OK) == 0) - which_prog = 1; - else - which_prog = 3; - } - - switch (which_prog) { - case 1: - command (NULL, NULL...