summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorRob Landley2005-09-08 03:11:58 +0000
committerRob Landley2005-09-08 03:11:58 +0000
commit658d2cf98616e377fdcf8cde380fec10d966a689 (patch)
treeded519582e91404e7439409ee62e6abe302f238c /util-linux
parent02eb934b0f7120cfb783536d6b27f7e092fb991b (diff)
downloadbusybox-658d2cf98616e377fdcf8cde380fec10d966a689.zip
busybox-658d2cf98616e377fdcf8cde380fec10d966a689.tar.gz
Tito sent in a few patches converting instances of CONFIG_FEATURE_CLEAN_UP to
ENABLE_FEATURE_CLEAN_UP.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdflush.c8
-rw-r--r--util-linux/fdformat.c12
-rw-r--r--util-linux/freeramdisk.c6
3 files changed, 13 insertions, 13 deletions
diff --git a/util-linux/fdflush.c b/util-linux/fdflush.c
index c3fcf33..f3afea3 100644
--- a/util-linux/fdflush.c
+++ b/util-linux/fdflush.c
@@ -35,15 +35,15 @@ extern int fdflush_main(int argc, char **argv)
{
int fd, result;
- if (argc <= 1)
+ if (argc != 2)
bb_show_usage();
fd = bb_xopen(argv[1], 0);
result = ioctl(fd, FDFLUSH, 0);
-#ifdef CONFIG_FEATURE_CLEAN_UP
- close(fd);
-#endif
+
+ if (ENABLE_FEATURE_CLEAN_UP) close(fd);
+
if (result) {
bb_perror_nomsg_and_die();
}
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index bd45275..7681051 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -147,14 +147,14 @@ int fdformat_main(int argc,char **argv)
/* There is no point in freeing blocks at the end of a program, because
all of the program's space is given back to the system when the process
terminates.*/
-#ifdef CONFIG_FEATURE_CLEAN_UP
- free(data);
-#endif
+
+ if (ENABLE_FEATURE_CLEAN_UP) free(data);
+
print_and_flush("done\n", NULL);
}
-#ifdef CONFIG_FEATURE_CLEAN_UP
- close(fd);
-#endif
+
+ if (ENABLE_FEATURE_CLEAN_UP) close(fd);
+
/* Don't bother closing. Exit does
* that, so we can save a few bytes */
return EXIT_SUCCESS;
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index e5061dc..cfea35b 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -47,9 +47,9 @@ freeramdisk_main(int argc, char **argv)
fd = bb_xopen(argv[1], O_RDWR);
result = ioctl(fd, BLKFLSBUF);
-#ifdef CONFIG_FEATURE_CLEAN_UP
- close(fd);
-#endif
+
+ if (ENABLE_FEATURE_CLEAN_UP) close(fd);
+
if (result < 0) {
bb_perror_msg_and_die("failed ioctl on %s", argv[1]);
}