Skip to content

Commit

Permalink
erofs-utils: introduce fsck.erofs
Browse files Browse the repository at this point in the history
I made a fsck.erofs tool to check erofs filesystem image integrity
and calculate filesystem compression ratio.
Here are options to support now.

fsck.erofs [options] IMAGE
-V      print the version number of fsck.erofs and exit.
-d#     set output message level to # (maximum 9)
-p      print total compression ratio of all files
-c      check if all compressed files are well decompressed

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daeho Jeong <[email protected]>
Signed-off-by: Gao Xiang <[email protected]>
  • Loading branch information
Daeho Jeong authored and hsiangkao committed Nov 9, 2021
1 parent f500db7 commit f440435
Show file tree
Hide file tree
Showing 9 changed files with 657 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ stamp-h1
/mkfs/mkfs.erofs
/fuse/erofsfuse
/dump/dump.erofs
/fsck/fsck.erofs
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ACLOCAL_AMFLAGS = -I m4

SUBDIRS = man lib mkfs dump
SUBDIRS = man lib mkfs dump fsck
if ENABLE_FUSE
SUBDIRS += fuse
endif
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -347,5 +347,6 @@ AC_CONFIG_FILES([Makefile
lib/Makefile
mkfs/Makefile
dump/Makefile
fuse/Makefile])
fuse/Makefile
fsck/Makefile])
AC_OUTPUT
9 changes: 9 additions & 0 deletions fsck/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0+
# Makefile.am

AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = fsck.erofs
AM_CPPFLAGS = ${libuuid_CFLAGS}
fsck_erofs_SOURCES = main.c
fsck_erofs_CFLAGS = -Wall -Werror -I$(top_srcdir)/include
fsck_erofs_LDADD = $(top_builddir)/lib/liberofs.la ${libselinux_LIBS} ${libuuid_LIBS} ${liblz4_LIBS}
Loading

0 comments on commit f440435

Please sign in to comment.