Module Name: src
Committed By: pooka
Date: Mon Aug 16 22:11:55 UTC 2010
Modified Files:
src/libexec/lfs_cleanerd: lfs_cleanerd.c
Log Message:
Don't exit when running as a lib after FS is unmounted, just return
from the mainloop.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/libexec/lfs_cleanerd/lfs_cleanerd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/lfs_cleanerd/lfs_cleanerd.c
diff -u src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.25 src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.26
--- src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.25 Thu Jul 29 14:09:45 2010
+++ src/libexec/lfs_cleanerd/lfs_cleanerd.c Mon Aug 16 22:11:55 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.25 2010/07/29 14:09:45 pooka Exp $ */
+/* $NetBSD: lfs_cleanerd.c,v 1.26 2010/08/16 22:11:55 pooka Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -1543,6 +1543,7 @@
if (semaddr)
sem_post(semaddr);
#endif
+ error = 0;
while (nfss > 0) {
int cleaned_one;
do {
@@ -1581,11 +1582,17 @@
handle_error(fsp, i);
assert(nfss == 0);
}
- } else
+ } else {
+#ifdef LFS_CLEANER_AS_LIB
+ error = ESHUTDOWN;
+ break;
+#else
err(1, "LFCNSEGWAITALL");
+#endif
+ }
}
}
/* NOTREACHED */
- return 0;
+ return error;
}