The wall command on AIX supports a "-g" option to limit the message
to a group of users by gid. Add compatibility to the Linux version.
Thanks to Sami Kerola <kerolasa@iki.fi> for an initial skeleton
implementation.
[kzak@redhat.com: - rename max to ngroups
- add free_group_workspace()
- some cosmetic changes]
Reference: http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds6/wall.htm
Signed-off-by: Jim Patterson <jimp@wegrok.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
For example, child process of spamd has
32031 (spamd child) S 32026 32026 32026 0 -1 4210752 338 0 0 0 ...
fscanf("%d %*s %c %d*[^\n]") in read_process() can't parse above as we
expected, because %s only skips non-whitespace. I.e. it parses like
following,
32031 (spamd child) S 32026 32026 32026 0 -1 4210752 338 0 0 0 ...
+---+ +----+ +
%d %*s %c
and returns 2 (pid=32031, state=c).
This fixes it by skipping task->comm part manually.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
By default sfdisk creates partition table when a first partition is
specified, otherwise the device is not modified. This force users to
create at least one partition.
This commit allows to create empty label without partitions if "label:
<name>" header line is specified by script.
The commit also modifies "New situation:" output to list label name
and label identifier.
Addresses: https://github.com/karelzak/util-linux/issues/374
Signed-off-by: Karel Zak <kzak@redhat.com>
Now we use
v2.29-5-g8ffab30 -> 2.29.5-8ffa (libblkid 2.29.5)
instead of
v2.29-5-g8ffab30 -> 2.29.5-8ffa (libblkid 2.29.0)
otherwise the bugfix releases (2.29.1) would look newer that latest HEAD.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Was broken for major releases since b0e6b25e:
$ blkid -V
blkid from util-linux 2.28 (libblkid 2.28., 12-Apr-2016)
Now we also set 0 in this case, like:
$ blkid -V
blkid from util-linux 2.30 (libblkid 2.30.0, 12-Apr-2016)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
As described in pid_namespaces(7), IPC namespaces also
isolate POSIX message queues. Update the unshare(1)
and nsenter(1) pages to clarify that.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
For each namespace that is discussed, add more explicit
references to the corresponding clone(2) flags and
add references to relevant section 7 namespace pages.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
For each namespace that is discussed, add more explicit
references to the corresponding clone(2) flags and
add references to relevant section 7 namespace pages.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The sigvec(3) (not sigvec(2)) page documents ancient BSD APIs.
The right page to cross reference here is sigaction(2),
which documents the modern POSIX APIs.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Some time back, I moved the discussion of scheduling from
sched_setscheduler(2) to a new sched(7) page. Adjust the cross
reference in the taskset(1) page accordingly.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Most pages in util-linux follow the standard convention
of formatting page cross references in bold. Fix the
few exceptions that use italic.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This patch does only the following:
* Order SEE ALSO entries first by section name, then alphabetically
within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
at the end of SEE ALSO lists.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Break the loop as soon as we found the node a memory block belongs to,
it doesn't make sense to continue scanning.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* add missing new options
* remove columns description (for ls-like utils we maintains columns
description only in the --help output)
Signed-off-by: Karel Zak <kzak@redhat.com>
Add a single s390 specific test case to verify that the contents of
various output formats do not change in incompatible way if the
lsmem code is changed.
This is based on a patch from Clemens von Mann.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Move the s390 specific chmem tool to util-linux.
The chmem tool was originally written in perl and is part of the
s390-tools package which can be found here:
https://www.ibm.com/developerworks/linux/linux390/s390-tools.html
Given that the tool is architecture independent, there is no reason to
keep it in an s390 specific repository. It seems to be useful for
other architectures as well.
This patch converts the tool to C and adds it to util-linux, while the
command line options stay compatible. The only exception is the option
"-v" which used to be the short form of "--version". That got changed
to "-V" so it behaves like most other tools contained within
util-linux.
The chmem tool can be used to set memory online or offline. This can
be achieved by specifying a memory range:
Memory Block 19 (0x0000000130000000-0x000000013fffffff) disabled
or by specifying a size where chmem will automatically select memory
blocks:
Memory Block 21 (0x0000000150000000-0x000000015fffffff) disable failed
Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled
Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled
Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled
Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled
or by specifying memory block numbers instead of address ranges:
Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled
Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled
Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled
Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled
This is based on a patch from Clemens von Mann.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Move the s390 specific lsmem tool to util-linux.
The lsmem tool was originally written in perl and is part of the
s390-tools package which can be found here:
https://www.ibm.com/developerworks/linux/linux390/s390-tools.html
Given that the tool is architecture independent, there is no reason to
keep it in an s390 specific repository. It seems to be useful for
other architectures as well.
This patch converts the tool to C and adds it to util-linux, while the
command line options stay compatible. The only exception is the option
"-v" which used to be the short form of "--version". That got changed
to "-V" so it behaves like most other tools contained within
util-linux.
The lsmem tool inspect the contents of /sys/devices/system/memory and
prints a summary output similar to what lscpu does:
RANGE SIZE STATE REMOVABLE BLOCK
0x0000000000000000-0x000000005fffffff 1,5G online yes 0-5
0x0000000060000000-0x000000007fffffff 512M online no 6-7
0x0000000080000000-0x000000013fffffff 3G online yes 8-19
0x0000000140000000-0x000000014fffffff 256M offline - 20
0x0000000150000000-0x000000017fffffff 768M online no 21-23
Memory block size : 256M
Total online memory : 5,8G
Total offline memory: 256M
In order to keep the output small the tool merges subsequent address
ranges where the attributes are identical. To avoid merging of line
the "-a" option can be used.
The lsmem tool also has "--extendend" and "--parsable" option which
can be used to customize the output, e.g. limit the output to
specified columns. This is quite similar to what the lscpu tool does.
This is based on a patch from Clemens von Mann.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Add helper functions which allow to parse hexadecimal numbers.
Based on a patch from Clemens von Mann.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>