C program to emulates file system checking utility (fsck command) using system calls.
Usually fsck command is used for file system consistency check, using system call C program
You can look at the source code of the cut-down versions of e2fsck or fsck_minix in busybox project:
http://git.busybox.net/busybox/tree/e2fsprogs/old_e2fsprogs/e2fsck.c?h=1_23_stable
http://git.busybox.net/busybox/tree/util-linux/fsck_minix.c?h=1_23_stable
I am unable to understand the code, can you guide me through system call
I’m not a teacher
This is not a trivial subject, you need deep understanding of several concepts and if you can’t read the code yet, you can try to improve your reading skills first.