Commit Graph

1542 Commits

Author SHA1 Message Date
Karel Zak 1ab7abacce zramctl: fix typo
Reported-by: Rafael Fontenelle <rffontenelle@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-21 11:21:27 +01:00
Mike Frysinger e4520bf20f mount: allow nofail to silence ENOMEDIUM cases
Allow people to use nofail to ignore empty cd/dvd drive errors.

URL: https://bugs.gentoo.org/559356
Reported-by: William Hubbs <williamh@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-01-21 10:50:20 +01:00
Karel Zak 5b033bfd85 chrt: make man page more structured
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-20 14:30:52 +01:00
Boris Egorov faebeb86e5 hwclock: fix format specifier [cppcheck]
[sys-utils/hwclock-rtc.c:435]: (warning) %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'.
2016-01-19 12:59:12 +06:00
Boris Egorov 01b63fcca2 readprofile: add scanf field width limits [cppcheck]
[sys-utils/readprofile.c:301]: (warning) scanf without field width limits can crash with huge input data.
[sys-utils/readprofile.c:322]: (warning) scanf without field width limits can crash with huge input data.
2016-01-19 12:59:12 +06:00
Yuriy M. Kaminskiy 5dc625b669 lsns: fix failure after zombie process
(At least on kernel 3.16), stat("/proc/${pid_of_zombie}/ns/mnt") returns
-ENOENT, as a result lsns stops scanning processes prematurely.
2016-01-18 10:08:02 +01:00
Karel Zak 7ebbb9918e fstrim: add reference to blkdiscard
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-13 13:20:43 +01:00
Peter Hoeg 1a2e4a94fc fstrim: systemd timer units should be WantedBy=timers.target
[kzak@redhat.com: - this configuration is recommended by systemd docs]

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-12 10:30:36 +01:00
Karel Zak fbed7e09f8 hwclock: change audit message
The preferred layout is name=value for audit messages.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1296278
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-07 13:23:24 +01:00
Osamu Aoki 7054d8a6c7 mount.8: Add documentation of overlay mount options
[kzak@redhat.com: - add more information, change formatting]

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-05 13:27:15 +01:00
W. Trevor King dd62675a87 lsns: Fix "lowers" -> "lowest" typo in --help for COL_PID
The process-selection logic is in add_process_to_namespace:

  if (!ns->proc || ns->proc->pid > proc->pid)
    ns->proc = proc;

so it's just selecting the lowest PID.

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-01-05 12:03:18 +01:00
Ruediger Meier eeae448805 blkdiscard: don't report "zero range" at the end
We want to address the case that we have printed the last useful
stats line already within the loop. Avoiding an additional line
"Discarded 0 bytes ..." at the end.

Note there is a behavior change now for the edge cases "-v -l 0" and
"-v -o blksize" where we don't print any stats line anymore. But actually
it's correct, we never make any BLKDISCARD syscall with zero range.
Perhaps we should return error in these cases to help people who always
want to parse stats output on success.

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-12-09 18:23:29 +01:00
Ruediger Meier a3e91e2646 blkdiscard: fix stats reporting (off by one)
CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-12-09 18:23:29 +01:00
Ruediger Meier 0e76536579 blkdiscard: fix timeval comparison inclusive usecs
We will see if this makes our "--step" tests reliable.

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-12-09 18:23:29 +01:00
fREW Schmidt 100a3ab516 Fix subtle typo 2015-12-07 14:16:30 -08:00
Benno Schulenberg 5330b97e94 lsns: improve formatting and wording of the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-12-04 11:20:00 +01:00
Sukadev Bhattiprolu bd9b94d12a lscpu: Print physical cpu information
lscpu currently prints information for CPUs configured in the system.
In case of KVM or other virtualized guest operating systems, this
refers to the virtual system, and bears no relation to the physical
topology of the system.

It would be useful if lscpu could also display the physical topology
info when available:

	$ ./lscpu
	Architecture:          ppc64le
	Byte Order:            Little Endian
	CPU(s):                16
	On-line CPU(s) list:   0-15
	Thread(s) per core:    1
	Core(s) per socket:    1
	Socket(s):             16
	NUMA node(s):          1
	Model:                 IBM pSeries (emulated by qemu)
	Hypervisor vendor:     KVM
	Virtualization type:   para
	L1d cache:             64K
	L1i cache:             32K
	NUMA node0 CPU(s):     0-15
	Physical sockets:      2		<<< New
	Physical chips:        4		<<< New
	Physical cores/chip:   4		<<< New

For now, physical topology information is available on platforms that
support the following RTAS (Real time abstraction service) call provided
by librtas:

	rtas_get_sysparm(PROCESSOR_MODULE_INFO).

Currently this call is available to the PowerVM (pHYP) guests on PowerPC.
With a patch propoosed to PowerKVM, this RTAS call would also be available
to PowerKVM guests.

Based on input from Nishanth Aravamudan and Karel Zak.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
2015-12-02 11:33:58 +01:00
Karel Zak 0e4f6b2a26 lsns: improve man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-01 17:27:22 +01:00
Karel Zak 8ff3d5d077 lsns: fix usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-01 13:50:51 +01:00
Karel Zak 635493655e lsns: add details to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-01 13:00:14 +01:00
Karel Zak 1880a5781f lsns: sort namespaces, avoid duplicate entries in tree output
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-01 12:31:40 +01:00
Karel Zak 82a437c79d lsns: remove unwanted comment
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-01 11:45:11 +01:00
Karel Zak 1bb4fe24e3 lsns: add man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-01 11:40:51 +01:00
Karel Zak 304fbe8b3c lsns: filter by NS type
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-30 15:55:31 +01:00
Karel Zak 969d3d15aa lsln: allows to list namespace processes
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-30 14:06:05 +01:00
Karel Zak 9dfd601976 lsns: read all processes when --task specified
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-27 14:24:09 +01:00
Karel Zak a52852d37a lsns: add USER and UID
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-27 13:56:31 +01:00
Karel Zak 8a2045620e lsns: new command
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-26 14:09:45 +01:00
Casper Ti. Vector e52b58e627 ctrlaltdel: use reboot() provided by libc, assuming it is 1-adic. 2015-11-19 12:07:04 +01:00
Karel Zak f98d9641a3 losetup: clean up --direct-io
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-19 11:57:05 +01:00
Ming Lei faeef4d2e9 losetup: support list direct io
So that user can see if DIO is set for current loop device.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
2015-11-19 11:27:36 +01:00
Ming Lei 64c3bb3cb7 losetup: support ioctl cmd of LOOP_SET_DIRECT_IO
From v4.4, linux kernel starts to support direct I/O and
AIO to backing file for loop driver, so allow losetup to
enable the feature by using LOOP_SET_DIRECT_IO ioctl cmd.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
2015-11-19 11:27:36 +01:00
Benno Schulenberg 25b3c04f41 lsipc: tweak a few wordings on the manpage
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-11-09 10:03:58 +01:00
Benno Schulenberg 239610b659 dmseg: slightly improve punctuation and formatting of the manpage
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-11-09 10:03:58 +01:00
Sami Kerola a4aeb5bd80 script, hwclock: check file exist with access(3) rather than stat(3)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-09 09:56:14 +01:00
Sami Kerola 8df370d340 swapon: fix stat(3) and open(3) race
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-11-09 09:56:14 +01:00
Karel Zak 803172f63d prlimit: cleanup output units
The change is based on kernel fs/proc/base.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-05 18:59:00 +01:00
Karel Zak 741d478eeb ctrlaltdel: use path.h to read /proc
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-10-27 11:56:51 +01:00
Sami Kerola 82cac34889
ctrlaltdel: display setting when ran without arguments
This is more useful than printing an error.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-10-18 18:03:57 +01:00
Sami Kerola 6e82b1f3ef
docs: update ctrlaltdel.8 man page
Most significant clarification is to tell hard C_A_D is the default in linux
kernel.  Update also kernel reference, and improve readability.

Reference: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/reboot.c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-10-18 18:03:52 +01:00
Sami Kerola 8137c98f83
ctrlaltdel: improve error messaging
Tell user what is wrong rather than print usage().

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-10-18 18:03:47 +01:00
Karel Zak 1cd9d0d746 mount, umount, swapon, fsck, lsblk, findmnt: ignore malformed lines
The libmount provides way how to deal with parsing errors in fstab --
on error callback function is executed and according to the return
libmount manipulate with the malformed line, possible are three
states:

  1/ fatal error; all file ignored              (callback rc < 0)
  2/ recoverable error; malformed line ignored  (callback rc > 0)
  3/ ignore the error                           (callback rc == 0)

The 2/ is the default if no callback specified.

Unfortunately our utils uses 3/. The correct way is to use 2/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-10-15 12:01:48 +02:00
Karel Zak b97edfe731 build-sys: use REALTIME_LIBS
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-10-09 11:31:49 +02:00
Karel Zak 1ceb4077af zramctl: fix lists of the all devices
The command zramctl lists the same stat info for all devices (DATA COMPR TOTAL).

Reported-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-09-24 12:46:21 +02:00
Karel Zak 53650755e0 ipcs: fix ipc_sem_get_limits()
Reported-by: https://github.com/AndrewIrcha
Addresses: e5995acda2 (commitcomment-13200369)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-09-15 09:50:08 +02:00
Andreas Henriksson e8c0003481 hwclock: fix format warning in alpha code
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2015-09-07 08:50:39 +02:00
Karel Zak 2eca78be47 mount: remove XFS from man page, xfsprogs provides xfs(5)
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-09-02 10:56:24 +02:00
Karel Zak e03b613e8d lscpu: fix read_hypervisor_powerpc() logic
We care about /proc/device-tree/compatible content...

The patch also removes unnecessary path_exist(), it seems good enough
to call open() rather than access() + open().

Addresses: https://github.com/karelzak/util-linux/issues/218
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-09-01 12:37:18 +02:00
Karel Zak 0a9e11af22 Merge branch 'master' of https://github.com/yurchor/util-linux
* 'master' of https://github.com/yurchor/util-linux:
  Fix trivial typos
2015-08-26 10:52:49 +02:00
Yuri Chornoivan 75a8e726e9 Fix trivial typos 2015-08-25 20:02:53 +03:00