summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* agetty: fix a kill/erase error in man page and improve clarityBenno Schulenberg2013-06-181-12/+12
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* pg.c: Add --help and --versionJari Aalto2013-06-181-2/+15
| | | | | | | [kzak@redhat.com: - use USAGE_{HELP,VERISON} macros] Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix mistaken word and some grammar in man page of mountBenno Schulenberg2013-06-181-12/+11Star
| | | | | Reported-by: Krzysztof Żelechowski <giecrilj@stegny.2a.pl> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* nsenter: Allow selecting the uid and gid to be used in the entered usernsRichard Weinberger2013-06-182-2/+27
| | | | | | | | | | | | Using -S (--setuid) and -G (--setgid) one can select the uid/gid which will be used in the entered user namespace. [kzak@redhat.com: - use setuid/gid unconditionally (always), - update man page] Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: fix -y output for UTF8Karel Zak2013-06-171-8/+12
| | | | | | | | ... in the yearly() function is a static buffer where is not space for multibyte headers. The patch also clean ups function where we initialize headers. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: be robust for empty target/source stringsKarel Zak2013-06-174-17/+36
| | | | | | | | | | * lib/canonicalize.c: don't interpret empty strings as relative paths * libmount: more robust libmnt_table find function and debug messages References: https://bugzilla.novell.com/show_bug.cgi?id=825150 Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: support pseudo PARTUUID= for MBRKarel Zak2013-06-133-1/+14
| | | | | | | | | | | | # blkid /dev/sdb1 dev/sdb1: TYPE="ext2" PARTUUID="54e743a7-01" the PARTUUID is generated from MBR Id and partition number. The same method uses Linux kernel for root=PARTUUID= on systems with MBR. Note that the patch also removes 0x prefix from PTUUID. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: split blkid_parttable_set_id()Karel Zak2013-06-133-6/+12
| | | | | | to avoid things like strcmp(tab->type, "gpt") in generic code. Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: export ID_PART_TABLE_UUIDKarel Zak2013-06-131-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: set PTUUID for GPT and DOSKarel Zak2013-06-132-14/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add functions to set PTUUIDKarel Zak2013-06-132-1/+57
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: make uuid_is_empty() usable for whole libraryKarel Zak2013-06-133-13/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.bfs: fix 64-Bit and endian problemsihno2013-06-131-33/+37
| | | | | | [kzak@redhat.com: - use cpu_to_leXX() macros rather than htoleXX()] Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/eric-s-raymond/util-linuxKarel Zak2013-06-133-29/+47
|\ | | | | | | | | | | | | | | | | | | * 'master' of https://github.com/eric-s-raymond/util-linux: Fix broken list syntax. Restore use of correct alternation syntax using { | }. Re-layout a FILES section in the traditional style. Remove another .ti for .RS/.RE, and remove a .TP that broke list parsing. Replace .IP o with .IP \(bu, using the [nt]roff bullet character. Replace .ti operations with equivalent .RS/.RE pairs.
| * Fix broken list syntax.Eric S. Raymond2013-06-101-1/+1
| | | | | | | | | | Bodiless .TP entries and unterminated .TP lists interfere with page parsing.
| * Restore use of correct alternation syntax using { | }.Eric S. Raymond2013-06-101-2/+2
| | | | | | | | | | This is required in order for ther synopsis to be translated into the corresponding XML markup.
| * Re-layout a FILES section in the traditional style.Eric S. Raymond2013-06-101-5/+12
| |
| * Remove another .ti for .RS/.RE, and remove a .TP that broke list parsing.Eric S. Raymond2013-06-101-8/+11
| |
| * Replace .IP o with .IP \(bu, using the [nt]roff bullet character.Eric S. Raymond2013-06-101-9/+9
| | | | | | | | | | | | | | 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.
| * Replace .ti operations with equivalent .RS/.RE pairs.Eric S. Raymond2013-06-101-4/+12
| | | | | | | | | | This change makes automatic lifting to XML-DocBook possible, and should enable generation of better-quality HTML from these pages.
* | fdisk: add support for the MicroBlaze architectureNathan Rossi2013-06-131-1/+2
| | | | | | | | | | | | Add support to fdisk for the MicroBlaze architecture. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
* | eject: unlock door before issuing CDROMEJECT commandAaron Lu2013-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | agetty: use O_NONBLOCK only for serial lines with CLOCALKarel Zak2013-06-131-5/+7
| | | | | | | | | | | | | | | | | | | | * regression introduced by ef264c830effc91add6da334204215f61eb8515e * also increase sleep when O_NONBLOCK used (grr.. this is so stupid thing, do we really need O_NONBLOCK for the stupid serial lines?) References: https://bugzilla.redhat.com/show_bug.cgi?id=972457 Signed-off-by: Karel Zak <kzak@redhat.com>
* | fdisk: don't use ptes[] in generic codeKarel Zak2013-06-122-3/+5
|/ | | | | | ... the array is MBR specific. Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: improve clarity of some error messagesBenno Schulenberg2013-06-075-11/+11
| | | | | Reported-by: Petr Písař <petr.pisar@atlas.cz> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cal: fix few type mismatchesSami Kerola2013-06-071-6/+6
| | | | | | Sloppiness from commit e44fe4712140774b677de466affc31e0581ee335. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: reduce stream checking when closing read-only file descriptorSami Kerola2013-06-071-4/+1Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: simplify new line detection and impossible testSami Kerola2013-06-071-5/+4Star
| | | | | | | | | | | The new line detection is earlier using only '\n' so there should not be need to search for '\r' later. The detection whether allocated address is pointing to null seems to be unnecessary. Assuming xmalloc() returned valid address space the address should never be 0. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: stop adding new line at the end when input does not have itSami Kerola2013-06-073-2/+7
| | | | | | | | | | When the rev(1) is executed twice outcome is expected to be exactly what it was originally. That includes not adding new line at the end of the output. The oneliner below demonstrates earlier issue. $ printf "abc\n123" | rev | rev Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add lscpu max mhz to manual and bash completionSami Kerola2013-06-072-1/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lscpu: add max MHz value to make cpu governor effects more visibleSami Kerola2013-06-071-1/+25
| | | | | | | | | The existing 'CPU MHz' is usually dynamic value, which CPU governor changes up on needs of CPU demand. Assuming lscpu is used to gather information to a hardware inventory the dynamic value is misleading. For inventing the maximum MHz value is more sensible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib: remove unused codeSami Kerola2013-06-071-10/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: slightly correct the man page of columnBenno Schulenberg2013-06-071-10/+11
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: normalize the formatting of man pages for nsenter and unshareBenno Schulenberg2013-06-072-81/+79Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: fix several typos and angular brackets in messagesBenno Schulenberg2013-06-076-21/+21
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: harmonize some loop-device error messagesBenno Schulenberg2013-06-071-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* mount: (deprecated) fix typo tailed->failedYuri Chornoivan2013-06-071-1/+1
| | | | Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
* su: fix exit status if terminated by signalOndrej Oprala2013-06-072-15/+50
| | | | | | | [kzak@redhat.com: - add comment] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: improve grammar and consistency of comments in login.cBenno Schulenberg2013-06-071-85/+77Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: tiny alphabetical and grammatical tweakBenno Schulenberg2013-06-071-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize the spelling of "superuser"Benno Schulenberg2013-06-074-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize synopsis for login, and improve an error messageBenno Schulenberg2013-06-071-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* runuser: update man page, add note about -l vs. -pKarel Zak2013-06-071-0/+1
| | | | | Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: use TCSANOW to remove HUPCLKarel Zak2013-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fedora 19, kernel 3.9, systemd 204, telnetd with socket activation. login(1) code: ttt.c_cflag &= ~HUPCL; tcsetattr(0, TCSAFLUSH, &ttt); close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ vhangup(); signal(SIGHUP, SIG_DFL); strace : ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B9600 opost isig icanon echo ...}) = 0 close(0) = 0 close(1) = 0 close(2) = 0 --- SIGHUP {si_signo=SIGHUP, si_code=SI_KERNEL} --- --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} --- +++ killed by SIGTERM +++ It seems we get SIGHUP (and SIGTERM from systemd) before vhangup(). The problem occur sometimes. I guess it's because TCSAFLUSH is not applied immediately, so it would be probably better to use TCSANOW to make the code more robust. References: https://bugzilla.redhat.com/show_bug.cgi?id=962145 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: don't remove ECHOCTL from c_lflagKarel Zak2013-06-031-4/+2Star
| | | | | | | | It's really unexpected that arrows keys move cursor when agetty/login asks for login name or password. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=969458 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: update man page and usage()Karel Zak2013-06-032-22/+23
| | | | | | | | - baud_rate is optional - agetty has been rewritten 2 years ago, so don't blame original authors in the man page Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: more robust options string parsingKarel Zak2013-05-302-2/+4
| | | | | | | | | # mount -o=rw /dev/sdb /mnt/test mount: libmount/src/optmap.c:212: mnt_optmap_get_entry: Assertion `namelen' failed. Aborted (core dumped) Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=968786 Signed-off-by: Karel Zak <kzak@redhat.com>
* su: ignore --preserve-environment, it's mutually exclusive to --loginKarel Zak2013-05-292-0/+6
| | | | | | Addresses: http://bugs.gnu.org/10317 Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: small coding style changesKarel Zak2013-05-291-8/+7Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: cleanup usage()Karel Zak2013-05-291-15/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>