Commit Graph

4544 Commits

Author SHA1 Message Date
Sami Kerola 1e0aef8257 raw: add long options and version printing
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola 7c7c8bc53b raw: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola 04874274a5 delpart: align with util-linux coding standards
Add long options and usage function, use gnu errror printing
facilities and validate inputs.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola 7911302085 addpart: align with util-linux coding standards
Add long options and usage function, use gnu errror printing
facilities and validate inputs.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola 72bb1cc932 partx: add --version option
Th commit 8275b7326e added --version to
usage() but not as working option.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola 6a801e1a38 setterm: correct manual page reference
An error from commit faa0548de4

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola efe030d66c findfs: add --version & align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:11 +02:00
Sami Kerola 5cc12c4090 findmnt: add --version & align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:11 +02:00
Sami Kerola 30b61b7bd7 mountpoint: add --version & align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:11 +02:00
Karel Zak f568e7934a hexdump: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:18:54 +02:00
Karel Zak e9e426eb78 losetup: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:18:30 +02:00
Karel Zak 28c710217c fstrim: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:18:18 +02:00
Karel Zak 99727496ed wipefs: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:17:49 +02:00
Karel Zak 3c2662d565 blkid: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:17:36 +02:00
Karel Zak a99c913091 lib/strutils: add strtosize_or_err, clean up
* 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>
2012-03-30 16:11:31 +02:00
Bernhard Voelker d636d6d82a docs: clarify KiB vs. KB in man pages
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>
2012-03-30 15:23:32 +02:00
Karel Zak 916a743891 tools: improve ko-release-* scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 13:44:11 +02:00
Karel Zak fab66da531 blkid: add note about variable tags and devices order.
Reported-by: Michael Conrad <mconrad@intellitree.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-29 15:09:54 +02:00
Karel Zak a36e9a9408 build-sys: move obsolete lib/fsprobe to mount/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-27 12:23:07 +02:00
Karel Zak b5b2c388dc swapon: use directly blkid rather than fsprobe wrapper
* 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>
2012-03-27 12:13:24 +02:00
Karel Zak d2efc7a944 tests: add swapon tests for --fixpgsz and fix signature
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-27 12:11:53 +02:00
Karel Zak 24d741d88a docs: mark udev and list blkid(8) output formats deprecated
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-26 13:09:27 +02:00
Karel Zak b24b8e296e tests: update
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-26 10:25:19 +02:00
Karel Zak 225b804b66 Revert "lib/canonicalize: always remove tailing slash"
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.
2012-03-26 10:08:48 +02:00
Karel Zak 6ad533db97 hexdump: update man page for -n and -s
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-23 18:17:10 +01:00
Karel Zak 71cb4a4f00 tests: update iso tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-21 19:43:49 +01:00
Karel Zak 807e40c655 hexdump: use strtosize() for -n and -s
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>
2012-03-21 19:35:22 +01:00
Andreas Vogel 05a9d5120c libblkid: generate pseudo-UUID for ISO9660 image file
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>
2012-03-21 13:43:35 +01:00
Dong Hao c7b0af96bc mount: fix recursively propagation mounting
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>
2012-03-21 12:35:54 +01:00
Karel Zak 9895daca9c fsck: tiny coding style fix
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 0556def4cd fsck: use gettimeofday() for real elapsed time statistic
and use shorter "rss" rather than "maxrss" keyword in stats output

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Frank Mayhar 5a0da00aec fsck: Add a -r option to report memory and runtime statistics
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>
2012-03-20 11:22:09 +01:00
Karel Zak a7b585eac3 fsck: move to disk-utils directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak ac8f2843ff fsck: coding stype fixes (calloc, err, ...)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 7064679f57 fsck: don't try to call fsck for undefined fs type
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 5894bcd463 fsck: fix coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 7ac166bf20 fsck: remove unnecessary fsck.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 67f09eae5b fsck: use libmount to check for mounted filesystems
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak ce22ccd08c libmount: improve mnt_tables_is_mounted
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 2a24e16e7c fsck: remove string_copy()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak e33b39a8c4 fsck: replace fsprobe with libmount utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:09 +01:00
Karel Zak 2b5051242e fsck: use libmount for filesystem list
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>
2012-03-20 11:22:08 +01:00
Karel Zak 947558f53f fsck: don't duplicate exit code macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:08 +01:00
Karel Zak 70b604b827 include/exitcodes: clean up names, add _EX_ suffix
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:08 +01:00
Karel Zak e50ad21838 include/exitcodes: add FSCK_DESTRUCT alias
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:08 +01:00
Karel Zak 41e32d9f8b fsck: cosmetic changes in coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:22:08 +01:00
Karel Zak 96f3eef55e fdisk: don't print confusing warning on non-partitioned disks
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=740163
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:18:54 +01:00
Karel Zak 451d76463c misc: clenaup SIZE columns in lsblk and findmnt
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>
2012-03-20 11:04:48 +01:00
Karel Zak cd4ed46f98 findmnt: improve --df output
* don't print pseudo-filesystems (except tmpfs)
 * add --all to disable built-in filters
 * don't overwrite --df --output=<list> with default columns

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 10:52:13 +01:00
Karel Zak 1e1df43ca2 libmount: add configfs to pseudofs list
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 10:42:47 +01:00