projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix egrep
[oweals/busybox.git]
/
util-linux
/
freeramdisk.c
diff --git
a/util-linux/freeramdisk.c
b/util-linux/freeramdisk.c
index 2da2427c1abbd221ceac8d1f8e6e37452a5d2555..cf25fae6abb61f6d0cf27ff0a0aa29ab039c1ab3 100644
(file)
--- a/
util-linux/freeramdisk.c
+++ b/
util-linux/freeramdisk.c
@@
-24,11
+24,11
@@
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
-#include "internal.h"
+#include <stdlib.h>
+#include "busybox.h"
/* From linux/fs.h */
/* From linux/fs.h */
@@
-40,19
+40,19
@@
freeramdisk_main(int argc, char **argv)
int f;
if (argc != 2 || *argv[1] == '-') {
int f;
if (argc != 2 || *argv[1] == '-') {
-
usage(freeramdisk_usage
);
+
show_usage(
);
}
if ((f = open(argv[1], O_RDWR)) == -1) {
}
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) {
}
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); */
}
/* Don't bother closing. Exit does
* that, so we can save a few bytes */
/* close(f); */
- return
(TRUE)
;
+ return
EXIT_SUCCESS
;
}
/*
}
/*