History log of /external/squashfs-tools/squashfs-tools/action.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
933026301cb9d41b4b8b8273d892ea71c1c3d04b 01-Apr-2016 Mohamad Ayyash <mkayyash@google.com> Make squashfs work on BSD and macOS

Based on https://github.com/vasi/squashfs-tools

Change-Id: Ia2b04541652ef4f0cf8d6ff1daf106d6db32e278
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/external/squashfs-tools/squashfs-tools/action.c
c89235426d8c338272f5ce9cf3e444d4dba6f9ea 12-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add new noop action

This action does exactly what it says, i.e. nothing.

It's designed to be used in conjunction with the verbose action
options to enable debugging of the test expression.

In otherwords, it allows you to check which files match on
your test expression but without doing anything to the filesystem.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ae1914fababe0f41c2295097a15156aeedc3ae84 11-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: change expression logging to not print brackets if test has no arguments

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
4d5b331b2004dfe31c70fe75ea01802f632a6517 11-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> action: change expression logging to use atom->args

Previously it used atom->test->args which is the arg count in the "generic"
test function.

Now that test function parsing has been improved to add variable arguments,
we should be using the new atom->args field which is the number of actual
arguments in the particular parsed test - i.e. the instance rather than
the definition.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
35236e2e4dfcc6d2731c89af78d314e9958f6592 10-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> action: chmod: fix mode setting if octal value specified for mode

The set code incorrectly did (st_mode & ~S_IFMT) | mode, which is the
exact inverse of what it should have been, i.e. (st_mode & S_IFMT) | mode

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
9145bf97a0dc0b053805686efec7e0f6034c827c 08-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add octal mode support to perm test function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
1d5e58dfdef868f3f341d206001005ffa6bd0ddc 08-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: refactor parse_octal_mode_args(), to use it with the perm test function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
fe8ec3abcdfebbfe922ca1e47c2e70c45cc981ae 06-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement perm() test function

Implement perm() test function, this is modelled directly on
find -perm and implements its behaviour.

Following find, three types of match are supported:

perm(mode) - exact match
perm(-mode) - all of the permission bits are set for the file
perm(/mode) - any of the permission bits are set for the file

With perm(/mode) if no permission bits are set in mode match
on any file, this is to be consistent with find, which
does this to be consistent with the behaviour of
-perm -000

Note, only symbolic modes are currently implemented. Octal modes
will be implemented next.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
51443e8ca5520831a43a890a6c81b0c22c41fb94 05-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> action: fix move argument parsing

At one point in time it was anticipated that the move action
might take multiple arguments. So it used the multi argument
setting of "-2"...

But the current implementation expects one argument only. But
the -2 setting allows zero arguments which isn't expected. So
enforce 1 argument.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
22f10fe2a0aed950669f0f6e94cd1203db1373ba 05-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: update test function parser to handle variable amount of arguments

Update the test function parser to handle variable amount of arguments,
as that's now needed for the perm() test function. Up till now, though
updating the test parser has been a TODO, it been a low priority because
it's done what's needed.

Updating the parser to speculatively read the number of arguments
present (and hence handle variable number of arguments) has been a
TODO even without the need to handle a variable number of arguments
because experience gained updating the action parser to do this showed
it generates better syntax error messages.

Previously the parser just parsed the number of arguments expected, and
then quit. The parser now parses all the arguments present, and then
compares it against what was expected.

No big deal? Well guess what gives the better syntax error if you
enter too many arguments. Reading just the number of arguments
expected, and then quitting, means the extra arguments cause to
paraphrase a "I expected a ) here, and I got a comma or string".
Now, you get an error message like "I got 5 arguments, but only
expected 2". Which IMHO is a better syntax error message.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
1ab859ddee6b0017b17d9e89e195a48ddb4c4fdc 05-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> action: split the execute mode code out of mode_action()

Allowing it to be used by the (to be added later) perm test function.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
fc108138a24af93e2dec05f84240074bdcf1ca14 01-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: Regularise SYNTAX_ERROR() statements

Get rid of the redundant "Action mode: " prefix and make the
error messages match others.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ad8e7bea60bf9b504e096dd1ae6ecb6f0361a74e 01-Sep-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: Regularise SYNTAX_ERROR() statements

Get rid of the redundant "action: " prefix and make the
error messages match others.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
6afbb2022569d5342394b216bbb559401691b54f 31-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: expression logging should be using action->args

Fix display of the arguments in the action() statement.
Previously it used action->action->args which is the arg
count in the "generic" action statement, not the number of
actual arguments in the particular parsed action - i.e. the instance
rather than the definition.

For actions which take a fixed number of arguments there, obviously,
is no difference. But for actions which take a variable number of
arguments the generic action count is "-2", and it is the
responsibility of an specific action parser helper to parse
the arguments. In this case the discovered number of arguments
in the instance will be different to the -2 argument count in the
generic statement.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
5a18cb8c785407cde264604c1b827b33cfe55653 31-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add chmod() as a synonym for mode()

When testing the mode action, I'm always typing chmod() as
that's what it's called elsewhere. So add chmod as a synonym, it
should probably have been called chmod in the first place.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ae6a655a33d9a6e1c4a0b88b11a26c6cfed7bbdb 31-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: fix symbolic mode parsing in the mode() action

When I implemented symbolic modes in the mode() action (i.e.
u+r-w) I made an oversight. I didn't realise the specification
allowed multiple =-+ sequences after the ownership specification.
In otherwords if you wanted to add r (+r) and remove w (-w)
from user, I assumed you would do u+r,u-w. After revisiting
the symbolic mode specification it turns out you should be able
to do u+r-w as a short cut to the previous specification. It
also should be obvious I don't tend to use the symbolic mode but
directly use the octal specification!

So fix the parser to allow multiple =-+ sequences.

So the syntax of the symbolic mode support goes from

[ugoa]+[+-=]PERMS
PERMS = [rwxXst]+ or [ugo]

to

[ugoa]*[[+-=]PERMS]+
PERMS = [rwxXst]+ or [ugo]

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
82c703bf854904d0e78509de6d18545854676a3e 30-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: eval_expr_top() should be using subpath and not pathname

Subpath is the path rooted at the root of the destination filesystem.
It includes renames (due to name conflicts), and moves.

Pathname is the original source pathname rooted at whatever pathname(s)
were given on the command line.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
35a00ded63fb3a75dc58b5d63454d0a5134b0cdc 27-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: add -false-action-file option

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
a5541d86600e1f490d6a073b020ac3b12cf8c058 27-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: add -true_action_file option

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d4dbdd3f2d00181504e78726624a7926e6f2a26a 27-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: make action_read_file use ACTION_LOG_{NONE|VERBOSE}

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f34c34ee10fe147f03067a6c871ac2feecab5eb4 27-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: extend logging to handle log if action TRUE and log if action FALSE

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
089a81ad7c1fcd8cd7c5e55b16538acfd7c34ead 24-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement -vaf (verbose action file) option

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b477525d9a4cc6d85a78af89ac5afb1013cb2280 24-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement verbose_action for stat_fn test operator

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
28d3a3499d316c86f6797f4f8876df00ce9d9613 23-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement verbose_action for readlink_fn test operator

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
16bffa0c5147dbd907b57599d37ecf7430ae2a85 22-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement verbose_action for eval_fn test operator

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
06052c6433939bbfa8271018dd52dbf22f34bc2f 18-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement -verbose_action option

Add an action option that prints the result of evaluating
the associated expression, annotating the result of evaluating each
atom (test operation) with =True or =False.

This can be used (especially in debugging action statements) to
show which action statements triggered, and why, and which
action statements didn't trigger and again why.

For instance given the action

-verbose_action 'uid(root)@type(d)||name(file*)'

This could produce the following output

test2/empty=uid(root)@(type(d)=True)
test2/file9=uid(root)@(type(d)=False||name(file*)=True)
test2/file4=uid(root)@(type(d)=False||name(file*)=True)
test2/a=uid(root)@(type(d)=False||name(file*)=False)
test2/sym=uid(root)@(type(d)=False||name(file*)=False)
test2/dir=uid(root)@(type(d)=True)
test2/dir/fred=uid(root)@(type(d)=False||name(file*)=False)
test2/file8=uid(root)@(type(d)=False||name(file*)=True)
test2=uid(root)@(type(d)=True)

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
c5a362ad1ed7f4f74227dc9f0ca3895ba04eaafd 11-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add eval() test operation

Follow path (arg1) and evaluate the expression (arg2)
in the context of the file discovered. All attributes are updated
to refer to the file that is pointed to.

This test operation allows you to add additional context to the
evaluation of the file being scanned, such as "if current file is
XXX and the parent is YYY, then ..." Often times you need or
want to test a combination of file status

If the file referenced by the path does not exist in
the output filesystem, or some other failure is experienced in
walking the path (see follow_path above), then FALSE is returned.

If you wish to evaluate the inode attributes of files which
exist in the source filestem (but not in the output filesystem then
use stat instead (see above).

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b0de2f889ef38a82a12a4c9bb1a2b98ac643cf0d 11-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: readlink_fn should be using it's own copy of struct action_data

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
3302e04e51a2cd8e586bc2100511651550b898fa 11-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: stat_fn should be using it's own copy of struct action_data

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
92dd6a523913d7498bb0fcb71faa5bc924d36afa 11-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: in eval_XXX_action() functions strdup (sub-)pathname

The strings that are passed back by the (sub-)pathname
functions are over-written every time another call is
made to these functions. This is deliberate to avoid
allocating and freeing the strings everytime on functions
which are called frequently, *and* the returned value is
only needed temporarily. Only rarely is the string kept
long term and then the principle is the string should be
strdupped then.

The action usage of these string values without strdupping
has always been a bit edgy - on the one hand the action code
does *not* call back into the Mksquashfs mainloop which is
where the additional use of (sub-)pathname is expected to be,
on the other hand such long term reliance on strings not
being reused is prone to break with code changes.

Such a thing has happened here in the actions code - we have
introduced a new "follow_link()" test function which needs
to compute it's own action_data structure using, you guessed it,
(sub-)pathname.

So the actions code can now call (sub-)pathname whilst relying
on the previous value. So, we need to strdup and free it.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
22d67dabb1232e9961325c22bc604b97a733fc15 08-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs/actions: make the root of the in-core directory structure available

to various action test operations.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
c5d6c97e11d89ddbb50e44499b88591e5d60c09a 07-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add dircount_range test operation

Compare the number of items in the directory (in the output
filesystem as opposed to the source filesystem) against the supplied
[min, max] value range and return TRUE or FALSE.

Initially believed this and the previous dircount() couldn't
be implemented via my generic TEST_VAR_{RANGE_}FN macros, but in
fact they can.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d5750f6a00c4bbec56b0979357f5e67f1b57e825 04-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add dircount() test operation

Compare the number of items in the directory (in the output
filesystem as opposed to the source filesystem) against the supplied
value and return TRUE or FALSE.

The comparison can be less than ([<-]value), more than ([>+]value),
or equal (value).

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
72133bea9e719f0af489e7d71c492bc0dcbabf36 04-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add comment describing generic TEST_VAR_FN macros

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
7b261c2981b06d395ac1a7e4e232ba9979b6c79d 04-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> action: parse_gid()

Name should be group in syntax error message.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
e6fb7bafa796ddf690d91a6b81918fa980f872aa 03-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: fix gid() so it takes a name rather than just a number

The gid() test operation was added at the same time as all the other
inode attribute test operators, and all these operations were implemented
taking a [+-]number as an argument.

This is obviously wrong for GIDs. GIDs should be able to be specified
as a name as well as a [+-]number.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
2652ac620f0eb70d8677d7ac997f111c4f610561 03-Aug-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: fix uid() so it takes a name rather than just a number

The uid() test operation was added at the same time as all the other
inode attribute test operators, and all these operations were implemented
taking a [+-]number as an argument.

This is obviously wrong for UIDs. UIDs should be able to be specified
as a name as well as a [+-]number.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
7312f99cd7e1dee6a4c9e879a031ad371e78b04b 31-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> action: implement readlink test operation

Dereference the symlink and evaluate the expression in the
context of the file pointed to by the symlink.
All attributes are updated to refer to the file that is pointed to.
Thus the inode attributes, pathname, name and depth all refer to
the dereferenced file, and not the symlink

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
eae5a18ec666032eead0396f86c22a3aa09c2269 30-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: get rid of contained and contained_followlink

They are now subsumed in the rewritten exists function.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
e859c7c99d85d71e98dbc07b0e9880360b9264ac 29-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: rewrite exists() test operation

Rewrite exists() test operation to operate on the scanned in-core
directory structure.

This allows exists() to be rewritten, and to change it's behaviour to
be more straightforward. It now tests to see if the symbolic link
exists in the output filesystem. It also now follows any symbolic
links embedded in the pathname to ensure that the symbolic link
is fully dereferenceable to an existing entry, and that no
symlinks do not exist or are absolute.

In that way, it is believed the semantics of exists() are now more
obvious and are more intuitive.

The new implementation of exists() subsumes the previously separate
exists(), contained() and contained_followlink() test operations.

Previously, three separate test operations were needed, and they
were written in the way they were, due to limitations imposed due
to the fact they were operating on the source directory. This is because
they were originally intended to be used with the exclude action where
the directory structure has not been fully scanned.

The introduction of the prune action allows these test operations to
be rewritten. Which is, obviously, why the prune action was
introduced.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f783d99d05fa77b9aa6019bb532af94b0b529b9c 28-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> action: update absolute test to use in-core directory structure

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f749d1cfbdeaf25582dab9c075b487bc824cc3c8 28-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> action: add code to check test is correct for action specified at parse time

In the future some test operations will not be useable with
the exclude action because the directory structure has not been fully
scanned.

Add code to flag each test, and check for this at parse time.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
070c0f7fc9677d0041716b7d73a3eb085d9f1a32 27-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add a prune action - allow fine tuning of excluding

This adds the prune action. This action is designed to do fine
grained tuning of the in-core directory structure after the exclude,
move and pseudo actions have been performed.

Unlike exclude which can be most usefully used to exclude based on
the evaluation of the file in question in isolation, prune can be
used to do exclusion based on the overall state of the filesystem
once exclusion has been done, rather than just the single file.

This is for two reasons:

1. At exclude time the filesystem is being scanned and files are being
evaluated and excluded. As the filesystem has not been fully scanned,
it is impossible to make decisons based on the state of other files.

For example, delete directory "xyz" if it has 10 or fewer entries.
At the time directory "xyz" is evaluated by the exclude action, the
number of files that will be eventully be in it after scanning and
exclusion is unknown.

Or another example delete file "abc" if file "../../x/y/xxx" doesn't
exist in the filesystem. Again, as the filesystem has not yet
been fully scanned this may not known when file "abc" is evaluted
by the exclude action.

2. Many of the complex context aware test options not only
are meaningless at exclusion time, but their complexity
means they rely on the in-core directory to be present.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d9dfcc9c086cb8e3d618dfe9a682eeadc0330cdc 19-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: implement stat(expr) - eval expr on the file pointed to by a symlink

evaluate the expression using the context of the inode
pointed to by the symlink. This allows the inode attributes
of the file pointed to by the symlink to be evaluated, rather
than the symlink itself.

Note, stat() deliberately does not evaluate the pathname, name or
depth of the symlink, these are left with the symlink values.
This allows stat() to be used on any symlink, rather than
just symlinks which are contained (if the symlink is *not*
contained then pathname, name and depth are meaningless as they
are relative to the filesystem being squashed)

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
18eff5a53b61951edbeeb2e3a8fcc474351d1571 14-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: use access() as an initial validity check in contained_followlink()

if access() returns error then the symlink cannot be dereferenced
for some reason, and it is pointless walking the symlink because it
will fail. This also deals with cases where a symbolic link is
circular, generating -ELOOP, and so we don't have to worry about
dealing with loops ourselves.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
53c3209168f8eaa4d629e34872e39fe816665258 13-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: optimise string handling in follow_link()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
edf9833a70b14fd1b298bd44a0d5c8cfcad76807 12-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: contained() should check for nonstandard_pathname

If nonstandard_pathname is set, then we have a symlink entered on the
command line, this by definition is a dangling symlink.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
dc8cceec039fb1ad83a9550fdeefcb0fb017c140 12-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add new contained_followlink() test operator for symbolic links

Test if a symlink appears to be within the source filesystem,
that is, it has a relative path, and the relative path does not
appear to backtrack outside the source filesystem using "..".

This test function evaluates the path for symlinks - that is it
follows any symlinks (and any symlinks that it may contain etc.), to
discover the canonicalised relative path.

This is expensive, if possible consider using the faster
contained() alternative which does not try to follow symlinks

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
aa83ecbbeab8e74668ee5d4a49ea32e939340044 12-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add dir_ent to action_data structure

dir_ent is needed for the contained() test operator and for the
new contained_followlink() test operator.

Note: action_data contains some fields which are copied from dir_ent,
and are thus now duplicated. This will be cleaned up in the near
future.

Historical note: the action_data structure when it was originally
created back in 2012 didn't use the dir_ent structure because at
that time the dir_ent didn't exist when the actions code was called
to evaluate the exclude action(). Iff the exclude action returned
FALSE the dir_ent structure was created then. Since then dir_scan1()
has been restructured to create the dir_ent structure before any
actions code is called.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
3a99c5a6c7bd13445167292dcb4568d3a8ecf08b 07-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: fix file type test

S_IFSOCK and S_IFLNK are not disjoint from the other file types, i.e.
the S_IFLNK value of 0120000 shares the bits for S_IFREG (0100000) and
S_IFCHR (0020000).

This means a test such as (st_mode & S_IFREG) will also match on
S_IFSOCK and S_IFLNK as they set bit 0100000.

Fix the checks in actions by introducting a helper file_type_match()
which does more nuanced checks.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
3159b516cef582037e3ab5a0f66e00a3976a619f 06-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: readlink doesn't 0 terminate the returned path

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
9cb513170b0f29e42d69949e59dbd7867bc70bad 06-Jul-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: deal with the unlikely case readlink returns 0 bytes

This should never happen, but, it's easy to adjust the error check
to deal with it, so why not ...

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b29dd5e75b0432fc1d1f46ba9645598e5917e163 23-Jun-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add new contained() test operator for symbolic links

Test if a symlink appears to be within the source filesystem,
that is, it has a relative path, and the relative path does not
appear to backtrack outside the source filesystem using "..".

This test function does not evaluate the path for symlinks - this
is deliberate, as this makes the test fast, but in the presence
of symlinks in the path it can fail to identify paths which do go
outside the sourcefilesystem. If this circumstance may occur, then
you should use contained_realpath(), which does follow symlinks,
but which is hence a much more expensive test.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
1a2e679dfde916cdb5ec73dc21d3d0a3bf3dd876 22-Jun-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add new absolute() test operator for symbolic links

Add new absolute() test operator that tests if a symlink has an
absolute path, which by definition means the symbolic link may
be broken (even if the absolute path does point into the filesystem
being squashed, because the resultant filesystem can be
mounted/unsquashed anywhere, it is unlikely the absolute path will still
still point to the right place). If you know that an absolute symlink will
point to the right place then you don't need to use this function, and/or
these symlinks can be excluded by use of other test operators.

This is the easiest and most basic test if a symlink becomes dangling
test operator.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b772123132d1a5a6466060e219816f401ba6fe2b 22-Jun-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: add new exists() test operator for symbolic links

Add new exists() operator that tests whether the file pointed
to by the symlink exists (in the source filesystem).

This can be used to exclude symlinks in the filesystem which are
dangling.

Note, this operator does not attempt to determine if the referenced
file is inside or outside of the filesystem being squashed.

Other additional test operators will be added to do that.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
adc37f1580370a1cffeede41ec464a5f1a357daa 21-Apr-2014 Phillip Lougher <phillip@squashfs.org.uk> action: only dump actions if SQUASHFS_TRACE defined

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
06f87e20d2d0012e6ffa6a49df7601c2137ccde8 20-Apr-2014 Phillip Lougher <phillip@squashfs.org.uk> Update copyright messages

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
2a51702757025ea917020e53d5b64151312a876a 18-Apr-2014 Phillip Lougher <phillip@squashfs.org.uk> action: parse_file_arg(), fix memory leak on TEST_SYNTAX_ERROR()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
bcde681821e08ec2649c74e155ee927bdb3aa5b3 18-Apr-2014 Phillip Lougher <phillip@squashfs.org.uk> action: free parse tree on SYNTAX_ERROR

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
77ffc7eadcf199489a4764c6badcc8487ad5d0b8 24-Feb-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: fix parsing of "G/M/K" size specifiers in number parsing

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
3aa58da3a26d4bed5a0d8c865cb0f400a35cffcb 18-Feb-2014 Phillip Lougher <phillip@squashfs.org.uk> actions: fix parsing of numeric uid and gid

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
8aa2f82583a53ad4182f9580c3bc128eaed14752 21-Feb-2013 Phillip Lougher <phillip@squashfs.org.uk> action: Use MEM_ERROR() for out of space handling.

Replace all hand crafted BAD_ERROR() messages with MEM_ERROR()
which does the same thing.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
15e6b9cc731e92620594e9de7b0db4de30fdf4cf 13-Jan-2013 Phillip Lougher <phillip@squashfs.org.uk> action: fix memory leak in move_dir()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
651d68dd33b0a41c03ea0b95ff1b2b5fbbe95500 13-Jan-2013 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: optimise subpathname() calling in dir_scan1()

Small optimisation - subpath is only needed if there are
exclude actions specified, or if the dir_ent is a directory.
In other cases don't calculate subpath as it is not needed.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
1153279b6d3c096b26190b303f4abd845456aa84 04-Jan-2013 Phillip Lougher <phillip@squashfs.org.uk> action: add quoted string and back slash handling to lexical analyser

Add the ability to parse strings quoted with ", and also add the
ability to backslash "special characters" that would
normally be treated as end of string.

Quoted and non quoted strings can be specified multiply and the
strings will be concatenated together.

String examples

"Hello World"
Hello\ World
This" is a "string
"So"\ is\ "this"
"This \" is too"

etc.

Also switch to using an internal buffer (increased as necessary) to
return strings from the lexical analyser, rather than dynamically
allocating each string returned. This reduces unnecessary overhead
(mostly strings returned from the lexical analyser are discarded
without being stored, the ones that are stored can be explicitly
copied when necessary), and it fixes a memory leak in the parser
as returned strings are not freed.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
52ccd0c2635c922e4770a3b4fa4880dfedccbd36 31-Dec-2012 Phillip Lougher <phillip@squashfs.org.uk> action: Get rid of ERROR statements in child process in file() test

ERROR() since commit 738570df60f65c10cd7fde4134f3af1e005b671a calls
progressbar_error() to synchronise with the progress bar output,
however, this function uses pthread mutexes which are meaningless/
useless in a child process.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b87ea4275e0c4ffc17de3093a69f329f56dc7847 31-Dec-2012 Phillip Lougher <phillip@squashfs.org.uk> action: implement exec() test option

Exec() adds the ability to run a command, with the
result of the test being the exit status of the command;
if the command returns a valid exit status (0), exec() returns
TRUE, otherwise on a bad exit status exec() returns FALSE.

Three environment variables hold:

- NAME: name of file
- PATHNAME: pathname of file relative to squashfs root
- SOURCE_PATHNAME: the pathname of the file in the source
directory

Currently only a single argument (without spaces) can be entered
as a command, this is because the actions parser currently lacks the
ability to have arguments with spaces in them (either argument quoted
with '"', or spaces blackslashed with '\')!

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
8bbfb912f464c1e25b00b8a2845ebfaa71ec6c11 28-Dec-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: fix lexeme to string mapping

The insertion of the '\t' whitespace lexeme in the token_table[]
broke the lexeme value to string mapping... The mapping relies
on the fact each lexeme value corresponds to the index in
the token_table, i.e. the lexeme value is the same as the
lexeme's index in the token_table.

Move all the whitespace lexemes to the end of the table,
to ensure additional whitespace lexemes can be added in
future without breaking the mapping. Change the lexeme
values so that they correspond to the new order.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
db9dd938faf46496e412daf4c3df4466bd3a7528 25-Dec-2012 Phillip Lougher <phillip@squashfs.org.uk> action: fix garbled SYNTAX_ERROR message

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
3edfc3ab6a2961c8d7e7f1f1442214abd8c5b442 25-Dec-2012 Phillip Lougher <phillip@squashfs.org.uk> action: add tab whitespace to lexical analyser

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b73cabaa0c7097c1b51a600bce0eb9c0f1128e29 24-Dec-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add action file support

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
62859d215e7f828ace8501f5863f0c3d8b48ebf3 30-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> Mark temporary strings on stack used by regerror as overflow safe

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
08c91e30f8bac61c8491009ea56624eeebffe073 29-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: parse_number(), check for strtoll conversion error

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f57353fad9e30bc19014252e53157946d04d165b 28-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: parse_number(), rename arg and b to be more self-documenting

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
90197a0590ca5a65e1b30f23250eacdf7210b8f6 27-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: make a load of functions static

Add a load of missing statics to functions internal to action.c

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f321b69867f4cb9caba7acc2d74a24fb5fcd6b31 22-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: fix "../" trying to move up in root directory (in eval_move)

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
5f97dd662d3088ddd33c5ac5f7902e3e3cd28729 20-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add missing possibility in integer range comment

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
49948d86b36aa15b35e4a9bb1b3a6bc71f5b115e 15-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: get rid of single spec_list

Split single spec list into separate lists for actions.
This means the action processing functions don't have to
skip the actions not of interest.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
71ae14e514db2389e4b185e6aec1614818609570 15-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: Skip dir_scan4() if there's no empty actions

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
e92cb5142923bda522a24a158d8c440a26188b5a 15-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: Skip dir_scan3() if there's no move actions

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f3d0f9ce04599ce69e85e0e11cb04890cf51841a 14-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: Skip dir_scan2() if there's no actions or pseudo files

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d1f6dc111a7d028e43b7d943defb0c591bd6639a 14-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add separate counts for the various action types

This will allow dedicated scans for actions to be skipped if
there's no actions of that type.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
2abfcf71616474710ed7b6f97cdad97d6adeec0d 11-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: move empty action processing from dir_scan1()

Move empty action processing into a new dir_scan4() ran after move action
and pseudo file processing. This is necessary because these actions
can affect whether directories are empty. Obviously the move
action can populate previously empty directories, and it can also
make directories empty, and pseudo files can also populate previously empty
directories.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
42fe6a8a65205df4dd71fa42f2a6339ce621cd54 01-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: get rid of parse_move_args function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ed533bf5157870daef655bc9ea3d7c6348290024 01-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: get rid of unused code

The intention was to support name expansion in the
move pathname. Instead allow users to specify some shell code
to run. Ultimately this is more flexible and takes advantage
of various utilities specialised for text substitution.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
83d42a3fc898962aa1f1e8387f2ccb1114e0d294 01-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> Update email address

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
45c5fb70862d1c7458ec47c0faf2f63c30b4ae84 01-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: improve error reporting in do_move_actions()

by replacing the existing printfs with more informative ERROR() calls.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
0d1b629858dc339bb524217554580312d68098bb 01-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: improve error reporting in move_file()

by replacing the existing printfs with more informative ERROR() calls.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f0a0ea5fc1d141e400876e93f37b78904b67d9ad 31-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: improve error reporting in eval_move_actions()

by replacing the existing printfs with more informative ERROR() calls.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
2cf4997a5cbfdcff9448e9095911281689244299 29-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: improve error reporting in eval_move()

by replacing the existing printfs with more informative ERROR() calls.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
db7967696dc79752f0e6f7d3f10a34eb689dc67e 29-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add move_pathname() helper

Add move_pathname() helper which returns the new pathname/name resulting
from the move/rename operations described by the move_ent struct.

This is intended to be used by ERROR() when mksquashfs processes
a move/rename which conflicts with a previously queued move/rename
for that file.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
bcaf0ae1b077691366b785dbd0ea3230569e56b9 28-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add action_data to eval_move() parameters

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b554a5a0f1636d2acdd47dcc9307e1d131bdab7d 26-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> action: convert numerous action printf errors to use correct SYNTAX_ERROR()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
221a9c159913ad2b0f918991e31db340cabcdc19 26-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: fix error handling in parse_sym_mode_arg(s) functions

NULL return from parse_sym_mode_arg() would be incorrectly
printed as being out of memory, when in fact NULL could be because
of syntax error as well as out of memory.

In the case of syntax error parse_sym_mode_arg() already displayed
the syntax error, but didn't display any error for malloc failure.

So, fix by making parse_sym_mode_arg() bail out on malloc failure, and
remove the misleading out of memory error in parse_sym_mode_args(),
NULL return is now always because of syntax error, and the error message
has already been printed by parse_sym_mode_arg().

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
906daaa70f5c062bfcc94b768b7ab6645a87aa85 26-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: In expression parser bail out on out of memory

Previously out of memory would be treated as a parse error, but
no failure message would be printed.

The expression parser should in fact bail out on out of memory.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f52b6cd338366f03643c0c0c3482fca67c8080c4 25-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add missing malloc/realloc NULL return checks

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
db76154958a5cc43b2a85f84b21136a528fd98fd 25-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: on malloc failures bail out using BAD_ERROR()

On malloc failures we have little option but to bail out because
these failures are unrecoverable. The only other option is to ignore
these failures, and to treat the actions or tests where they occur
as having failed. However, if these actions or tests would have done
something if the malloc failure didn't occur, we end up with a
filesystem which is wrong - not actually corrupted but one which
is unexpected, which is worse than explicitly bailing out.

In practice with the default over-commit behaviour of the Linux kernel,
mallocs rarely fail, and the first thing a process knows about out of
memory situations is when it is killed by the OOM (out of memory)
killer.

It is perhaps worth mentioning this is why the recovery file was added
on appending, because it was discovered on out of memory situations,
mksquashfs never got the chance to restore the filesystem being appended to.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
7e100cea2d1dd2ece0a36690b348e635635b9e04 25-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: fix 'mode' may be used uninitialized warning

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b62af75ea2f75d1796bbdb71751775e5a41815f9 22-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> action: Add TEST_SYNTAX_ERROR() printing to parse_file_arg()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
c8923ac7acb6f8bc2f047a7f84cd69109e49f5ef 22-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> action: Add TEST_SYNTAX_ERROR() printing to parse_type_arg()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
5443fe2eb12c234f7f11abab3cf50d9dbde3a20b 22-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> action: Add TEST_SYNTAX_ERROR() printing to parse_range_args()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b0c97b90744a67fc2acc474f4993274bf09b2254 22-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> action: Add TEST_SYNTAX_ERROR() printing to parse_number_arg()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
42ce0c6457c4f4e69a1d1924ad8d739847308db6 22-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> action: Extend parse_number() to pass back string describing parse error

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
0000129513a5a8e6a844712d7dbf1536c4075065 21-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add a comment describing the format accepted by parse_number()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
25db529b2218830859f3ac6a85de938527ecea6b 21-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: Fix bug in parse_number()

Parse_number() would consider strings containing a range
specifier (<, >, - or +) and/or a size (k, K, m, M, g or G)
but no number as correct.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
2a5082a9bbd6e38adfb5b2bfd424a7c82de7021c 20-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: allow '<' and '>' to be used in numeric arguments

Allow '<' and '>' to be used to signify less than xxx and greater than
xxx respectively, in addition to the find inspired '-' and '+'.
Personally I find '<' and '>' to be more intuitive than '-' and '+'.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
c7935a1631ae0c6af696c6e79871c530a2ad726b 14-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: get rid of debug printf in pathname()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
f93bedc8d9a7aa351c90a1225900292d91df4cd2 14-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: get rid of debug printf in subpathname()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
23d8362e9e35a564182c713640fa04f31e9c08fb 14-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add move() action

Add move action allowing files and directories to be moved
and/or renamed.

Syntax -action "move(DEST)@<test_ops>"

Semantics are the same as Unix mv command.

Rename SOURCE to DEST (if it doesn't exist) or
Move SOURCE to DEST (if it exists and is a directory)

SOURCE is any file matching the test_ops expression.

For instance

-action "move(/source)@name(*.[ch])"

move all *.[ch] files to the directory "/source"

More complex combinations of test_ops are supported by default.

For instance

Move all files not owned by monitor smaller than 1024 bytes to "/smallfiles"
but ignore any files matching "*.[ch]"

-action "move(/smallfiles)@ !uid(monitor) && size(-1024) && !name(*.[ch])"

Multiple moves are evaluated "simultaneously", so the results of one
move do not affect other moves.

This is to prevent unanticipated side-effect.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
dea08097f6c70dbc748d41f58143d74561bff918 07-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: make sure user supplied (sub)pathname has a leading "/"

If the user supplied subpathname or pathname does not have a
leading "/" then add one, otherwise matches against the pathname
supplied by subpathname() will always fail.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
aeb8d3d2c666aabe7523a7ef28df2e53bb5f7b64 11-Jul-2012 Phillip Lougher <phillip@squashfs.org.uk> action: fix subpathname to work as expected

Previously subpathname relied on not using FNM_PATHNAME in fnmatch to
obtain a subpathname match by utilising the behaviour that "*" could match
"/" and so ensuring a pathname pattern would match pathnames "underneath"
the directories directly matched by the pathname pattern.

i.e. a pattern match of "a/b/*" will match "a/b/c", but it will also
match "a/b/c/d", the "*" matching the "c/d" component of the pathname.

This provided the intended semantics of "subpathname", that any
file/directory which is a subpath of the pattern will match.
This fulfils the requirement of various actions where we often
only want the action to have effect on files/directories contained within
a particular directory (or directories if wildcards have been used
in the pattern match).

It, however, has an unwanted and unexpected side-effect, given the
pathname pattern "a/*/c/*" the user might expect it to only
match on directories called "c" which are children of *one* unknown
directory which is a child of directory "a", but in fact because "*"
matches on "/" too, the pathname "a/b/extra-directory/c/filename"
will match.

This is considered broken behaviour, and so subpathname has been
reimplemented to walk the pattern match, and to only apply the
patten match to the appropriate leading part of pathname, ensuring
pathnames which are subpaths match while allowing FNM_PATHNAME to be
used in fnmatch ensuring the unexpected behaviour detailed above does not
occur.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ba9f9310a52fdfc51f2fd7ee252889182ec9a348 01-Mar-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add new file() test operation

Add a new file() test operation which runs "file" against the
filename.

File() takes one argument, a regular expression pattern which is matched
against the output from the file command. If the regular expression
matches file() returns true. Substring matches are supported.

e.g. file(text) will match on any output containing text, for example
the string "ACSII C program text" received from running file
against a c source code file.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b4f4b0d5d06c3c502e6379e832d0a042234b3c7d 20-Feb-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: Add pathname to struct action_data

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
aadd318a769a049703cf2ff2ce78e5b2b5d594c0 19-Feb-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: allow () to be omitted on test operations with no args

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
b38c172137d7eed57a0f8d1af69eb65aaecd8916 10-Feb-2012 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: add subpath to dir_info structure

Rather than pathname which includes the path specified on the
command line, add a subpath which is rooted at the root of the
squashfs filesystem being created.

i.e. given mksquashfs a/b file.sqsh

with file "c/d/e" inside directory "b"

the pathname of "d" will be "a/b/c/d"

this adds a subpath which will be "c/d"

This is necessary for the new pathname test for actions.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
494479fd097eaab956dda035c45efadc151cadc0 03-Feb-2012 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: optimise dir_ent structure by removing pathname member

All dir_ent structures stored both the name and pathname
of each file scanned from the source directories. This was
rather wasteful of memory, as the majority of pathnames could
be computed from the parent directory's pathname and the
dir_ent's name.

Exceptions to this are names which have had a _1, _2 etc. appended due
to name clashes, pseudo files and cases where multiple directories
and files have been specified on the mksquashfs command line, in which
case the root directory will likely consist of entries each with a
different pathname. These cases have to be handled specially, either
with the new source_name member holding the original name, or in the
cases where there's a completely different pathname, by the use of the
nonstandard_pathname member.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
43cc428243312c39d63c32647e37b35dd448fa9e 25-Jan-2012 Phillip Lougher <phillip@squashfs.org.uk> actions: add subpathname test operation

Similar to pathname except it matches on partial pathnames, i.e.
"*/c/d" will match "a/b/c/d" as well as "b/c/d".

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
94b51f0a4cd4b8c7b14e64d3b147016952680d6e 31-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: implement xxxx_range versions of test operations

Implement range versions of filesize, dirsize, size, inode, nlink,
fileblocks, dirblocks, blocks, gid, uid and depth.

These allow for a range [x, y] to be checked (value is between
x and y inclusive), rather than a single value (equal to,
less than or greater than).

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
7022870b7819011aa54595fbb5f602f1d1ede1e4 31-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add "all", "source" and "excluded" options to empty action

Add options to empty action which allow you to specify which kind of empty
directories to work on:

"source", only work on directories which were empty in the source
filesystem, i.e. ignore directories which have become empty
only due to excluded files.

"excluded", only work on directories which are empty due to one or more
files being excluded, i.e. ignore directories which were
empty in the source filesystem.

no argument, or "all" argument, work on all empty directories irrespective
of why they're empty..

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
16e289ef2d49b4a62d45e9d2cadc5be4be975ed6 28-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add false test operation

Returns 0

Added to complement true operation.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
77a8c180edba9161b4d40dbc7f8a11814b575dd4 28-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add true test operation

returns 1

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
6a78a2da7a14515dda5c0901332eabb9143fe68a 28-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add empty action

Exclude the directory if it is empty, and the expression returns true.

This action is added to deal with situations where excluding results in
empty directories (including situations where a directory may contain
other directories but whuch recursively are ultimately empty).

These directories once the contents have been excluded are often completely
useless and should be excluded themselves.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
01c5a34e6f90e88778965c270713d6e92b210b28 25-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: check octal number is within correct range

Check octal mode in chmod action is within range.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
8519a6fdfc8c9d63626691aadaf2419cad90affc 25-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add depth test operation

Add depth test operation, this takes one argument, with an optional - or +,

If no +-, returns true if directory depth is equal to argument
If +, returns true if directory depth is greater than argument
If -, returns true if directory depth is less than argument

Top level directory has depth of 1

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d194e4062a90db24febf917857f3d0366e6e66ec 23-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add pathname test operation

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ac46233cdc1e18db597fdd6fb2743f0ab10894c0 23-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add file type test operation

Takes one arg, the type to test each file against.

The arg is a single character, comprising

f - regular file
d - directory
l - symbolic link
b - block device
c - character device
s - socket
p - fifo

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
67c30c29c1c18f9825ef0adb7700eb901c3da9e6 23-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: move parse_number from runtime to parse time

Move test operation number parsing from runtime into a new parse time
fuction.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
572cc1ef89b614749df173c33b485041a4121970 21-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: remove struct action argument to test operation

The action argument is not used, and it simplifies eval_expr as it doesn't
have to pass action down through recursive eval_expr invocations.

Also replace the argc/argv arguments to the test operations functions, and
pass struct atom instead which contains these arguments, and mostly
importantly also data.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
8ba773c3e9e655e2464f634ddbecd062863a9b36 21-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add parse_args function to tests

Add a parse_args function to the test operations. This allows the
arguments to be checked and processed into more efficient representations
at parse time.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
8490893c293e088ded72b2002fb24bdc70c6a042 07-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: implement more test functions which test various inode attributes

Implement dirsize, size, inode, nlink, fileblocks, dirblocks,
blocks, uid and gid.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
105e1407a99bc0af6ba07cea2e367b8860462fb4 04-Dec-2011 Phillip Lougher <phillip@squashfs.org.uk> action: introduce macros for the test fn boilerplate

Introduce macros for the generic test function, and for the
test function which compares a file attribute for being equal, less than
or greater than a value.

This allows multiple tests to be implemented without constantly
reimplementing the boilerplate.

Also reimplement the name_fn and the filesize_fn tests using
these macros.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
648ca297597a57166eee842f09fa924ea0d06b2c 14-Nov-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: implement filesize test

syntax filesize(n)

where n is:

+n for greater than n
-n for less than n
n for exactly n

returns true if filesize matches n.

only operates on regular files, returns false on
all other files.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
ea273b1d26680388725926128df4702542805e25 13-Nov-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: fix parsing of zero arguments in action specifier

If the action specifier has no arguments, you were able to omit
the brackets, i.e.

-action exclude@name(*.c)

rather than

-action exclude()@name(*.c)

the addition of variable argument handling broke this.

Now fixed.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
00c17515dd002b421de82ba39316bca1f97b3645 12-Nov-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: implement "X" symbolic mode of mode action

Last symbolic permission implemented. "X" is something
Ive never actually used, but, which ought to be there for
completeness and for compatibility with chmod.

It also has to be dealt with as a slightly irritating special case :-)

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
5c97a9e1b5f445a833898bb57d3767e3a276ea7d 07-Nov-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: implement "st" symbolic modes of mode action

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
9b32b0eef507ccca4483c1925bf2822497ae3ad0 08-Oct-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: implement symbolic modes of mode action

Implement [ugoa][+-=]PERMS, where PERMS is [ugo] or [rwx]

stX are still to be implemented.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
29e45d64ccc1308e3b525fbd10bd70db5f31413a 07-Oct-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: change '=' in action syntax to '@'

The previous syntax was action(arg1, arg2) = expr(arg) ...

My brother thinks the = is misleading, implying equality or
assignment. So replace = with @, which doesn't imply these
things.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
696aace2d3dc3e1900428cd5f1ac7158925787c7 25-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add chmod action data structure for sym modes

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d15db104db05e19636eaeab739315826d5eea7d1 25-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: restructure chmod argument parsing function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
e3cb325925f35c6c5c8c12378081e24c2e9e3839 24-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> action: add chmod action with octal mode number

add chmod action, currently only the octal mode number format as
a single argument is supported.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
e145bef2920cd3ce61658f5539366ef06e07ff63 24-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: parse all the action arguments present rather than the expected number

Parse all the arguments present in the action statement, and
then compare against the expected number of arguments, rather than
parse only the expected number of arguments, and fail as soon as
it is known there's too little or too many arguments present.

This change enables actions with variable length arguments to be handled.
An action with a "vararg" list has an expected number of arguments of -2.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
89d757c5ac7c97e52791e147407cfee458e69673 20-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add file types operated on to actions

Actions (apart from exclude actions) only operated on regular files,
this was wrong. Actions now specify which file types are applicable.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
8aaf41fe98ac2ef4217544ec3b47e6627b465c83 19-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: extend action framework to have action run functions

These are functions which are executed if the expression matches for
a file. This allows the specialised eval actions functions to be
replaced by a generic function, with the action specific code moved
into the action run functions for each action as necessary.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
5de27cc58f2a399ce4f3617c295cf9fc3266dd8d 14-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: fix uncompressed action

Remove erroneous statement.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
d9dafbe313e6f82cbb8114d6313851383220a535 12-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add guid action

This is equivalent to specifying both the uid and gid actions, and
allows both to be changed more consisely than specifying two actions.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
a42bfa90cf58f6fa216fd521bc08fb2c16cb558b 12-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> action: move parsing of uid/gid into into new parse_uid_args() function

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
994f3622eac633f17a00069b70f90c02a3088c86 12-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add an action specific parse arguments function to framework

This is needed for any actions which need to check their arguments
for correctness at parse time, and/or need to process the arguments into
a more optimised format for evaluation, saving repeated processing
each time the arguments are used when the action is evaluated.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
c14fc85d20dbc4651ce626976528ae7aab761212 12-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add uid and gid actions

These actions allow users to over-ride the global behaviour on a per inode
basis.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
84bf788a088dae22019a6c3038f33f0e5c3d2307 10-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add compressed and uncompressed actions

These actions allow users to over-ride the global behaviour on a per inode
basis.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
03734d2dacb4ebf87c5d949705c5d962660e95e6 05-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add always_use_fragments and dont_always_use_fragments

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
a3d8b364f7b407fe099800737cb0d49a8a861011 05-Sep-2011 Phillip Lougher <phillip@squashfs.org.uk> actions: add fragments and no-fragments actions

These actions allow users to over-ride the global behaviour on a per inode
basis.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
10d8de07c15fb3f3ada7bf0b782acd491987ef7d 29-Aug-2011 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: add exclude action

Add an additional action called exclude, which takes no parameters.
Any files which the expression returns TRUE will be excluded.

Curently, the only test operator is name(wildcard), which matches
on the file name (leaf name without preceeding pathname). So, currently
the functionality is equivalent to non-anchored excludes i.e.

-action exclude=name(*.o)

is equivalent to

-e "... *.o".

Do we really want yet another exclude facility? Well no if it
remains equivalent to just anchored excludes, but once all the
anticipated test operators are implemented then it becomes much more
powerful than the existing functionality. Want to exclude based
on file age, size or ownership etc.? That will be possible soon.

The cool thing is the action infrastructure is shared with all other actions,
and the exclude infrastructure is already there and "comes free", and so
the exclude action code is minimal about 20 lines!

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c
4bcb7f87d69edc99adce34232f7cb9dea84ab923 28-Aug-2011 Phillip Lougher <phillip@squashfs.org.uk> mksquashfs: add action support

Add intial action support. Currently, there's supported:

- One action fragment()
- One test name()

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/action.c