From 1f2342c6e89280a21c2e1c665803aae0e42185cb Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 10 Aug 2020 16:16:39 +0200 Subject: Add a "--stat" option to rdsquashfs This commit adds a --stat option to rdsquashfs that dumps a lot of information about and inode that tunred out to be usefull in debugging. Signed-off-by: David Oberhollenzer --- bin/rdsquashfs/rdsquashfs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin/rdsquashfs/rdsquashfs.c') diff --git a/bin/rdsquashfs/rdsquashfs.c b/bin/rdsquashfs/rdsquashfs.c index 78f54ba..1c11afa 100644 --- a/bin/rdsquashfs/rdsquashfs.c +++ b/bin/rdsquashfs/rdsquashfs.c @@ -111,6 +111,10 @@ int main(int argc, char **argv) case OP_LS: list_files(n); break; + case OP_STAT: + if (stat_file(n)) + goto out; + break; case OP_CAT: if (!S_ISREG(n->inode->base.mode)) { fprintf(stderr, "/%s: not a regular file\n", -- cgit v1.2.3