[augeas-devel] [PATCH] * src/augtool.c: add --noload option

David Lutterkort lutter at redhat.com
Wed Mar 18 23:05:00 UTC 2009


---
 src/augtool.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/augtool.c b/src/augtool.c
index af6b0df..f7ea46e 100644
--- a/src/augtool.c
+++ b/src/augtool.c
@@ -518,6 +518,7 @@ static void usage(void) {
     fprintf(stderr, "  -r, --root ROOT    use ROOT as the root of the filesystem\n");
     fprintf(stderr, "  -I, --include DIR  search DIR for modules; can be given mutiple times\n");
     fprintf(stderr, "  --nostdinc         do not search the builtin default directories for modules\n");
+    fprintf(stderr, "  --noload           do not load any files into the tree on startup\n");
 
     exit(EXIT_FAILURE);
 }
@@ -526,7 +527,8 @@ static void parse_opts(int argc, char **argv) {
     int opt;
     size_t loadpathlen = 0;
     enum {
-        VAL_NO_STDINC = CHAR_MAX + 1
+        VAL_NO_STDINC = CHAR_MAX + 1,
+        VAL_NO_LOAD = VAL_NO_STDINC + 1
     };
     struct option options[] = {
         { "help",      0, 0, 'h' },
@@ -536,6 +538,7 @@ static void parse_opts(int argc, char **argv) {
         { "root",      1, 0, 'r' },
         { "include",   1, 0, 'I' },
         { "nostdinc",  0, 0, VAL_NO_STDINC },
+        { "noload",    0, 0, VAL_NO_LOAD },
         { 0, 0, 0, 0}
     };
     int idx;
@@ -563,6 +566,9 @@ static void parse_opts(int argc, char **argv) {
         case VAL_NO_STDINC:
             flags |= AUG_NO_STDINC;
             break;
+        case VAL_NO_LOAD:
+            flags |= AUG_NO_LOAD;
+            break;
         default:
             usage();
             break;
-- 
1.6.0.6




More information about the augeas-devel mailing list