aboutsummaryrefslogtreecommitdiff
path: root/util-linux/umount.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-25 18:01:20 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-25 18:01:20 +0000
commitb040d4f3da1545225b9a58301deb29acee6aa7f3 (patch)
treef029b6d39fc4619a8369094efd4c558b10f3d927 /util-linux/umount.c
parentb9ea02c04b91773e6e5a116313b360f3499a2d4e (diff)
downloadbusybox-b040d4f3da1545225b9a58301deb29acee6aa7f3.tar.gz
Use BB_FEATURE_CLEAN_UP where appropriate
-Erik
Diffstat (limited to 'util-linux/umount.c')
-rw-r--r--util-linux/umount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c
index df075f7d9..6a5e4cad8 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -142,7 +142,7 @@ char *mtab_next(void **iter)
/* Don't bother to clean up, since exit() does that
* automagically, so we can save a few bytes */
-#if 0
+#ifdef BB_FEATURE_CLEAN_UP
void mtab_free(void)
{
struct _mtab_entry_t *this, *next;
@@ -235,6 +235,9 @@ extern int umount_main(int argc, char **argv)
if (argc < 2) {
usage(umount_usage);
}
+#ifdef BB_FEATURE_CLEAN_UP
+ atexit(mtab_free);
+#endif
/* Parse any options */
while (--argc > 0 && **(++argv) == '-') {