Richard W.M. Jones
2017-Apr-12 21:12 UTC
Re: [Libguestfs] [PATCH 2/2] daemon: add udev_settle_file to is_root_device
On Wed, Apr 12, 2017 at 05:01:11PM +0300, Pavel Butsykin wrote:> It fixes a fail with ENOENT when device is not yet present after system boot. > > Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com> > --- > daemon/guestfsd.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c > index dccfa15bc..9aa69301f 100644 > --- a/daemon/guestfsd.c > +++ b/daemon/guestfsd.c > @@ -402,6 +402,9 @@ int > is_root_device (const char *device) > { > struct stat statbuf; > + > + udev_settle_file(device);Add a space after the function name, but with that change ACK.> if (stat (device, &statbuf) == -1) { > perror (device); > return 0;Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Maybe Matching Threads
- Re: [PATCH v2 2/2] daemon: add udev_settle_file to is_root_device
- Re: [PATCH 1/2] daemon: run 'udevadm settle' with --exit-if-exists option
- Re: [PATCH v2 1/2] daemon: run 'udevadm settle' with --exit-if-exists option
- [PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
- [PATCH 05/27] daemon: Reimplement several devsparts APIs in OCaml.