svn commit: trunk/busybox: miscutils util-linux
landley at busybox.net
landley at busybox.net
Thu Sep 8 03:12:01 UTC 2005
Author: landley
Date: 2005-09-07 20:11:58 -0700 (Wed, 07 Sep 2005)
New Revision: 11382
Log:
Tito sent in a few patches converting instances of CONFIG_FEATURE_CLEAN_UP to
ENABLE_FEATURE_CLEAN_UP.
Modified:
trunk/busybox/miscutils/strings.c
trunk/busybox/util-linux/fdflush.c
trunk/busybox/util-linux/fdformat.c
trunk/busybox/util-linux/freeramdisk.c
Changeset:
Modified: trunk/busybox/miscutils/strings.c
===================================================================
--- trunk/busybox/miscutils/strings.c 2005-09-08 03:00:39 UTC (rev 11381)
+++ trunk/busybox/miscutils/strings.c 2005-09-08 03:11:58 UTC (rev 11382)
@@ -99,9 +99,9 @@
status=EXIT_FAILURE;
}
} while ( --argc > 0 );
-#ifdef CONFIG_FEATURE_CLEAN_UP
- free(string);
-#endif
+
+ if (ENABLE_FEATURE_CLEAN_UP) free(string);
+
bb_fflush_stdout_and_exit(status);
}
Modified: trunk/busybox/util-linux/fdflush.c
===================================================================
--- trunk/busybox/util-linux/fdflush.c 2005-09-08 03:00:39 UTC (rev 11381)
+++ trunk/busybox/util-linux/fdflush.c 2005-09-08 03:11:58 UTC (rev 11382)
@@ -35,15 +35,15 @@
{
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();
}
Modified: trunk/busybox/util-linux/fdformat.c
===================================================================
--- trunk/busybox/util-linux/fdformat.c 2005-09-08 03:00:39 UTC (rev 11381)
+++ trunk/busybox/util-linux/fdformat.c 2005-09-08 03:11:58 UTC (rev 11382)
@@ -147,14 +147,14 @@
/* 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;
Modified: trunk/busybox/util-linux/freeramdisk.c
===================================================================
--- trunk/busybox/util-linux/freeramdisk.c 2005-09-08 03:00:39 UTC (rev 11381)
+++ trunk/busybox/util-linux/freeramdisk.c 2005-09-08 03:11:58 UTC (rev 11382)
@@ -47,9 +47,9 @@
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]);
}
More information about the busybox-cvs
mailing list