getopt: add reference to /usr/share/docs to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
runuser: update man page, add note about -l vs. -p

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount: (deprecated) fix typo tailed->failed

Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
Replace .ti operations with equivalent .RS/.RE pairs.

This change makes automatic lifting to XML-DocBook possible, and
should enable generation of better-quality HTML from these pages.
Replace .IP o with .IP \(bu, using the [nt]roff bullet character.

This will improve the quality of generated HTML. There is a cost,
which is that most terminal emulators will just display the bullet
as a (less visible) dot.  An alternative to this change would be
to use a * character for the bullet.
Remove another .ti for .RS/.RE, and remove a .TP that broke list parsing.
Re-layout a FILES section in the traditional style.
Restore use of correct alternation syntax using { | }.

This is required in order for ther synopsis to be translated into the
corresponding XML markup.
Fix broken list syntax.

Bodiless .TP entries and unterminated .TP lists interfere with page
parsing.

Signed-off-by: Karel Zak <kzak@redhat.com>
eject: unlock door before issuing CDROMEJECT command

If user has inserted a disc into the drive, the drive will normally be
locked. When using eject command to eject the drive, we need to unlock
the door first, or the CDROMEJECT command will fail.

Though the 2nd attmpt to eject the drive with eject_scsi will succeed,
it actually does two things: first to unlock the door and then to eject
the tray, both with the SG_IO ioctl. The problem is, Linux SCSI driver
keeps track of if a device is in locked state or not, if we go with
SG_IO to do the unlocking, the driver will not be aware of the unlocking
and would think the drive is locked while actually it has already been
unlocked by the first SG_IO command.

Fix this by issuing a unlock door command before the CDROMEJECT command
in cdrom_eject. Prior to this fix, the following output is expected when
there is a disc inside:

[aaron@aaronlu util-linux-2.22.2]$ eject -v /dev/sr0
eject: device name is `/dev/sr0'
eject: /dev/sr0: mounted on /run/media/aaron/CD_ROM
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: is removable device
eject: /run/media/aaron/CD_ROM: unmounting
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command failed
eject: /dev/sr0: trying to eject using SCSI commands
eject: SCSI eject succeeded

After this fix, the following output is expected:
[aaron@aaronlu util-linux-2.22.2]$ ./eject -v /dev/sr0
lt-eject: device name is `/dev/sr0'
lt-eject: /dev/sr0: mounted on /run/media/aaron/CD_ROM
lt-eject: /dev/sr0: is whole-disk device
lt-eject: /dev/sr0: is removable device
lt-eject: /run/media/aaron/CD_ROM: unmounting
lt-eject: /dev/sr0: trying to eject using CD-ROM eject command
lt-eject: CD-ROM eject command succeeded

And the SCSI device's locked state is correct now.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
fdisk: add support for the MicroBlaze architecture

Add support to fdisk for the MicroBlaze architecture.

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
mkfs.bfs: fix 64-Bit and endian problems

[kzak@redhat.com: - use cpu_to_leXX() macros rather than htoleXX()]

Signed-off-by: Karel Zak <kzak@redhat.com>
mount: fix mistaken word and some grammar in man page of mount

Reported-by: Krzysztof Żelechowski <giecrilj@stegny.2a.pl>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
agetty: fix a kill/erase error in man page and improve clarity

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
findmnt: test for fstype/options/maj:min before source and target

This change allows to exclude for example NFS mountpoint:

  findmnt --fstab --target /mnt/foo --type nonfs

to stall on a stalled nfs mount.

Signed-off-by: Karel Zak <kzak@redhat.com>
renice: exit with non-zero value when arguments cause warnings

This commit also fixes potential error counter wrap, which theoretically
could make command to exit with a success when it internally failed just
correct amount of times.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
exec_shell: add a license and touch up func def

When this file was created, the standard license header was missed.
Add it using the same one from unshare.c.

The noreturn attribute is not needed since we include the header
which has it on the prototype.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
findmnt: make udev usage more robust

 $ findmnt -rn --target /home/kzak/.bashrc -o UUID

uses libudev to ask for UUID, unfortunately /home/kzak is DM device
and libudev expects sysfs-like names (e.g. dm-0). We have to convert
the name to kernel devname.

Signed-off-by: Karel Zak <kzak@redhat.com>
findmnt: avoid unused parameter warning

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Fixes "getty: unrecognized option '--loginpause'"

Usage incorrectly stated --loginpause is a valid option, where instead --login-pause is.

Also --no-hostname --> --nohostname.