diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-18 23:02:45 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-18 23:02:45 +0000 |
commit | 2523da259ce69cc3da5d7c02d2f8301f4de5408b (patch) | |
tree | 4c0c1f4bc2a56dfbdcd5f917e6d82b74843d9c93 /util-linux/freeramdisk.c | |
parent | 66753a38509423fd81d85c61fd0401370353386d (diff) | |
download | busybox-w32-2523da259ce69cc3da5d7c02d2f8301f4de5408b.tar.gz busybox-w32-2523da259ce69cc3da5d7c02d2f8301f4de5408b.tar.bz2 busybox-w32-2523da259ce69cc3da5d7c02d2f8301f4de5408b.zip |
- explain what magic numbers we're using here.
Diffstat (limited to '')
-rw-r--r-- | util-linux/freeramdisk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 923a15160..1f010c721 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c | |||
@@ -18,6 +18,11 @@ | |||
18 | #include <unistd.h> | 18 | #include <unistd.h> |
19 | #include "busybox.h" | 19 | #include "busybox.h" |
20 | 20 | ||
21 | /* From linux/fs.h */ | ||
22 | #define BLKFLSBUF _IO(0x12,97) | ||
23 | /* From <linux/fd.h> */ | ||
24 | #define FDFLUSH _IO(2,0x4b) | ||
25 | |||
21 | int freeramdisk_main(int argc, char **argv) | 26 | int freeramdisk_main(int argc, char **argv) |
22 | { | 27 | { |
23 | int result; | 28 | int result; |
@@ -29,7 +34,7 @@ int freeramdisk_main(int argc, char **argv) | |||
29 | 34 | ||
30 | // Act like freeramdisk, fdflush, or both depending on configuration. | 35 | // Act like freeramdisk, fdflush, or both depending on configuration. |
31 | result = ioctl(fd, (ENABLE_FREERAMDISK && bb_applet_name[1]=='r') | 36 | result = ioctl(fd, (ENABLE_FREERAMDISK && bb_applet_name[1]=='r') |
32 | || !ENABLE_FDFLUSH ? _IO(0x12,97) : _IO(2,0x4b)); | 37 | || !ENABLE_FDFLUSH ? BLKFLSBUF : FDFLUSH); |
33 | 38 | ||
34 | if (ENABLE_FEATURE_CLEAN_UP) close(fd); | 39 | if (ENABLE_FEATURE_CLEAN_UP) close(fd); |
35 | 40 | ||