aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-03-09 14:38:51 -0500
committerRob Landley <rob@landley.net>2014-03-09 14:38:51 -0500
commitd96e0ba7926941910d99ecc87c7a76ed6c480622 (patch)
tree876da45d0f5078afafbabc6e72ac30facb7aefa7 /toys/pending
parent728b8ff0a01f5adb01c5a44886cba644f8415837 (diff)
downloadtoybox-d96e0ba7926941910d99ecc87c7a76ed6c480622.tar.gz
Cleanup freeramdisk: tabs to 2 spaces, square brackets for option name, do optional cleanup under if (CFG_TOYBOX_FREE) guard.
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/freeramdisk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/toys/pending/freeramdisk.c b/toys/pending/freeramdisk.c
index 8ff4e75c..2af2d504 100644
--- a/toys/pending/freeramdisk.c
+++ b/toys/pending/freeramdisk.c
@@ -10,7 +10,7 @@ config FREERAMDISK
bool "freeramdisk"
default n
help
- usage: freeramdisk <RAM device>
+ usage: freeramdisk [RAM device]
Free all memory allocated to specified ramdisk
*/
@@ -19,9 +19,9 @@ config FREERAMDISK
void freeramdisk_main(void)
{
- int fd;
+ int fd;
- fd = xopen(toys.optargs[0], O_RDWR);
- xioctl(fd, BLKFLSBUF, toys.optargs[0]);
- xclose(fd);
+ fd = xopen(toys.optargs[0], O_RDWR);
+ xioctl(fd, BLKFLSBUF, toys.optargs[0]);
+ if (CFG_TOYBOX_FREE) xclose(fd);
}