Commit Graph

902 Commits

Author SHA1 Message Date
Karel Zak 78cdc25415 build-sys: add --disable-cytune
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:27:31 +02:00
Karel Zak 1461094c14 lscpu: add Model name
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 14:29:53 +02:00
Jeff Mahoney 293714c0d1 loopdev: sync capacity after setting it
I recently tried to mount an hfsplus file system from an image file with
a partition table by using the loop offset and sizelimit options to specify
the location of the file system.

hfsplus stores some metadata at a set offset from the end of the partition,
so it's sensitive to the device size reported by the kernel.

It worked with this:

But failed with this:

/dev/loop0: [0089]:2 (<imagefile>), offset 32768, sizelimit 102400000
/dev/loop1: [0089]:2 (<imagefile>), offset 32768, sizelimit 102400000

/proc/partitions shows the correct number of blocks to match the sizelimit.

But if I set a breakpoint in mount before the mount syscall, I could see:
102400000
102432768

The kernel loop driver will set the gendisk capacity of the device at
LOOP_SET_STATUS64 but won't sync it to the block device until one of two
conditions are met: All open file descriptors referring to the device are
closed (and it will sync when re-opened) or if the LOOP_SET_CAPACITY ioctl
is called to sync it. Since mount opens the device and passes it directly
to the mount syscall after LOOP_SET_STATUS64 without closing and reopening
it, the sizelimit argument is effectively ignroed. The capacity needs to
be synced immediately for it to work as expected.

This patch adds the LOOP_SET_CAPACITY call to loopctx_setup_device since
the device isn't yet released to the user, so it's safe to sync the capacity
immediately.

[kzak@redhat.com: - port to the current git HEAD,
                  - use uint64_t]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09 14:32:50 +02:00
Sami Kerola f014c1c259 docs: remove repeated words [checkmans.sh]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:48 +02:00
Sami Kerola 49c6c4f1e9 docs: mount.8: make propagation flags adjustable [checkmans.sh]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:46 +02:00
Sami Kerola 69d00b75df setarch: clean up usage()
Requested-by: Karel Zak <kzak@redhat.com>
References: http://marc.info/?l=util-linux-ng&m=136516351523680&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:17:05 +02:00
Karel Zak e442ab76b5 fsfreeze: add note about atime to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-08 13:32:16 +02:00
Sami Kerola 5d1607e260 setarch: add option to list settable architectures
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 14:03:07 +02:00
Sami Kerola ac56e5558e lscpu: fix error message
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:06 +02:00
Sami Kerola 114ade3d1b losetup: allow -j option argument to be relative path
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:03 +02:00
Sami Kerola 5543aaad23 fsfreeze: tell user when mandatory option is not specified
This commit also removes use of internal magic values by replacing them
with a enum definition.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:56:00 +02:00
Sami Kerola 963ac50734 dmesg: fix usage() output consistancy
Possible facilities and levels are meant to be printed to same file as
the rest of the usage output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-05 13:55:57 +02:00
Karel Zak 8d8ea18ea7 docs: remove repeated words
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:35:30 +02:00
Karel Zak 49ebda9b89 rtcwake: add --auto to usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:19:13 +02:00
Karel Zak d58adea4bd readprofile: reorder options in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:16:02 +02:00
Karel Zak 0ca4988c37 readprofile: add --counters to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 13:13:10 +02:00
Karel Zak 6d402bbedc mount: add --read-write to man page 2013-04-05 12:32:34 +02:00
Karel Zak 81009d7255 mount: add --show-labels to man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:19:40 +02:00
Karel Zak edd82b9c99 setarch: normalize man page formatting
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 11:49:37 +02:00
Karel Zak b3eff5dd74 lscpu: make /proc/sysinfo usage more robust [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-27 15:59:40 +01:00
Karel Zak e36aad2139 lscpu: remove dead code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-27 15:01:41 +01:00
Karel Zak 3c7fbc82da flock: possible pointer dereferences [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-27 14:40:42 +01:00
Karel Zak 09e092ad5c rtcwake: clean up usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-26 12:14:31 +01:00
Karel Zak 7528fae9e9 include/pathnames: rename _PATH_ADJPATH to _PATH_ADJTIME
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-26 11:45:45 +01:00
Karel Zak 3a2f3e82bb rtcwake: add --adjfile command line option
... for better compatibility with hwclock.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-26 11:16:12 +01:00
Karel Zak fcc0413a12 mount: improve --move error message on shared trees
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-25 15:29:30 +01:00
Karel Zak e80d46b0d9 mount: fix typos in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 23:56:35 +01:00
Karel Zak b4770708d5 build-sys: don't use nested BUILD_*
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 13:11:09 +01:00
Karel Zak 5724b74dd8 hwclock: cleanup _() usage in synchronize_to_clock_tick_rtc()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 08:56:15 +01:00
Karel Zak ab8f402952 hwclock: don't confuse users with select() timeout warning
Reported-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-21 08:51:22 +01:00
Karel Zak 7d8ea9df69 ipcs: fix compiler warning [clang -Wuninitialized]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-20 15:20:47 +01:00
Karel Zak 16ef36f783 docs: add TB to list of supported suffixes
Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 18:31:07 +01:00
Karel Zak aa192520d3 dmesg: use $PAGER for --human output, add --nopager
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 14:05:24 +01:00
Karel Zak f0a3a1caac dmesg: add --human
* enable --reltime
 * enable --color
 * a little bit cleanup main()

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 12:38:28 +01:00
Karel Zak 5aaee63cdf dmesg: more colors, more fun
* colorize subsystem prefix
 * colorize time
 * colorize by keywords (now "segfault" only)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 12:28:32 +01:00
Joseph Parmelee d53f8ecfbf hwclock: make hwclock leap-second-aware
Attached is a patch file leap_seconds.patch against util-linux-2.22.2
that allows leap seconds to be included in hwclock --show or --hctosys.
The current code uses the default UTC zonefile in reading the hardware
RTC with mktime().  This zonefile usually does not include leap
seconds.  As of this date there have been a total of 25 leap seconds
added since the epoch (start of 1970).  This is particularly a problem
for systems using ntp to maintain their system clocks because ntp does
take leap seconds into account.  A user can specify a leap-second-aware
zonefile via /etc/localtime.  By defining the environment variable
TZUTC, mktime() can be induced to use a matching UTC zonefile that
includes leap seconds.  The default behavior (TZUTC undefined) is
unchanged.

Regards,

Joseph Parmelee
jparmele at wildbear.com
2013-03-18 10:31:32 +01:00
Karel Zak 27abd80948 arch: remove the command, deprecated since 2.13, use coreutils version
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-14 12:22:11 +01:00
Karel Zak d4543f843d fsfreeze: check for collision between options
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-13 13:07:32 +01:00
Karel Zak 7de20424b7 fsfreeze: clean up usage(), add -V
- clean up usage()
 - add -V,--version
 - print usage() if not action specified
 - update man page

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-13 12:32:30 +01:00
Karel Zak 907624ebb0 flock: use include/timer.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-13 12:13:55 +01:00
Karel Zak 880c4045e5 flock: use strtotimeval() from libcommon
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-13 11:52:34 +01:00
Mike Frysinger 2eefe5170a unshare: tweak style
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-04 12:28:37 +01:00
Mike Frysinger 47535d77d2 unshare(1): delete empty NOTES section
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-04 12:28:36 +01:00
Karel Zak 9b80bef687 readprofile: fix --reest (--reset) typo
Reported-by: Branislav Blaskovic <notifications@github.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-04 12:25:47 +01:00
Karel Zak 6f7bce8651 umount: add note about namespaces too --all-targets
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-27 11:23:33 +01:00
Karel Zak 4eb49f6392 umount: add --all-targets
The same source (whole filesystem or filesystems subvolume) could be
mounted on more targets (mountpoints). For example bind mounts or
btrfs sub-volumes.

If you want to detach the source device from the system then you need
to unmount all the mountpoints.

 umount --all-targets <device|mountpoint>

provides this functionality. This option could be used together with
--recursive. Then all nested mountpoints within the filesystem are
unmounted too. For example:

 umount --recursive --all-targets /dev/sdb1

should be a way how to make the device unmounted at all.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-26 14:50:26 +01:00
Karel Zak fd2b0ce5d7 umount: improve --recursive docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-25 11:17:27 +01:00
Karel Zak 39edf68139 mountpoint: don't hardcode paths
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-14 15:46:06 +01:00
Karel Zak eff79ceb0b lscpu: don't read cpuid on non-live systems
Reported-by: Luis Aranguren <pizzaman@hotmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-14 15:38:08 +01:00
Zbigniew Jędrzejewski-Szmek 1e3832bfd1 nsenter: fix errors in manpage
- spell abbreviations with capital letters
- fix the names of a few options and files

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
2013-02-14 14:43:49 +01:00