aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2014-08-27 06:32:11 +0100
committerMohamad Ayyash <mkayyash@google.com>2015-02-23 12:36:44 -0800
commit35a00ded63fb3a75dc58b5d63454d0a5134b0cdc (patch)
tree0e3c44ffd0ccc7dfe5d2dae3c3705801cf94a997
parentb670481b0576702ab0151282087170db27388bb1 (diff)
downloadsquashfs-tools-35a00ded63fb3a75dc58b5d63454d0a5134b0cdc.tar.gz
mksquashfs: add -false-action-file option
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
-rw-r--r--squashfs-tools/action.c8
-rw-r--r--squashfs-tools/mksquashfs.c10
2 files changed, 18 insertions, 0 deletions
diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c
index 49b8d20..219df2e 100644
--- a/squashfs-tools/action.c
+++ b/squashfs-tools/action.c
@@ -801,6 +801,12 @@ int parse_action_true(char *s)
}
+int parse_action_false(char *s)
+{
+ return parse_action(s, ACTION_LOG_FALSE);
+}
+
+
int parse_action_verbose(char *s)
{
return parse_action(s, ACTION_LOG_VERBOSE);
@@ -818,6 +824,8 @@ int read_action_file(char *filename, int verbose)
switch(verbose) {
case ACTION_LOG_TRUE:
return read_file(filename, "action", parse_action_true);
+ case ACTION_LOG_FALSE:
+ return read_file(filename, "action", parse_action_false);
case ACTION_LOG_VERBOSE:
return read_file(filename, "action", parse_action_verbose);
default:
diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
index 607d70c..84fa545 100644
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -5260,6 +5260,16 @@ int main(int argc, char *argv[])
if(read_action_file(argv[i], ACTION_LOG_TRUE) == FALSE)
exit(1);
+ } else if(strcmp(argv[i], "-false-action-file") == 0 ||
+ strcmp(argv[i], "-faf") ==0) {
+ if(++i == argc) {
+ ERROR("%s: %s missing filename\n", argv[0],
+ argv[i - 1]);
+ exit(1);
+ }
+ if(read_action_file(argv[i], ACTION_LOG_FALSE) == FALSE)
+ exit(1);
+
} else if(strcmp(argv[i], "-comp") == 0)
/* parsed previously */
i++;