# HG changeset patch # User Rob Landley # Date 1394393931 18000 # Node ID 4eaac3e63fa786e1d87cc9fe88b76e9368b0f228 # Parent a31d747b0017507101febfd0841a7100757c09a3 Cleanup freeramdisk: tabs to 2 spaces, square brackets for option name, do optional cleanup under if (CFG_TOYBOX_FREE) guard. diff -r a31d747b0017 -r 4eaac3e63fa7 toys/pending/freeramdisk.c --- a/toys/pending/freeramdisk.c Sun Mar 09 14:27:11 2014 -0500 +++ b/toys/pending/freeramdisk.c Sun Mar 09 14:38:51 2014 -0500 @@ -10,7 +10,7 @@ bool "freeramdisk" default n help - usage: freeramdisk + usage: freeramdisk [RAM device] Free all memory allocated to specified ramdisk */ @@ -19,9 +19,9 @@ 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); }