X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=test-tool%2Fhelper.c;h=731b053ecf67df4756c03875e599937b4b1f028b;hp=3395f219668e3d421f5518471a91a72108935fb8;hb=fab75c0337d7897d10ea5e95e47ac05eab81ace9;hpb=f9de01b9b97e3d13959754446464f9b768deea81;ds=sidebyside diff --git a/test-tool/helper.c b/test-tool/helper.c index 3395f21..731b053 100644 --- a/test-tool/helper.c +++ b/test-tool/helper.c @@ -42,32 +42,32 @@ main (void) if (mkdir ("/tmp", 0700) == -1) { perror ("mkdir"); fprintf (stderr, "This program should not be run directly. Use libguestfs-test-tool instead.\n"); - exit (1); + exit (EXIT_FAILURE); } if (geteuid () != 0) { fprintf (stderr, "helper: This program doesn't appear to be running as root.\n"); - exit (1); + exit (EXIT_FAILURE); } if (mkdir ("/tmp/helper", 0700) == -1) { perror ("/tmp/helper"); - exit (1); + exit (EXIT_FAILURE); } fd = open ("/tmp/helper/a", O_CREAT|O_EXCL|O_WRONLY, 0600); if (fd == -1) { perror ("create /tmp/helper/a"); - exit (1); + exit (EXIT_FAILURE); } if (write (fd, buffer, sizeof buffer) != sizeof buffer) { perror ("write"); - exit (1); + exit (EXIT_FAILURE); } if (close (fd) == -1) { perror ("close"); - exit (1); + exit (EXIT_FAILURE); } - exit (0); + exit (EXIT_SUCCESS); }