util-linux/misc-utils
Ritika Srivastava c8487d854b lsblk: Ignore hidden devices
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>
2020-05-14 15:48:26 +02:00
..
.gitignore getopt: use examples installation directory in man page 2020-02-15 15:24:01 +00:00
Makemodule.am getopt: use examples installation directory in man page 2020-02-15 15:24:01 +00:00
blkid.8 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
blkid.c docs: improve size arguments description in --help output 2020-02-05 11:01:36 +01:00
cal.1 cal: (man) make -w, -m and --iso relation more obvious 2020-01-03 12:04:00 +01:00
cal.c [clang-tidy] do not use else after return 2020-04-20 13:20:59 -07:00
fincore.1 docs: try to find broken man references and fix them 2019-08-26 19:43:40 +01:00
fincore.c cleanup: Remove some spurious spaces 2019-10-01 13:01:43 +02:00
findfs.8 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
findfs.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
findmnt-verify.c [clang-tidy] do not use else after return 2020-04-20 13:20:59 -07:00
findmnt.8 man pages: Add a comma after "e.g." and "i.e." 2019-12-17 12:32:43 +01:00
findmnt.c [clang-tidy] fix wrong *cmp usage 2020-04-20 13:21:00 -07:00
findmnt.h misc-tools/findmnt: add --pseudo, --real filters 2018-05-10 11:58:30 -05:00
getopt-parse.bash getops: make --a-long option work again 2017-05-16 14:54:41 +02:00
getopt-parse.tcsh getops: improve getopt-parse.bash example 2016-07-27 16:08:43 +01:00
getopt.1.in getopt: use examples installation directory in man page 2020-02-15 15:24:01 +00:00
getopt.c [clang-tidy] do not use else after return 2020-04-20 13:20:59 -07:00
hardlink.1 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
hardlink.c [clang-tidy] fix wrong *cmp usage 2020-04-20 13:21:00 -07:00
kill.1 docs: kill.1 add note about shell-internal kill implementations 2020-03-22 09:37:41 +00:00
kill.c [clang-tidy] do not use else after return 2020-04-20 13:20:59 -07:00
logger.1 man pages: Add a comma after "e.g." and "i.e." 2019-12-17 12:32:43 +01:00
logger.c various: fix more lgtm scan warnings 2020-02-20 20:18:46 +00:00
look.1 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
look.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
lsblk-devtree.c lsblk: fix -E segfault 2019-07-15 12:28:26 +02:00
lsblk-mnt.c lsblk: rename blkdev_cxt to lsblk_device 2018-12-07 12:32:57 +01:00
lsblk-properties.c lsblk: Fall back to ID_SERIAL 2020-05-04 11:21:01 +02:00
lsblk.8 lsblk: fix -P regression from v2.34 2020-02-25 15:31:23 +01:00
lsblk.c lsblk: Ignore hidden devices 2020-05-14 15:48:26 +02:00
lsblk.h lsblk: add PARTTYPENAME column 2019-12-04 12:38:57 +01:00
lslocks.8 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
lslocks.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
mcookie.1 docs: try to find broken man references and fix them 2019-08-26 19:43:40 +01:00
mcookie.c docs: improve size arguments description in --help output 2020-02-05 11:01:36 +01:00
namei.1 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
namei.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
rename.1 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
rename.c [clang-tidy] do not use else after return 2020-04-20 13:20:59 -07:00
test_uuidd.c misc: replace magic number 37 with UUID_STR_LEN 2017-09-05 11:49:21 +02:00
uuidd.8.in man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
uuidd.c [clang-tidy] do not use else after return 2020-04-20 13:20:59 -07:00
uuidd.rc.in build: use --runstatedir instead of --localstatedir 2017-07-31 15:24:46 +02:00
uuidd.service.in uuidd: Add hardening settings to uuidd.service 2018-11-29 10:37:08 +01:00
uuidd.socket.in build: use --runstatedir instead of --localstatedir 2017-07-31 15:24:46 +02:00
uuidgen.1 misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
uuidgen.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
uuidparse.1 Fix man page typos 2018-08-16 11:09:15 +02:00
uuidparse.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
whereis.1 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers 2019-12-17 12:32:43 +01:00
whereis.c [clang-tidy] do not return in void functions 2020-04-19 14:03:21 -07:00
wipefs.8 wipefs: fix man page --no-headings short option 2020-05-06 15:18:52 +02:00
wipefs.c docs: improve size arguments description in --help output 2020-02-05 11:01:36 +01:00