[Pkg-libvirt-commits] [libguestfs] 07/11: daemon: Run 'udevadm settle' with debugging and warn if the command fails.
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:44:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.27.41-1
in repository libguestfs.
commit a2107981a621168603dd91ad9f9f2c9948be0f3e
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Tue Sep 9 14:20:43 2014 +0100
daemon: Run 'udevadm settle' with debugging and warn if the command fails.
---
daemon/guestfsd.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 34a47ab..3616f3a 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -1478,7 +1478,17 @@ random_name (char *template)
void
udev_settle (void)
{
- (void) command (NULL, NULL, str_udevadm, "settle", NULL);
+ char cmd[80];
+ int r;
+
+ snprintf (cmd, sizeof cmd, "udevadm%s settle", verbose ? " --debug" : "");
+ if (verbose)
+ printf ("%s\n", cmd);
+ r = system (cmd);
+ if (r == -1)
+ perror ("system");
+ else if (!WIFEXITED (r) || WEXITSTATUS (r) != 0)
+ fprintf (stderr, "warning: udevadm command failed\n");
}
/* Use by the CLEANUP_* macros. Do not call these directly. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list