From d96e0ba7926941910d99ecc87c7a76ed6c480622 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 9 Mar 2014 14:38:51 -0500 Subject: Cleanup freeramdisk: tabs to 2 spaces, square brackets for option name, do optional cleanup under if (CFG_TOYBOX_FREE) guard. --- toys/pending/freeramdisk.c | 10 +++++----- 1 file 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 + 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); } -- cgit v1.2.3