Fix the pwd and group functions. The bb_ stuff was a leftover from
[oweals/busybox.git] / freeramdisk.c
index 64915b313251dcdba33e6ccc094a1287d6bdbe28..8f90f40b539ae83c3e358c38875bc92f5705f579 100644 (file)
@@ -27,7 +27,8 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <errno.h>
-#include "internal.h"
+#include <stdlib.h>
+#include "busybox.h"
 
 
 /* From linux/fs.h */
@@ -43,15 +44,15 @@ freeramdisk_main(int argc, char **argv)
        }
 
        if ((f = open(argv[1], O_RDWR)) == -1) {
-               fatalError( "cannot open %s: %s\n", argv[1], strerror(errno));
+               perror_msg_and_die("cannot open %s", argv[1]);
        }
        if (ioctl(f, BLKFLSBUF) < 0) {
-               fatalError( "failed ioctl on %s: %s\n", argv[1], strerror(errno));
+               perror_msg_and_die("failed ioctl on %s", argv[1]);
        }
        /* Don't bother closing.  Exit does
         * that, so we can save a few bytes */
        /* close(f); */
-       return(TRUE);
+       return EXIT_SUCCESS;
 }
 
 /*