Mercurial > hg > toybox
changeset 1215:4eaac3e63fa7 draft
Cleanup freeramdisk: tabs to 2 spaces, square brackets for option name, do optional cleanup under if (CFG_TOYBOX_FREE) guard.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 09 Mar 2014 14:38:51 -0500 |
parents | a31d747b0017 |
children | bd4e3608ad04 |
files | toys/pending/freeramdisk.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <RAM device> + 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); }