Unsquashfs: don't treat unrecognised xattr prefixes as xattr read failure

There are two users for get_xattr(), Mksquashfs uses it to read the
xattrs from the filesystem on appending, and Unsquashfs uses it
to retrieve the xattrs for writing to disk.

Unfortunately, the two users disagree on what to do with unknown
xattr prefixes, Mksquashfs wants to treat this as fatal otherwise
this will cause xattrs to be be lost on appending.  Unsquashfs
on the otherhand should want to retrieve the xattrs which are known and
to ignore the rest, this allows Unsquashfs to cope more gracefully
with future versions which may have unknown xattrs, as long as the
general xattr structure is adhered to, Unsquashfs should be able
to safely ignore unknown xattrs, and to write the ones it knows about,
this is better than completely refusing to retrieve all the xattrs.

So add ignore parameter.  If ignore is TRUE then don't treat unknown
xattr prefixes as a failure to read the xattr.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
6 files changed
tree: fb75194179c688210cad0c4e4104bdbebaa01e6f
  1. kernel/
  2. kernel-2.4/
  3. squashfs-tools/
  4. README