svn commit: trunk/busybox/util-linux
aldot at busybox.net
aldot at busybox.net
Sat Mar 18 23:02:47 UTC 2006
Author: aldot
Date: 2006-03-18 15:02:45 -0800 (Sat, 18 Mar 2006)
New Revision: 14567
Log:
- explain what magic numbers we're using here.
Modified:
trunk/busybox/util-linux/freeramdisk.c
Changeset:
Modified: trunk/busybox/util-linux/freeramdisk.c
===================================================================
--- trunk/busybox/util-linux/freeramdisk.c 2006-03-18 15:59:29 UTC (rev 14566)
+++ trunk/busybox/util-linux/freeramdisk.c 2006-03-18 23:02:45 UTC (rev 14567)
@@ -18,6 +18,11 @@
#include <unistd.h>
#include "busybox.h"
+/* From linux/fs.h */
+#define BLKFLSBUF _IO(0x12,97)
+/* From <linux/fd.h> */
+#define FDFLUSH _IO(2,0x4b)
+
int freeramdisk_main(int argc, char **argv)
{
int result;
@@ -29,7 +34,7 @@
// Act like freeramdisk, fdflush, or both depending on configuration.
result = ioctl(fd, (ENABLE_FREERAMDISK && bb_applet_name[1]=='r')
- || !ENABLE_FDFLUSH ? _IO(0x12,97) : _IO(2,0x4b));
+ || !ENABLE_FDFLUSH ? BLKFLSBUF : FDFLUSH);
if (ENABLE_FEATURE_CLEAN_UP) close(fd);
More information about the busybox-cvs
mailing list