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>
Provide display of filesystem attributes from statvfs(3). These are all
displayed in human readable format.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Using the -w flag with grep actually fought against us here, and hid
some instances where xalloc functions weren't used. Discard it in
favor of an explicit word boundary as a prefix to the function name,
and extend our requirements on the trailing side of the pattern.
This also fixes the few new instances that were overlooked because of
the regex's deficiency.
[kzak@redhat.com: - fix also newfound in findmnt
- remove unnecessary checks after xallocs]
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
My earlier assumption was that scanf_cv_alloc_modifier is unused. This
is not true as pointed out by Karel since it used befoe checking for
libmount. Argh. So instead saying no I add a test to check for glibc
>= 2.7 which provides %m. As of uClibc v0.9.32-rc3 the situation looks
the following:
| git grep _M_SPEC__
|libc/stdio/_vfprintf.c:/* #define __UCLIBC_HAS_PRINTF_M_SPEC__ */
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:# ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:# endif /* __UCLIBC_HAS_PRINTF_M_SPEC__ */
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/old_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/perror.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
And other libc user have to bring their own stuff.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Let developer to choose, case by case, what sort of return value is
best in her code. The xmkstemp() is for users who want file
descriptor as return value of the function, xfmkstemp() will return
FILE pointer.
Proposed-By: Karel Zak <kzak@redhat.com>
CC: Davidlohr Bueso <dave@gnu.org>
Reference: http://marc.info/?l=util-linux-ng&m=133129570124003&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>