From 4aa2036040da3d0c88be4546a57a11d020e9f064 Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Fri, 28 Mar 2025 15:28:23 +0100 Subject: [PATCH] Ticket #4678: `usqfs` parser ignored first 4 lines of the file listing Signed-off-by: Yury V. Zaytsev --- src/vfs/extfs/helpers/usqfs.in | 4 +--- tests/src/vfs/extfs/helpers-list/data/usqfs.output | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vfs/extfs/helpers/usqfs.in b/src/vfs/extfs/helpers/usqfs.in index 06fda708cd..7741ff9c1b 100644 --- a/src/vfs/extfs/helpers/usqfs.in +++ b/src/vfs/extfs/helpers/usqfs.in @@ -2,7 +2,7 @@ # # Squash file system # -# tested to comply with unsquashfs version 4.2 (2011/02/28)'s output +# tested to comply with the output of unsquashfs version 4.6.1 (2023/03/25) SQUASHFS="${MC_TEST_EXTFS_LIST_CMD:-unsquashfs}" AWK="@AWK@" @@ -13,8 +13,6 @@ mcsqfs_list () { $SQUASHFS -d "" -lls "$1" | $AWK ' { - if (NR < 5) - next split($2, a, "/") file_type=substr($1,1,1) file_size=file_type == "c" || file_type == "b" ? 0 : $3 diff --git a/tests/src/vfs/extfs/helpers-list/data/usqfs.output b/tests/src/vfs/extfs/helpers-list/data/usqfs.output index a9840191a3..7913c802c8 100644 --- a/tests/src/vfs/extfs/helpers-list/data/usqfs.output +++ b/tests/src/vfs/extfs/helpers-list/data/usqfs.output @@ -1,3 +1,7 @@ +drwxr-xr-x 1 235 2024-09-23 14:34:00 +drwxr-xr-x 1 778 2024-09-23 14:34:00 /bin +lrwxrwxrwx 1 7 2024-09-23 14:34:00 /bin/ash -> busybox +-rwxr-xr-x 1 205 2024-09-23 14:34:00 /bin/board_detect -rwxr-xr-x 1 327717 2024-09-23 14:34:00 /bin/busybox lrwxrwxrwx 1 7 2024-09-23 14:34:00 /bin/cat -> busybox lrwxrwxrwx 1 7 2024-09-23 14:34:00 /bin/chgrp -> busybox