diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-02 20:55:41 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-02 20:55:41 +0100 |
commit | 56465eb694ba2077de37e66600c7bef96061cbe4 (patch) | |
tree | 2799fe8d1186645c659d1c138485ed796bc2604c /examples | |
parent | 163e399a001a300a53a4c99887742608d23e09ad (diff) | |
download | libguestfs-56465eb694ba2077de37e66600c7bef96061cbe4.tar.gz libguestfs-56465eb694ba2077de37e66600c7bef96061cbe4.tar.xz libguestfs-56465eb694ba2077de37e66600c7bef96061cbe4.zip |
Correctly handle the case when select runs out of filehandles.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/df.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/df.c b/examples/df.c index 91c07d7d..eed31a34 100644 --- a/examples/df.c +++ b/examples/df.c @@ -15,14 +15,13 @@ main (int argc, char *argv[]) exit (1); } - g = guestfs_create (); - if (!g) exit (1); + if (!(g = guestfs_create ())) exit (1); guestfs_set_verbose (g, 1); - guestfs_add_drive (g, argv[1]); + if (guestfs_add_drive (g, argv[1]) == -1) exit (1); - guestfs_launch (g); - guestfs_wait_ready (g); + if (guestfs_launch (g) == -1) exit (1); + if (guestfs_wait_ready (g) == -1) exit (1); |