util-linux/misc-utils
Michal Suchanek 39f5af2598 libblkid: open device in nonblock mode.
When autoclose is set (kernel default but many distributions reverse the
setting) opening a CD-rom device causes the tray to close.

The function of blkid is to report the current state of the device and
not to change it. Hence it should use O_NONBLOCK when opening the
device to avoid closing a CD-rom tray.

blkid is used liberally in scripts so it can potentially interfere with
the user operating the CD-rom hardware.

[kzak@redhat.com: add O_NONBLOCK also to:
                  - wipefs
                  - blkid_new_probe_from_filename()
                  - blkid_evaluate_tag()]

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-11-06 09:55:49 +01:00
..
.gitignore chkdupexe: remove, deprecated for years 2013-03-14 13:34:11 +01:00
Makemodule.am Merge branch 'hardlink' of https://github.com/rudimeier/util-linux into hardlink 2019-02-06 13:55:20 +01:00
blkid.8 cleanup: Remove some spurious spaces 2019-10-01 13:01:43 +02:00
blkid.c libblkid: open device in nonblock mode. 2019-11-06 09:55:49 +01:00
cal.1 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
cal.c po: remove possibility to translate static option arguments 2019-08-24 09:29:52 +01: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 findmnt: (verify) ignore passno for XFS 2019-06-12 11:03:23 +02:00
findmnt.8 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
findmnt.c findmnt: fix filters use on --list 2019-05-29 17:59:33 +02: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 misc-utils/getopt.1: minor corrections to the manual 2018-04-06 13:10:23 +02:00
getopt.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
hardlink.1 hardlink: fix bad formatting in hardlink.1 2019-05-31 11:57:29 +02:00
hardlink.c hardlink: avoid uninitialized variables [clang scan] 2019-05-23 12:12:07 +02:00
kill.1 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
kill.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
logger.1 logger: (man) add info about rewrite and authors 2019-01-29 15:59:41 +01:00
logger.c logger: make code more robust for static analyzer [clang scan] 2019-05-23 12:14:10 +02:00
look.1 look: use WORDLIST environment variable to find word list 2017-08-21 10:48:20 +02: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: never fallback to udev/blkid on --sysroot 2019-10-29 13:12:18 +01:00
lsblk.8 lsblk: update man description of -f / --fs for current columns 2019-10-17 13:51:02 +02:00
lsblk.c lsblk: read also GROUP,OWNER and MODE from dumps 2019-10-15 13:08:09 +02:00
lsblk.h lsblk: read also GROUP,OWNER and MODE from dumps 2019-10-15 13:08:09 +02:00
lslocks.8 lslocks: add --output-all option 2018-05-03 19:56:20 +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 cleanup: Remove some spurious spaces 2019-10-01 13:01:43 +02: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: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
rename.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02:00
test_uuidd.c misc: replace magic number 37 with UUID_STR_LEN 2017-09-05 11:49:21 +02:00
uuidd.8.in build: use --runstatedir instead of --localstatedir 2017-07-31 15:24:46 +02:00
uuidd.c misc: consolidate version printing and close_stdout() 2019-04-16 15:14:13 +02: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: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
whereis.c whereis: make subdirs scan more robust 2019-05-23 13:53:00 +02:00
wipefs.8 wipefs: postpone BLKRRPART until all is done 2018-06-11 12:36:32 +02:00
wipefs.c libblkid: open device in nonblock mode. 2019-11-06 09:55:49 +01:00