Skip to content

Commit e22f0e2

Browse files
committed
mksquashfs: add error message that -options should be after source/output
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
1 parent 63dcc1e commit e22f0e2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

squashfs-tools/mksquashfs.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7429,9 +7429,12 @@ int main(int argc, char *argv[])
74297429
}
74307430

74317431
if(i < 3) {
7432-
if(i == 1)
7433-
mksquashfs_help("mksquashfs: fatal error: no source or output filesystem specified on command line\n\n");
7434-
else
7432+
if(i == 1) {
7433+
if(argc == 1)
7434+
mksquashfs_help("mksquashfs: fatal error: no source or output filesystem specified on command line\n\n");
7435+
else
7436+
mksquashfs_help("mksquashfs: fatal error: options (e.g. -comp) should be specified after source and output filesystem\n\n");
7437+
} else
74357438
mksquashfs_help("mksquashfs: fatal error: no output filesystem specified on command line\n\n");
74367439
}
74377440

0 commit comments

Comments
 (0)