erofs-utils: dump: Add --cat flag to show file contents
authorJuan Hernandez <jhernand@redhat.com>
Thu, 9 Jan 2025 10:56:11 +0000 (11:56 +0100)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 9 Jan 2025 12:46:00 +0000 (20:46 +0800)
commitb526c0d7da46b14f1328594cf1d1b2401770f59b
tree1d2835f447f48686609c0e7929fb74119ceca178
parent3bd00bf7bd9aab03b1e7e0a36fe608719739ee09
erofs-utils: dump: Add --cat flag to show file contents

This patch adds a new '--cat' flag to the 'dump.erofs' command. When
used it will write to the standard output the content of the file
indicated by the '--path' or '--nid' options. For example, if there is a
'/mydir/myfile.txt' file containg the text 'mytext':

    $ dump.erofs --cat --path=/mydir/myfile.txt myimage.erofs
    mytext

Signed-off-by: Juan Hernandez <jhernand@redhat.com>
Link: https://lore.kernel.org/r/20250109105611.178398-1-jhernand@redhat.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
dump/main.c
man/dump.erofs.1