Commit Graph

1031 Commits

Author SHA1 Message Date
Wieland Hoffmann 3523ca7da4 flock: Change the 'exit status' man page section to make more sense
Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
2014-01-20 12:50:55 +01:00
Karel Zak 7b040214b5 build-sys: fstrim depends on libmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-17 15:01:49 +01:00
Karel Zak 39c758d140 lscpu: sort NUMA nodes to keep output human readable
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14 13:59:34 +01:00
Carlos Maiolino c0cbd92344 mount: update man page ext3/4 mount options
Add missing mount options to ext3 and ext4 filesystems. This also
remove resize option information from the man page.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-13 15:05:49 +01:00
Karel Zak bc5ddf0c00 fallocate: prefer FALLOC_FL_* flags from libc headers
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-13 14:53:18 +01:00
Karel Zak 1a38ad5c32 dmesg: fix --raw zero timestamp for kmsg
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1049438
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07 17:41:42 +01:00
Lubomir Rintel 4da21e374e unshare: Add possibility to add mapping into root user in user namespace
This makes it very convenient to use make use of privileged actions
on CONFIG_USER_NS enabled kernels, without having to manually tinker
with uid_map and gid_map to obtain required credentials (as those
given upon unshare() vanish with call to execve() and lot of userspace
checks for euid==0 anyway).

Usage example:

$ unshare --uts
unshare: unshare failed: Operation not permitted

$ unshare --user --uts
[nfsnobody@odvarok ~]$ hostname swag
hostname: you must be root to change the host name

$ unshare -r --uts
[root@odvarok util-linux]# hostname swag
[root@odvarok util-linux]#

[kzak@redhat.com: - move code to map_id()
                  - use all-io.h
                  - add paths to pathnames.h]

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07 11:04:42 +01:00
Karel Zak e9074a167c lscpu: support discontinuous NUMA nodes
lscpu fails to print proper NUMA node values in a system with
discontinuous nodes. This patch adds support by creating a nodeidx
array to map node numbers.

Based on patch from Madhavan Srinivasan <maddy@linux.vnet.ibm.com>.

Reported-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 16:48:44 +01:00
Karel Zak 5f68593d7a losetup: remove warning for unsupported -e and -E
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 09:08:40 +01:00
Karel Zak 961d69f799 losetup, mount: remove --pass-fd at all
The option is unsupported since v2.23, let's cleanup man pages and
code to remove it at all.

Reported-by: "Dale R. Worley" <worley@alum.mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 09:02:36 +01:00
Ville Skyttä d640dd9421 man: Syntax and spelling fixes.
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2014-01-06 08:55:09 +01:00
Karel Zak 31e93a55be mount: add note about "noauto" to --all description
References: https://bugzilla.redhat.com/show_bug.cgi?id=1039905
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-12 11:41:07 +01:00
Benno Schulenberg d6bbe8044b textual: small inprovements to usage and man page of fstrim
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-12-12 11:10:53 +01:00
Karel Zak e05a3400e7 fstrim: de-duplicate list of filesystems
Reported-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-11 17:01:23 +01:00
Karel Zak 36c370cbf1 fstrim: add --all to discard all filesystem
* read /proc/self/mountinfo to get filesystems
 * ignore net and pseudo filesystems
 * ignore unaccessible filesystems (over mounted by another FS)
 * read disk sysfs queue/discard_granularity to detect is discard support
 * call FITRIM ioctl
 * silently ignore EOPNOTSUPP (for example LUKS without discard) and ENOTTY
   (for example vfat) errors

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-10 16:40:31 +01:00
Karel Zak a60fa93cb7 fstrim: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-10 11:36:50 +01:00
Phillip Susi fb724eef6d mount man page cleanups
Fowarding this patch submitted by Bjarni Ingi Gislason
<bjarniig@rhi.hi.is> to deb bug #674595.
2013-12-02 11:07:07 +01:00
Phillip Susi c4b8d43d1d mount.8: fix grammar
Switch "A unbindable" to "An unbindable"

Reported-by: Regid Ichira <regid23@nt1.in>
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2013-12-02 10:59:36 +01:00
Sami Kerola f614b73c0e losetup, agetty: remove unnecessary if's before free()
Reference: http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/useless-if-before-free
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-12-02 10:59:20 +01:00
Karel Zak d41acf740e umount: fix umount by tag for non-roots
$ umount LABEL=foo

currently does not work for non-root users as umount uses the
LABEL= as a path in sanitize_path().

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-19 17:55:12 +01:00
Karel Zak 6751f0627d mount: make NAME=value tags usable for non-root
The libmount does not care if we set source or target, it's able to
swap it, but the mount.c function sanitize_paths() does not work as
expected if we set NAME=value as target. It means that

 $ mount LABEL=foo

does not work for non-root users (since 51e3530cdc, v2.24).

This patch also checks if source or target is specified more
than once.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-19 17:44:21 +01:00
Phillip Susi 2a7b920fd1 mount: fix man mount page type
Slight grammatical error in the mount man page

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2013-11-19 14:46:13 +01:00
Karel Zak de81a77dea setpriv: simplify usage()
Let's keep usage() simple and details in the man page. The current
brief description in usage() seems confusing for some users.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-19 14:42:22 +01:00
Karel Zak c07f86e7ac unshare: add more hints about mount namespaces to the man page
There is also idea (by Lennart) to add --propagation=[shared|private|slave|off]
to unshare(1), but it seems unnecessary and too complex as everyone can call
mount(8) after unshare(1) to setup a proper namespace.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-18 12:50:27 +01:00
Phillip Susi 9167f4c2e8 mount: correct mount man page default iso9660 permission
The mount man page said the default permissions are read for
everyone, but it is in fact, read and execute.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2013-11-14 12:29:28 +01:00
Alexander Troosh 4f64286321 lscpu: support non sequentially numbering of CPUs
lscpu don't work correctly on my system with:

 $ cat /sys/devices/system/cpu/possible
 0-1,4-5,8-9,12-13

[kzak@redhat.com: - coding style,
                  - add commit message
                  - add real_cpu_num() macro,
                  - fix functions where we need idx as well as CPU number]

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-05 12:46:03 +01:00
Theodore Ts'o 8883945957 blkdiscard: BLKSSZGET fills in an int, not a uint64
Reported-by: Jason Cipriani <jason.cipriani@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-11-04 14:58:47 +01:00
Karel Zak 5875c50658 mount: improve -s man mage info
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-31 10:44:33 +01:00
Karel Zak a7a5c47005 setpriv: use LC_ALL
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-18 11:38:02 +02:00
Karel Zak 999ac5e2ab nsenter: unshare: use LC_ALL
Reported-by: Trần Ngọc Quân <vnwildman@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-18 11:38:02 +02:00
Benno Schulenberg 4e1991ac5c docs: tweak formatting and grammar of the ipcrm man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:31 +02:00
Benno Schulenberg 87ec43b671 docs: tweak wording and formatting of unshare and nsenter man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:31 +02:00
Benno Schulenberg b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Rafael Ferreira 38aa2fa946 cytune: fix glush typo in cytune
Signed-off-by: Rafael Ferreira <rafael.f.f1@gmail.com>
2013-10-09 14:48:47 +02:00
Benno Schulenberg 9c47f25e8d losetup: cut the remaining little block of help text into slices too
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-09 11:40:08 +02:00
Benno Schulenberg 47481cbd01 textual: standardize some "cannot read" and "seek failed" error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-09 11:37:38 +02:00
Benno Schulenberg ce0e6110b6 wdctl: pluralize one thrice-repeated message
Also put in one hard space, to keep text and number separated when
the translated string should be too long.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08 15:27:36 +02:00
Benno Schulenberg 5b831eb199 wdctl: gettextize and pluralize one forgotten message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08 15:27:36 +02:00
Benno Schulenberg 4df288452e textual: properly use uppercase in certain abbreviations
Reported-by: Petr Písař <petr.pisar@atlas.cz>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08 15:27:28 +02:00
Karel Zak 00963eac1c libmount: (docs) make it obvious how we call mount.<type> helpers
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-07 14:42:09 +02:00
Karel Zak dbbf839586 lscpu: cleanup DMI code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-02 14:07:32 +02:00
Karel Zak 6d707c1d68 lscpu: check strchr() result [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-01 17:29:51 +02:00
Karel Zak bbff089058 lscpu: don't pass null pointer to string functions [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-01 17:26:33 +02:00
Karel Zak a7d5202b5e losetup: don't require 512-byte aligned offsets
Kernel aligns the device size, but the offset where the device starts
is not required to be aligned.

 # losetup --offset 32 -f file.img

is just fine, the final size of the look device will be (in sectors)

  (backing_file_size - offset) >> 9

so we have to do the same in userspace when we check for successful
set capacity ioctl.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-01 15:52:11 +02:00
Yuri Chornoivan 0d0d12adf8 Fix various typos 2013-09-28 13:33:59 +03:00
Karel Zak 726f9fbf46 umount: provide more helpful error message
non-root user on device that is not mounted:

 $ umount /mnt/flash
 umount: /mnt/flash: umount failed: Operation not permitted

this is true, because we cannot evaluate permissions as there is no
entry in mtab, but users expect something more helpful -- for example

 umount: /mnt/flash: not mounted

References: https://bugs.archlinux.org/task/31647
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-27 10:06:44 +02:00
Karel Zak 71e87708b9 mount: add notes about UUIDs to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-26 15:42:54 +02:00
Karel Zak 64e6c3bb25 mount: fix repeating words in the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-26 11:03:20 +02:00
Davidlohr Bueso e065a597d6 lscpu: report cpu min mhz
The lscpu tool only shows the current and max CPU frequencies, however,
in many scenarios this is not enough. If there are energy saving situations
(like some CPUs being idle, or not fully used) the cpugov can lower this value.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
2013-09-25 11:13:35 +02:00
Karel Zak 082479c582 lscpu: use TT_FL_FREEDATA for tt table
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:59 +02:00