diff options
author | Phillip Lougher <phillip@squashfs.org.uk> | 2014-09-08 03:09:35 +0100 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2015-02-23 12:36:46 -0800 |
commit | 9145bf97a0dc0b053805686efec7e0f6034c827c (patch) | |
tree | 232496da5dcaeb5de01dba4ebe4e572361775043 | |
parent | 1d5e58dfdef868f3f341d206001005ffa6bd0ddc (diff) | |
download | squashfs-tools-9145bf97a0dc0b053805686efec7e0f6034c827c.tar.gz |
action: add octal mode support to perm test function
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
-rw-r--r-- | squashfs-tools/action.c | 12 | ||||
-rw-r--r-- | squashfs-tools/mksquashfs.c | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c index 8d596ac..4e64a33 100644 --- a/squashfs-tools/action.c +++ b/squashfs-tools/action.c @@ -1184,7 +1184,8 @@ static void guid_action(struct action *action, struct dir_ent *dir_ent) /* * Mode specific action code */ -static int parse_octal_mode_args(int args, char **argv, void **data) +static int parse_octal_mode_args(int args, char **argv, + void **data) { int n, bytes; unsigned int mode; @@ -3058,8 +3059,13 @@ static int parse_perm_args(struct test_entry *test, struct atom *atom) break; } - for(i = 0; i < atom->args && res; i++, arg = atom->argv[i]) - res = parse_sym_mode_arg(arg, &head, &cur); + /* try to parse as an octal number */ + res = parse_octal_mode_args(atom->args, atom->argv, (void **) &head); + if(res == -1) { + /* parse as sym mode argument */ + for(i = 0; i < atom->args && res; i++, arg = atom->argv[i]) + res = parse_sym_mode_arg(arg, &head, &cur); + } if (res == 0) goto finish; diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c index 3b2d2e3..6644c98 100644 --- a/squashfs-tools/mksquashfs.c +++ b/squashfs-tools/mksquashfs.c @@ -5089,7 +5089,7 @@ void calculate_queue_sizes(int mem, int *readq, int *fragq, int *bwriteq, #define VERSION() \ - printf("mksquashfs version 4.3-git (2014/09/05)\n");\ + printf("mksquashfs version 4.3-git (2014/09/07)\n");\ printf("copyright (C) 2014 Phillip Lougher "\ "<phillip@squashfs.org.uk>\n\n"); \ printf("This program is free software; you can redistribute it and/or"\ |