It displays filesystem root attached to system, for example
btrfs with two mounted subvolumes:
$ lsblk -oNAME,SIZE,MOUNTPOINTS,FSROOTS /dev/sdc1
NAME SIZE MOUNTPOINTS FSROOTS
sdc1 50M /mnt/A /foo
/mnt/B /bar
Signed-off-by: Karel Zak <kzak@redhat.com>
* add libmount FS to struct lsblk_device
* add new column MOUNTPOINTS (pl.) with multi-line cells to display
all mountpoints relevant for the device
* the old MOUNTPOINT is backwardly compatible and it (usually) displays the
last device mountpoint from /proc/self/mountinfo
For example btrfs with more subvolumes:
$ lsblk -o+MOUNTPOINTS /dev/sdc1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT MOUNTPOINTS
sdc1 8:33 0 50M 0 part /mnt/test /mnt/A
/mnt/test
/mnt/B
Note, in this case MOUNTPOINT displays mount point where is mounted
root of the filesystem.
Signed-off-by: Karel Zak <kzak@redhat.com>
GNU libc's getopt_long(3) have the tradition of not shuffling arguments
to find options when either POSIXLY_CORRECT is defined in environment
variables or '+' prepended in short options. Hence, the current code
base is fine as is fine as is for util-linux built with GNU libc.
However, musl libc only honour POSIX convention when short options
prepended with '+'. musl libc doesn't care about POSIXLY_CORRECT.
Thus, the behaviour of util-linux's getopt(1) that linked with musl-libc
doesn't match with its own documentation.
Let's make sure a '+' is always prepended to short options if
POSIXLY_CORRECT is defined.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
* '2020wk47' of https://github.com/kerolasa/util-linux:
build-sys: sort various lists in configure.ac
mkswap: tell how to fix insecure permissions and owner in warning
lsipc: make default output byte sizes to be in human units
man: add missing backslash to caret printing macro
lscpu: fix variable shadowing
uuidgen: give hint in usage() what uuid namepaces can be used
uuidgen: use errx() rather than fprintf() when priting errors
libuuid: simplify uuid_is_null() check
uuidparse: use uuid type definitions from libuuid header
uuidparse: use libuuid function to test nil uuid
We encode to "safe" strings almost all variables for 'blkid -o udev'
and we need it also for SYSTEM_ID, PUBLISHER_ID, APPLICATION_ID,
BOOT_SYSTEM_ID and recently added VOLUME_SET_ID and DATA_PREPARER_ID.
This change makes blkid from util-linux more compatible with built-in
udevd blkid.
Addresses: https://github.com/karelzak/util-linux/pull/1215 (commit 5cbffdb74f)
Signed-off-by: Karel Zak <kzak@redhat.com>
The shells are very restrictive about variable names, only [:alnum:]
chars are allowed (and alphabetic chars as the first char). The
library will replace "bad" chars with "_". The char '%' at the end is
replaced by _PCT.
Addresses: https://github.com/karelzak/util-linux/issues/1201
Signed-off-by: Karel Zak <kzak@redhat.com>
* pali/multisesssion:
libblkid: udf: add support for unclosed sequential Write-Once media
libblkid: udf: add support for multisession via session_offset hint
libblkid: iso9660: add support for multisession via session_offset hint
libblkid: fix blkid_probe_get_sb() to use hint offset calculation
libblkid: allow to specify offset defined by hint for blkid_probe_get_idmag()
libblkid: detect session_offset hint for optical discs
libblkid: do size correction of optical discs also by last written sector
libblkid: detect CD/DVD discs in packet writing mode
libblkid: overwrite existing hint
libblkid: export blkid_probe_reset_hints()
blkid: add --hint <name>=value
libblkid: add blkid_probe_{set,get}_hint()
* sami/uuidd-work:
uuidd: fix misleading indentation
uuidd: make timeout to take effect when debug is not defined
uuidd: remove unnecessary bulk request size limit
uuidd: add uuidd specific data types that are used in protocol
uuidd: reorder bulk time and random generation code
uuidd: document uuidd protocol
uuidd: override operation type when performing bulk request
uuidd: move option parsing to separate function
uuidd: add command-line option values struct
uuidd: use pid_t type when referring to process id
This is unnecessary, we have ${docsdir}/util-linux which is good
enough for these two getopt examples. I guess the "getopt"
subdirectory is legacy from time getopt has been merged into
util-linux.
Signed-off-by: Karel Zak <kzak@redhat.com>
This dependence is defined by
$ cat /sys/class/pktcdvd/device_map
pktcdvd0 252:0 11:0
Unfortunately, there is not any direct sysfs way how to refer this
relationship in /sys/{block,dev/block}. So, we have to read the
device_map file and then compare device numbers with the list.
$ lsblk /dev/sr0
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
└─pktcdvd0 252:0 1 0B 0 disk
Addresses: https://github.com/karelzak/util-linux/issues/1185
Signed-off-by: Karel Zak <kzak@redhat.com>
The trailing comma made code to compile without issues, but meant all_done()
was called only when --debug was in defined in command-line.
Fixes: 3d6250e96b
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Limiting random query to 1000 uuid's was pointless when the next line will
further restrict upper limit to 63 entries. The 63 entries is what fits to
the uuidd communication buffer with the header.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Use a typedef for types that are sensitive what comes to uuidd protocol
field widths, read write sizes, and related checks.
Proposed-by: Karel Zak <kzak@redhat.com>
Reference: https://github.com/karelzak/util-linux/pull/1196#discussion_r528595794
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Write the data and response length values in same close to order they appear
in protocol. This should make code a little easier to read.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Seeing what can be expected should make it easier to understand what the
code does.
Notice that simply writing down the resposes one can start wondering deeper
questions, such as, why does the time bulk response reply only one uuid
followed by number how many were requested? Was that a some type of TODO
note?
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Relying to single vs bulk requests to be exactly two steps away from each
other was an unnecessary dirty trick.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Moving the option parsing to a separate function will allow moving some
variables from main() heap to be in scope that free them later. That should
make the uuidd to have a little bit smaller runtime memory allocation.
The static long options is changed to be local variable. That should make
it to be part of heap for a bit, until removed. Earlier the variable was in
data segment and permanently in runtime memory. Whether this makes any
impact either way is not entirely clear, but hope is the runtime memory
allocation is tiny bit smaller.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The struct will help seeing where the variable values are coming from. This
will also help upcoming refactoring.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Earlier use of a variable that holds switch enabling boolean to hold process
id was a little bit strange, and not exactly correct. An int should be good
enough to hold any pid, but it is better to be precise and use the type that
is meant for the job.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
As mentioned in 'Generating optimal glyphs' title in the manual page
mentioned in reference:
Where a proper caret (^) that renders well in both a terminal and PDF is
required, use "\(ha".
Using a naked "~" character results in a poor rendering in PDF. Instead
use "\(ti".
Reference: https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* 'whereis' of https://github.com/ferivoz/util-linux:
whereis: extend test case
whereis: filter bin, man and src differently
whereis: do not strip suffixes
whereis: do not ignore trailing numbers
whereis: add --disable-whereis to configure
whereis: add lib32 directories
whereis: support zst compressed man pages
whereis: fix out of boundary read
Consider "s." prefixes for source code files only (even though I do not
know which VCS does that), compression suffixes for manual pages and
strict matching for executables.
Calling "whereis python3" is kind of okay to return python3.8 next to
python3, but python3.8-config is not the same tool as python3.
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
The whereis implementations of FreeBSD, macOS, NetBSD, and OpenBSD do
not strip suffixes. Although whereis is not a POSIX tool and has no
shared standard, even its manual page indicates that the supplied names
are command names.
Commands do not have a suffix on Linux systems.
Stripping suffixes actually leads to issues with tools like fsck.ext4,
since fsck.ext4 is not the same tool as fsck and definitely not the same
tool as fsck.minix.
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
The commands diff and diff3 are so distinct that their manual pages
should not be mixed in whereis output.
Theoretically this works for commands and binaries with links to each
other, e.g. gpg and gpg2, but if gpg is version 1 and gpg2 is version 2
then manual pages do not match either.
Also the while loop does not decrement "i" while incrementing "dp". The
effect of this is that the output of whereis depends on manual pages
being compressed or not.
The easiest solution is to not ignore trailing numbers.
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
Add zst as extension for manual pages. Current version of man-db
supports zst extension out of the box.
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
It seems our putp() based output is not portable as some ncurses
implementations strictly follow POSIX where putp() accepts only
terminfo capability strings and nothing else.
We already use standard stdio.h functions to output terminfo strings
(e.g. for colors). It seems we can do the same for cal(1) to
highlight the current day.
Note that mix putp() and fputs() is bad idea due to different
buffering ways in some cases (see cal.c git log for more details).
This patch also reduces complexity of the code as we can directly
output to stdout without snprintf to string.
Addresses: https://github.com/karelzak/util-linux/pull/1167
Signed-off-by: Karel Zak <kzak@redhat.com>
The library is not distributed and almost all code in this ar(1)
archive is Public Domain or LGPL ... but let's avoid any doubts and do
not mix non-GPL and GPL code there.
Addresses: https://github.com/karelzak/util-linux/issues/1157
Signed-off-by: Karel Zak <kzak@redhat.com>
* do not ignore all empty devices, we need more smart solution
* ignore only loop devices without backing file, for example:
# touch img
# losetup -f img
losetup: img: Warning: file is smaller than 512 bytes; the loop device may be useless or invisible for system tools.
- old version display nothing
- new version:
# lsblk /dev/loop0
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 0B 0 loop
Addresses: https://github.com/karelzak/util-linux/issues/1118
Signed-off-by: Karel Zak <kzak@redhat.com>
If there are several identical disks, disk serial number can help
to distinguish exact drive.
This could be helpful in debugging RAID failures and similar problems.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
The web site "lintian.debian.org" shows some examples of "allows to",
which are changed to "allows one to".
I chose here to use gerund.
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Since commit 5454df9c31 ("rename: check source file access early")
rename fails early for symlinks with non-existing target (regression),
because access() dereferences the link.
From access(2):
"access() checks whether the calling process can access the file pathname.
If pathname is a symbolic link, it is dereferenced."
Thus replace access() with faccessat() and lstat() as fallback,
(as in do_symlink()), that is equivalent for symlink and files.
From fsaccess(2) and stat(2):
"The faccessat() system call operates in exactly the same way as access(),
except for the differences described here.
[...]
If pathname is relative and dirfd is the special value AT_FDCWD, then pathname
is interpreted relative to the current working directory of the calling process
(like access()).
[...]
AT_SYMLINK_NOFOLLOW
If pathname is a symbolic link, do not dereference it:
instead return information about the link itself."
"lstat() is identical to stat(), except that if pathname is a symbolic link, then
it returns information about the link itself, not the file that it refers to."
Testing
-------
1) symlink with existing target
2) symlink with non-existing target
3) non-existing symlink
4) existing file
5) non-existing file
Before:
$ touch file-found
$ ln -s file-found symlink-1
$ ./rename sym symbolic- symlink-1 # XPASS.
$ echo $?
0
$ ln -s file-not-found symlink-2
$ ./rename sym symbolic- symlink-2 # FAIL! REGRESSION.
rename: symlink-2: not accessible: No such file or directory
$ echo $?
1
$ ./rename sym symbolic- symlink-3 # XFAIL.
rename: symlink-3: not accessible: No such file or directory
$ echo $?
1
$ touch file-found
$ ./rename found existing file-found # XPASS.
$ echo $?
0
$ ./rename found existing file-not-found # XFAIL.
rename: file-not-found: not accessible: No such file or directory
$ echo $?
1
After:
$ touch file-found
$ ln -s file-found symlink-1
$ ./rename sym symbolic- symlink-1 # XPASS.
$ echo $?
0
$ ln -s file-not-found symlink-2
$ ./rename sym symbolic- symlink-2 # PASS! REGRESSION FIXED.
$ echo $?
0
$ ./rename sym symbolic- symlink-3 # XFAIL.
rename: symlink-3: not accessible: No such file or directory
$ echo $?
1
$ touch file-found
$ ./rename found existing file-found # XPASS.
$ echo $?
0
$ ./rename found existing file-not-found # XFAIL.
rename: file-not-found: not accessible: No such file or directory
$ echo $?
1
And to test/simulate faccessat()'s EINVAL for AT_SYMLINK_NOFOLLOW
for Mac OS X, per commit 826538bf64 ("rename: skip faccessat()
failure if AT_SYMLINK_NOFOLLOW is not a valid flag"), forced 'if'
to evaluate to false so that lstat() is taken.
It still fails early; the error messages are slightly different
('not accessible' vs. 'stat of ... failed') but still tell same
'No such file or directory'; exit code is the same as well.
$ ./rename sym symbolic- symlink-3 # XFAIL. DIFF MSG/SAME RC.
rename: stat of symlink-3 failed: No such file or directory
$ echo $?
1
$ ./rename found existing file-not-found # XFAIL. DIFF MSG/SAME RC.
rename: stat of file-not-found failed: No such file or directory
$ echo $?
1
Tested on commit 2b41c409e ("Merge branch 'blkd-err' of ...")
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
Source is current git content.
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ././disk-utils/sfdisk.8
troff: backtrace: file '<./disk-utils/sfdisk.8>':67
troff: <./disk-utils/sfdisk.8>:67: warning: trailing space
Input file is ././misc-utils/kill.1
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':133: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: macro 'mF' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'mE' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: bad font number
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':135: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'sP' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':170
troff: <./misc-utils/kill.1>:170: warning: bad font number
Input file is ././sys-utils/ipcs.1
<./sys-utils/ipcs.1>:103 (macro BR): only 1 argument, but more are expected
Input file is ././sys-utils/mount.8
<./sys-utils/mount.8>:68 (macro RB): only 1 argument, but more are expected
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-old.tmac':467: macro 'RB'
troff: backtrace: file '<./sys-utils/mount.8>':68
troff: <./sys-utils/mount.8>:68: warning [p 1, 3.5i]: can't break line
an-old.tmac: <./sys-utils/mount.8>:201 (.RE): warning: extra .RE or .RS is missing before it; "an-RS-open" is 0.
<./sys-utils/mount.8>:453 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:500 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:1050 (macro BR): only 1 argument, but more are expected
Input file is ././sys-utils/setpriv.1
<./sys-utils/setpriv.1>:17 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:154 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:166 (macro BR): only 1 argument, but more are expected
Input file is ././sys-utils/umount.8
<./sys-utils/umount.8>:145 (macro IR): only 1 argument, but more are expected
Input file is ././sys-utils/unshare.1
<./sys-utils/unshare.1>:266 (macro BR): only 1 argument, but more are expected
[kzak@redhat.com: - add .RS to fix extra .RE in mount.8]
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Karel Zak <kzak@redhat.com>
In several pages, there is a consistent wording problem: "another"
where "other" should be used. This wording problem can be
surprisingly confusing for native speakers, especially those
unaware that in some other languages, "another" and "other" can be
expressed with the same word.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Earlier, I patched various pages to consistently use EXAMPLE as a
section heading, rather than EXAMPLES. (At that time, both headings
occurred in util-linux, with roughly equal frequency.)
Since then, I've observed that EXAMPLES is the more common usage
across a large corpus of manual pages. So, in Linux the man-pages
project, I switched to using EXAMPLES also. This patch makes the same
change for util-linux.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
The text describing this option is a little hard to understand.
Improve it.
Cc: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.
In this patch, we ensure that the NOTES, HISTORY, BUGS, and EXAMPLE
sections are always placed near the end of the page, just above
AUTHORS, COPYRIGHT, SEE ALSO, and AVAILABILITY.
One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.
Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
[Apply patch]
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
$ diff a b
$ echo $?
0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.
In this patch, we ensure that the AUTHORS, COPYRIGHT, SEE ALSO, and
AVAILABILITY sections are always placed at the end of the page.
Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
[Apply patch]
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
$ diff a b
$ echo $?
0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The manual pages currently use a multitude of terms--"exit code",
"error code", "return code", "exit code", and so on--when what
is always meant is "exit status" (the POSIX term). This patch fixes
as many of these erroneous terms as I could find.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.
Currently we have EXIT STATUS (18), EXIT CODES (3), RETURN CODE (7),
RETURN CODES (1), or RETURN VALUE (4 instances in pages that document
commands, rather than functions).
Let's standardize on the EXIT STATUS (which is also what is
suggested in man-pages(7), and is the POSIX terminology).
A subsequent patch will clean up corresponding miswordings in
manual page text.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.
Currently we have STANDARDS (3) or CONFORMING TO (6).
Let's standardize on the latter (which is also what is
suggested in man-pages(7)).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.
Currently we have EXAMPLE (10) or EXAMPLES (23).
Let's standardize on the EXAMPLE (which is also what is
suggested in man-pages(7)) and used consistently across
a large number of pages in the Linux man-pages project.
(I realize the choice to go EXAMPLE, rather than EXAMPLES,
may be debatable. If necessary, I'd write a patch that instead
goes the other way, but I'd prefer to follow man-pages(7).)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.
In the Linux man-pages project, I long ago did away with the
AUTHOR(S) section, but I realize some projects like to keep this.
But, let's make sure that the section is consistently titled
across pages. Currently we have AUTHOR (47) or AUTHORS (41).
Let's standardize on the latter (which is also what is
suggested in man-pages(7)).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Using double quotes in .SH lines containing multiple words is unneeded,
and in any case is not consistently done in the util-linux manual pages,
where double quotes are used in only around half of the cases.
(This usage was long ago elminated in the man-pages project, with
no ill effects reported to date.)
Remove these quotes, so that .SH lines are more uniform, in preparation
for some (more easily) scripted doiscovery of consistency problems in
(and possibly global fixes to) the manual pages.
Other than stripping the double quotes, this patch makes no changes to
the content of the manual pages.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* 'cal_column' of https://github.com/utix/util-linux:
cal: Remove todo
cal: Add test, all are checked against ncal
cal: Update man page
cal: Add column mode
cal: Add helper functions for left align
cal: Add weekdays into cal_control
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ././misc-utils/kill.1
<./misc-utils/kill.1>:173 (macro BR): only 1 argument, but more are expected
Input file is ././misc-utils/lsblk.8
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-old.tmac':478: macro 'BR'
troff: backtrace: file '<./misc-utils/lsblk.8>':122
troff: <./misc-utils/lsblk.8>:122: warning: trailing space
Input file is ././sys-utils/mount.8
an-old.tmac: <./sys-utils/mount.8>:2427 (.RE): warning: extra .RE or .RS is missing before it; "an-RS-open" is 0.
Input file is ././sys-utils/unshare.1
<./sys-utils/unshare.1>:176 (macro BR): only 1 argument, but more are expected
<./sys-utils/unshare.1>:181 (macro BR): only 1 argument, but more are expected
<./sys-utils/unshare.1>:240 (macro BR): only 1 argument, but more are expected
<./sys-utils/unshare.1>:246 (macro BR): only 1 argument, but more are expected
Input file is ././term-utils/agetty.8
troff: backtrace: file '<./term-utils/agetty.8>':130
troff: <./term-utils/agetty.8>:130: warning: trailing space
Input file is ././text-utils/more.1
troff: backtrace: file '<./text-utils/more.1>':91
troff: <./text-utils/more.1>:91: warning: macro 'b' not defined
The output from nroff and troff is unchanged, except for the word
"number" in text-utils/more.1, that was missing.
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Lsblk throws the following error for nvmeNcXnY devices.
lsblk: nvme1c1n1: unknown device name
This is because nvmeNcXnY devices are hidden and do not have
the file /sys/block/<nvmeNcXnY>/dev.
Following patch was added
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=d51f05bfecb299a830897106460bf395be440c0a
Which made lsblk read from /sys/block/<nvmeNcXnY>/device/dev
which do exist for nvmeNcXnY devices.
After the above patch, the unknown error goes away.
However, another error is encountered in the very next step.
nvme1c1n1: failed to initialize sysfs handler
This is because lsblk looks for /sys/dev/block/242:1
(nvmeNcXnY major:minor) pathname which usually exists for other
block devices but not for the nvmeNcXnY devices as they are hidden.
Below patch does not even print this error for hidden devices
and exits silently.
[kzak@redhat.com: - add prefix to make sysfs_devname_is_hidden()
usable for /sys dumps
- use the function in initialize_device() more early]
Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
In some cases ID_SERIAL_SHORT isn't provided by libudev, but ID_SERIAL
is. An example of this are virtio devices. See the output of udevadm
info:
P: /devices/pci0000:00/0000:00:06.0/virtio2/block/vdb
N: vdb
S: disk/by-id/virtio-08491434ee711d3420e9
S: disk/by-path/pci-0000:00:06.0
S: disk/by-path/virtio-pci-0000:00:06.0
E: DEVLINKS=/dev/disk/by-id/virtio-08491434ee711d3420e9 /dev/disk/by-path/pci-0000:00:06.0 /dev/disk/by-path/virtio-pci-0000:00:06.0
E: DEVNAME=/dev/vdb
E: DEVPATH=/devices/pci0000:00/0000:00:06.0/virtio2/block/vdb
E: DEVTYPE=disk
E: ID_PATH=pci-0000:00:06.0
E: ID_PATH_TAG=pci-0000_00_06_0
E: ID_SERIAL=08491434ee711d3420e9
E: MAJOR=252
E: MINOR=16
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=1403804
[kzak@redhat.com: - add ID_SERIAL also to get_properties_by_file()]
Signed-off-by: Karel Zak <kzak@redhat.com>
There is seven values but only 6 spaces between them, that why the -1
The value is always used with a minus one, just set it correctly instead
of always fix when used
Signed-off-by: Aurelien LAJOIE <orel@melix.net>
Since v2.34 --list prints devices only once to make the output
user-readable. Unfortunately, it's regression for scripts/applications
where we need to parse lsblk output. So, let's make --pairs and --raw
backwardly compatible with versions before 2.34 and print all hierarchy.
Addresses: https://github.com/ibm-s390-tools/s390-tools/issues/80
Signed-off-by: Karel Zak <kzak@redhat.com>
The logger and rtwake time function changes continue the same fixes as
previous commit - use thread safe functions. The libsmartcols condition
removal is possible because width must be greater than tb->termwidth that is
size_t and cannot be smaller than zero. And remove couple FIXME's that are
old and unlikely ever to get fixed.
Reference: 3160589d86
Signed-off-by: Sami Kerola <kerolasa@iki.fi>