* add strtosize_or_err(), we use strtosize() + err() on many places
* add STRTOXX_EXIT_CODE to overwrite the default EXIT_FAILURE
* remove else-after-noreturn (e.g. if (foo) err(...); else err(...))
* clean up indent...
Signed-off-by: Karel Zak <kzak@redhat.com>
Update the man pages of blkid, wipefs, fallocate, fstrim, losetup
and hexdump to clarify the suffixes for the numerical values of the
offset and size/length arguments regarding KiB=1024 vs KB=1000.
Also mention the ZiB/YiB and ZB/YB suffixes supported by strtosize().
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* remove dependence on lib/fsprobe.c
* reuse already read swap header for --fixpgsz (don't re-read the
header by libblkid)
Signed-off-by: Karel Zak <kzak@redhat.com>
It's overkill to modify unknown paths in a generic function like
canonicalize_path().
for example:
mount -t fuse 'sshfs#marty@thee:/' /media/thee
will be canonicalized to
mount -t fuse 'sshfs#marty@thee:' /media/thee
and this obvious bug.
Reported-by: Martin Panter <vadmium+floss@gmail.com>
This reverts commit 28074a0952.
strtosize() is based on uintmax_t and supports all possible suffixes
(B,M,G,T ...)
Reported-by: Simon de Vlieger <simon@ikanobori.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
The UUID is generated from the modification date in the ISO volume
descriptor. As GRUB 2 is using this definition for the pseudo UUID for
ISO9660 files libblkid would be perfectly compatible with GRUB 2.
Signed-off-by: Andreas Vogel <Andreas.Vogel@anvo-it.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Provide the recursive flag of propagation mounting. Recursive flag could
be used together with propagation flag.
[kzak@redhat.com: - add MS_SILENT to acceptable propagation flags,
- fix new code in libmount too]
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Dong Hao <haodong@linux.vnet.ibm.com>
This patch adds a "-r" option to report statistics for each fsck run.
It gathers the statistics via wait4() and rusage and reports exit
status, system and user CPU time, elapsed wall-clock time and the max
RSS.
[kzak@redhat.com: - rebase to the latest code,
- report all on one line,
- use "real" rather than "elapsed"]
Signed-off-by: Frank Mayhar <fmayhar@google.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount provides all necessary functionality required in fsck for
work with filesystems descriptions.
This patch seems large and invasive, because removes fsck_fs struct,
changes:
- use libmnt to parse fstab
- use libmnt_fs from libmount
- replace "fs->" with mnt_fs_* or fs_* functions
Signed-off-by: Karel Zak <kzak@redhat.com>
Note that lib/tt.c will never truncate columns without TT_FL_TRUNC or
relative column width. So it's fine to set small width for columns
with SIZEs, the defined width is minimal width.
Signed-off-by: Karel Zak <kzak@redhat.com>