summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libmount: fix possible mem leak in has_utab_entry() [coverity scan]Karel Zak2015-01-291-3/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix mem leak in do_mount_by_types() [coverity scan]Karel Zak2015-01-292-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: make fdisk_partition_to_string() more robust [coverity scan]Karel Zak2015-01-291-5/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) check return from GUID parser [coverity scan]Karel Zak2015-01-281-3/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: fix possible mem leak [coverity scan]Karel Zak2015-01-281-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: (hfs) avoid overflow [coverity scan]Karel Zak2015-01-281-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix macro redefinition [coverity scan]Karel Zak2015-01-281-2/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/sysfs: use ssize_t for sysfs_readlink() [coverity scan]Karel Zak2015-01-281-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: fix --id fallthrough [coverity scan]Karel Zak2015-01-281-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: deallocate when no cache [coverity scan]Karel Zak2015-01-281-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: check return and robust label usage [coverity scan]Karel Zak2015-01-282-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: check return when read from sysfs [coverity scan]Karel Zak2015-01-281-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: fix mem leak and main_menu_action() logic [coverity scan]Karel Zak2015-01-281-6/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: support unknown partition types in sfdisk scriptsKarel Zak2015-01-282-4/+4
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1183234 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'fix-tests-ppc' of https://github.com/rudimeier/util-linuxKarel Zak2015-01-283-5/+10
|\ | | | | | | | | | | | | * 'fix-tests-ppc' of https://github.com/rudimeier/util-linux: tests: fix fdisk/bsd again for big endian tests: fix swaplabel test for 9a83b03c Revert "tests: simplify and update swaplabel test"
| * tests: fix fdisk/bsd again for big endianRuediger Meier2015-01-261-1/+1
| | | | | | | | | | | | Looks this line was accidentally out-commented in 06d199e8. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: fix swaplabel test for 9a83b03cRuediger Meier2015-01-262-2/+3
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * Revert "tests: simplify and update swaplabel test"Ruediger Meier2015-01-262-4/+8
| | | | | | | | | | | | | | | | | | | | After mkswap refactoring we have still a "minimal swap size" wich depend on PAGE_SIZE. Next commit will fix the test for output changes made in 9a83b03c. This reverts commit b4d27255f24cddbdf3480ca0988dada340abe2d3. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | more: fix repeat search crashSami Kerola2015-01-281-0/+3
| | | | | | | | | | | | | | | | | | Repeating a search for a pattern that did not found made more(1) to crash. To reproduce 'more /etc/services' and search for 'doom'; you will find a service in port 666 - pressing '.' after that result used to cause core dump. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | setarch: fix --listKarel Zak2015-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | $ ./setarch --list . . setarch: no architecture argument specified Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: improve MBR vs. FAT + boot sector detectionKarel Zak2015-01-272-13/+29
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that some systems are able to produce boot sector + MBR with almost valid FAT superblock. The libblkid already checks for FAT magic string, media, correct sector and dir size, etc. -- but all this is not enough. The patch add to FAT prober also MBR detection to make sure that there is no MBR with usable first partition. All this is enabled for whole-disk devices only. first sector (and this is no FAT baby ;-) $ hexdump -C -n 512 /dev/nbd0 00000000 eb 58 90 4d 53 44 4f 53 35 2e 30 00 02 10 16 10 |.X.MSDOS5.0.....| 00000010 02 00 00 00 00 f8 00 00 3f 00 ff 00 00 00 00 00 |........?.......| 00000020 00 00 40 01 f5 27 00 00 00 00 00 00 02 00 00 00 |..@..'..........| 00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000040 80 01 29 c5 a3 06 1a 4e 4f 20 4e 41 4d 45 20 20 |..)....NO NAME | 00000050 20 20 46 41 54 33 32 20 20 20 33 c9 8e d1 bc f4 | FAT32 3.....| 00000060 7b 8e c1 8e d9 bd 00 7c 88 56 40 88 4e 02 8a 56 |{......|.V@.N..V| 00000070 40 b4 41 bb aa 55 cd 13 72 10 81 fb 55 aa 75 0a |@.A..U..r...U.u.| 00000080 f6 c1 01 74 05 fe 46 02 eb 2d 8a 56 40 b4 08 cd |...t..F..-.V@...| 00000090 13 73 05 b9 ff ff 8a f1 66 0f b6 c6 40 66 0f b6 |.s......f...@f..| 000000a0 d1 80 e2 3f f7 e2 86 cd c0 ed 06 41 66 0f b7 c9 |...?.......Af...| 000000b0 66 f7 e1 66 89 46 f8 83 7e 16 00 75 39 83 7e 2a |f..f.F..~..u9.~*| 000000c0 00 77 33 66 8b 46 1c 66 83 c0 0c bb 00 80 b9 01 |.w3f.F.f........| 000000d0 00 e8 2c 00 e9 a8 03 a1 f8 7d 80 c4 7c 8b f0 ac |..,......}..|...| 000000e0 84 c0 74 17 3c ff 74 09 b4 0e bb 07 00 cd 10 eb |..t.<.t.........| 000000f0 ee a1 fa 7d eb e4 a1 7d 80 eb df 98 cd 16 cd 19 |...}...}........| 00000100 66 60 80 7e 02 00 0f 84 20 00 66 6a 00 66 50 06 |f`.~.... .fj.fP.| 00000110 53 66 68 10 00 01 00 b4 42 8a 56 40 8b f4 cd 13 |Sfh.....B.V@....| 00000120 66 58 66 58 66 58 66 58 eb 33 66 3b 46 f8 72 03 |fXfXfXfX.3f;F.r.| 00000130 f9 eb 2a 66 33 d2 66 0f b7 4e 18 66 f7 f1 fe c2 |..*f3.f..N.f....| 00000140 8a ca 66 8b d0 66 c1 ea 10 f7 76 1a 86 d6 8a 56 |..f..f....v....V| 00000150 40 8a e8 c0 e4 06 0a cc b8 01 02 cd 13 66 61 0f |@............fa.| 00000160 82 74 ff 81 c3 00 02 66 40 49 75 94 c3 42 4f 4f |.t.....f@Iu..BOO| 00000170 54 4d 47 52 20 20 20 20 00 00 00 00 00 00 00 00 |TMGR ........| 00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001a0 00 00 00 00 00 00 00 00 00 00 00 00 0d 0a 44 69 |..............Di| 000001b0 73 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 65 00 00 |sk error...Pre..| 000001c0 01 01 0c 3f e0 ff 00 08 00 00 00 f8 3f 01 00 00 |...?........?...| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| MBR: $ hexdump -C -s 446 -n $((512 - 446)) /dev/nbd0 000001be 00 00 01 01 0c 3f e0 ff 00 08 00 00 00 f8 3f 01 |.....?........?.| 000001ce 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001fe 55 aa |U.| Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1182831 Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: add note about zero priority for IDLE and BATCHKarel Zak2015-01-261-2/+2
| | | | | Reported-by: dE <de.techno@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: don't use off_t in public APIKarel Zak2015-01-267-13/+17
| | | | | | | | | | | | It's better to use exact and explicitly defined types (e.g. uint64_t) rather than something like off_t to make code more portable. [reported with gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3)] The patch also fixes one debug message. Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add options map to docsKarel Zak2015-01-263-5/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'timex' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2015-01-262-1/+9
|\ | | | | | | | | * 'timex' of https://github.com/kerolasa/lelux-utiliteetit: logger: check availability of ntp_gettime()
| * logger: check availability of ntp_gettime()Samuel Thibault2015-01-232-1/+9
| | | | | | | | | | | | | | | | Make compilation to work in systems which don't have sys/timex.h and its ntp_gettime(). Reviewed-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Samuel Thibault <sthibault@debian.org>
* | cfdisk: actually translate the table headers and the bottom lineBenno Schulenberg2015-01-261-2/+2
| | | | | | | | | | | | | | The printout of the table headers and the bottomline descriptions were lacking calls to gettext(). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | cfdisk: shorten the help screen to make it fit within 25 linesBenno Schulenberg2015-01-261-14/+7Star
| | | | | | | | | | | | | | | | | | | | When the terminal has less than 32 lines, the new cfdisk ignored the fact that the help-screen text was longer and just skipped printing the remaining lines. Instead of introducing a minipager for the help screen, just condense its text and remove unneeded lines. Now the text occupies just 25 lines, which should fit on most terminals. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | cfdisk: don't mess up the help screen by printing the PO file headerBenno Schulenberg2015-01-261-6/+5Star
| | | | | | | | | | | | | | | | | | Asking for the translation of the empty string ("") produces the header of the PO file corresponding to the current locale, which messes up the help screen. So, don't use empty strings in the array of help strings but (arbitrary) double spaces. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | switch_root: document that maintains /run tooKarel Zak2015-01-261-1/+1
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/144 Signed-off-by: Karel Zak <kzak@redhat.com>
* | textual: fix various minor typosYuri Chornoivan2015-01-263-12/+12
| |
* | Merge branch 'icc-fixes' of https://github.com/rudimeier/util-linuxKarel Zak2015-01-266-8/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'icc-fixes' of https://github.com/rudimeier/util-linux: build: fix printf warnings for icc (-Wformat-security) build-sys: fix UL_SCANF_TYPE_MODIFIER for icc build-sys: free() needs stdlib.h build-sys: avoid icc warnings "ignoring unknown option" tests: python tests should not remove user's LD_LIBRARY_PATH
| * | build: fix printf warnings for icc (-Wformat-security)Ruediger Meier2015-01-213-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Intel compiler complains about printf style function calls with trivial format string and no other arguments. Like this one: ../sys-utils/ipcrm.c(117): warning #2279: printf/scanf format not a string literal and no format arguments err(EXIT_FAILURE, iskey ? _("key failed") : _("id failed"));
| * | build-sys: fix UL_SCANF_TYPE_MODIFIER for iccRuediger Meier2015-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | icc needs -Werror to let %m fail and to avoid this: ../libmount/src/tab_parse.c(61): warning #269: invalid format string conversion Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * | build-sys: free() needs stdlib.hRuediger Meier2015-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | | followup 4f310fae CC: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * | build-sys: avoid icc warnings "ignoring unknown option"Ruediger Meier2015-01-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our macro UL_WARN_ADD could not discover these ones: icc: command line warning #10006: ignoring unknown option '-Wmissing-parameter-type' icc: command line warning #10006: ignoring unknown option '-Wredundant-decls' icc: command line warning #10006: ignoring unknown option '-Wunused-result' icc: command line warning #10006: ignoring unknown option '-Wnested-externs' We need to use AC_LANG_WERROR. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * | tests: python tests should not remove user's LD_LIBRARY_PATHRuediger Meier2015-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LD_LIBRARY_PATH must be preserved like it's done in libtool's temporary wrapper scripts. This problem was noticed when building with Intel's icc (15.0.0): $ make check TS_OPTS="libmount" $ tail tests/diff/libmount/tabfiles-py-parse-mtab [...] +Traceback (most recent call last): + File "/tmp/util-linux/libmount/python/test_mount_tab.py", line 8, in <module> + import pylibmount as mnt +ImportError: libimf.so: cannot open shared object file: No such file or directory ... although libimf.so was in LD_LIBRARY_PATH. NOTE 1: When running root checks "sudo -E" is not enough to preserve LD_LIBRARY_PATH because glibc already removes is. This would work: $ sudo -E env LD_LIBRARY_PATH=$LD_LIBRARY_PATH make check TS_OPTS="--parallel=1" NOTE 2: We also preserve PYTHONPATH which could bring us similar problems if the user has a customized python installation. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | | Merge branch 'opts' of https://github.com/jwpi/util-linuxKarel Zak2015-01-2631-121/+121
|\ \ \
| * | | docs: restore minus symbols in long optsJ William Piggott2015-01-2131-121/+121
| | |/ | |/| | | | | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | | logger: improve usage()Karel Zak2015-01-261-14/+14
| | | | | | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | | docs: fix two "maybe be" duplications in program commentsBenno Schulenberg2015-01-262-21/+16Star
| | | | | | | | | | | | | | | | | | Also improve the grammar of the comments and some neighbours. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | | textual: put option and its description into a single translatable stringBenno Schulenberg2015-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | | Also improve the description: notime, notq, and nohost are literals, not things to be replaced by something else -- so no angular brackets. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | | docs: fix two spellings in man page of loggerBenno Schulenberg2015-01-261-2/+2
| | | | | | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | | ionice: drop the duplicate docstringBenno Schulenberg2015-01-261-2/+0Star
| | | | | | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | | textual: fix spellos and inconsistencies in several program messagesBenno Schulenberg2015-01-269-32/+32
| | | | | | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | | docs: fix grammar and punctuation and typos in 2.26 release notesBenno Schulenberg2015-01-261-37/+37
| | | | | | | | | | | | | | | | | | | | | Also trim some trailing whitespace. Reviewed-by: Peter Cordes <peter@cordes.ca> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | | dmesg: Enable proper indent for messages containing line breaksIngo Brückl2015-01-261-24/+40
|/ / | | | | | | | | | | | | | | | | | | Messages containing line breaks somehow look broken when additional time, facility or level information is displayed, because they partly appear in time/facility/level column. Indent them accordingly. Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: accept Start offset in {B,M,G..}iB in sfdisk scriptsKarel Zak2015-01-203-7/+19
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: (docs) fix typoKarel Zak2015-01-201-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | sfdisk: fix --bytesKarel Zak2015-01-191-4/+6
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>