X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=examples%2Fto-xml.c;h=537ae915fbcfa5cd31bf417ad59b8d93d8b35e4e;hp=2cf3de8938e5db7b26dbac92213a1c0067496218;hb=f323479760ab23755d6b4f27c236befb5a4d6111;hpb=2f1a50d81671810256dce0852e6b1e0810ac44af diff --git a/examples/to-xml.c b/examples/to-xml.c index 2cf3de8..537ae91 100644 --- a/examples/to-xml.c +++ b/examples/to-xml.c @@ -25,7 +25,7 @@ * to stderr already. */ #define CALL(call,errcode) \ - if ((call) == (errcode)) exit (1); + if ((call) == (errcode)) exit (EXIT_FAILURE); static void display_partition (guestfs_h *g, const char *dev); static void display_partitions (guestfs_h *g, const char *dev); @@ -39,19 +39,18 @@ main (int argc, char *argv[]) if (argc < 2 || access (argv[1], F_OK) != 0) { fprintf (stderr, "Usage: to-xml guest.img [guest.img ...]\n"); - exit (1); + exit (EXIT_FAILURE); } if (!(g = guestfs_create ())) { fprintf (stderr, "Cannot create libguestfs handle.\n"); - exit (1); + exit (EXIT_FAILURE); } for (i = 1; i < argc; ++i) CALL (guestfs_add_drive (g, argv[i]), -1); CALL (guestfs_launch (g), -1); - CALL (guestfs_wait_ready (g), -1); printf ("\n");