summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lsmem: make output more compatible with another utilsKarel Zak2018-04-051-6/+1Star
| | | | | | | We do not use placeholders (e.g. "-") for missing data in libsmartcols utils, just use empty space in output. Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: remove unused variableKarel Zak2018-04-051-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update JSON outputsKarel Zak2018-04-043-50/+50
| | | | | | It does not contains extra space after ":" separator anymore. Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: consolidate column types for JSON and qsort()Karel Zak2018-04-031-24/+47
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: improve JSON support (add types)Karel Zak2018-04-037-10/+75
| | | | | | | This commit add SCOLS_JSON_{NUMBER,STRING,BOOLEAN} to specify column type for JSON output formatting. Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: add choom to TODOKarel Zak2018-03-271-0/+5
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/609 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: remove namei(1) failed lstat testKarel Zak2018-03-272-6/+0Star
| | | | | | | | The strerror() output is is nothing stable and may be different on another systems. It would be possible to use sed(1) to unify the output, but it seems overkill in this case. Signed-off-by: Karel Zak <kzak@redhat.com>
* closestream: remove dummy function __fpending()Sami Kerola2018-03-271-9/+7Star
| | | | | | | | Exclude __fpending() from build when function is not available. This is more obvious than adding a dummy function and expecting compiler to eliminate it as dead code. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add cal(1) TODO itemsKarel Zak2018-03-271-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* namei: provide more usable error message on lstat() errorKarel Zak2018-03-271-4/+5
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/608 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2018-03-2741-6/+142
|\ | | | | | | | | | | | | * 'master' of https://github.com/pali/util-linux: tests: Add tests for FAT32 labels blkid: Encode any field which starts with LABEL in same way as LABEL field libblkid: vfat: Change parsing label in special cases
| * tests: Add tests for FAT32 labelsPali Rohár2017-11-2539-0/+134
| | | | | | | | | | | | | | | | | | | | These FAT32 images were generated for FAT label test suite in October 2017. Now blkid reports same FAT32 label as MS-DOS 6, 7 and Windows 98, XP, 10. For more information about test result see email: https://www.spinics.net/lists/kernel/msg2640891.html Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
| * blkid: Encode any field which starts with LABEL in same way as LABEL fieldPali Rohár2017-11-251-1/+1
| | | | | | | | | | | | | | This applies also for LABEL_FATBOOT which contains bytes according to DOS code page and therefore does not contain valid UTF-8 sequence. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
| * libblkid: vfat: Change parsing label in special casesPali Rohár2017-11-251-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use only label from the root directory and do not fallback to the label stored in boot sector. This is how MS-DOS 6.22, MS-DOS 7.10, Windows 98, Windows XP and also Windows 10 behave. Moreover Windows XP and Windows 10 do not touch label in boot sector anymore, so removing FAT label on those Windowses leads to having old label still stored in boot sector (which MS-DOS and Windows fully ignore). * Label entry "NO NAME" in root directory is treated as label "NO NAME" instead of empty label. In root directory it has no special meaning. String "NO NAME" has a special meaning (empty label) only for label stored in boot sector. * Label from the boot sector is now stored into LABEL_FATBOOT field. So if there are applications which depends or needs to read this label, they have ability. After this change LABEL always correspondent to the label from the root directory and LABEL_FATBOOT to the label stored in the boot sector. If some of those labels is missing or is not present (e.g. "NO LABEL" in boot sector) then particular field is not set. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* | tests: update column(1) space-separator testKarel Zak2018-03-271-6/+6
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | column: fix leading space characters bugKarel Zak2018-03-274-38/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug has been introduced during column(1) rewrite. The function read_input() need to skip leading space only temporary to detect empty lines, but the rest of the code has to use the original buffer (line). I've tried to fix one of the symptoms by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa (alter), but this solution is unnecessary and too complex. Changes: * don't ignore leading space * remove unnecessary stuff introduced by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa * fix regression test with incorrect separator Addresses: https://github.com/karelzak/util-linux/issues/575 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: add to column(1) TODOKarel Zak2018-03-261-0/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libmount: include sys/mount.h only if necessaryKarel Zak2018-03-222-4/+9
| | | | | | | | | | Addresses: https://github.com/systemd/systemd/issues/8507 Signed-off-by: Karel Zak <kzak@redhat.com>
* | fstrim: cleanup includesKarel Zak2018-03-221-4/+4
| | | | | | | | | | | | | | | | | | * HAVE_SYS_FS_H is incorrect (should be HAVE_LINUX_FS_H) * linux/fs.h cannot be included together with sys/mount.h as the both files define MS_* constants. The libmount.h includes sys/mount.h now. Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: (docs) fix section nameKarel Zak2018-03-211-1/+1
| | | | | | | | | | | | | | The string "DOS (MBR)" generates filename with "(...)" which is unacceptable by kernel.org stuff. Signed-off-by: Karel Zak <kzak@redhat.com>
* | build-sys: release++ (v2.32)Karel Zak2018-03-212-1/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: update v2.32-ReleaseNotesKarel Zak2018-03-211-3/+51
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: update AUTHORS fileKarel Zak2018-03-211-0/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | po: merge changesKarel Zak2018-03-2127-4044/+3106Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | po: update uk.po (from translationproject.org)Yuri Chornoivan2018-03-211-750/+88Star
| |
* | po: update pt_BR.po (from translationproject.org)Rafael Fontenelle2018-03-211-114/+93Star
| |
* | po: update pl.po (from translationproject.org)Jakub Bogusz2018-03-211-140/+87Star
| |
* | po: update ja.po (from translationproject.org)Takeshi Hamasaki2018-03-211-166/+877
| |
* | po: update fr.po (from translationproject.org)Frédéric Marchal2018-03-211-1163/+975Star
| |
* | po: update fi.po (from translationproject.org)Lauri Nurmi2018-03-211-307/+508
| |
* | po: update es.po (from translationproject.org)Antonio Ceballos Roa2018-03-211-113/+87Star
| |
* | po: update cs.po (from translationproject.org)Petr Písař2018-03-211-111/+94Star
| |
* | tests: use libtool to execute with valgrindKarel Zak2018-03-211-0/+1
| | | | | | | | | | | | | | | | The libtool based build system uses scripts rather than real binaries in $top_builddir. It's necessary to use libtool --mode=execute to call valgrind for the real binary (from .libs/). Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: update lsmemKarel Zak2018-03-201-2/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsmem: fix total online/offline memory calculationGerald Schaefer2018-03-201-6/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lsmem currently calculates the total online/offline memory by iterating over all lsmem->blocks. Depending on the lsmem options, there may be only one lsmem->block, because all sysfs memory blocks could be merged into one. In this case, the calculation is wrong, because the individual online/offline state of the sysfs memory blocks is not preserved, but rather lsmem->blocks[0].state is set to the state of the first sysfs memory block, typically MEMORY_STATE_ONLINE (at least on s390). This means that "Total offline memory" will always be calculated as 0 in such cases, e.g. when using "lsmem --summary", or any options that would merge the table output to one line, like "lsmem -o RANGE": ~# lsmem --summary Memory block size: 1G Total online memory: 20G Total offline memory: 0B Adding the "-a" option shows the real summary, since there is no block merging going on, and the calculation is therefore correct: ~# lsmem -a --summary Memory block size: 1G Total online memory: 16G Total offline memory: 4G Fix this by moving the online/offline calculation into the loop that is iterating over all sysfs memory blocks, instead of iterating over potentially merged lsmem->blocks. Reported-by: Alexander Klein <alkl@linux.vnet.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
* | libmount: (docs) update yearKarel Zak2018-03-201-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: (docs) update yearKarel Zak2018-03-203-3/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: (docs) update yearKarel Zak2018-03-201-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/randutils: don't break on EAGAIN, use usleep()Karel Zak2018-03-201-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code uses lose_counter to make more attempts to read random numbers. It seems better to wait a moment between attempts to avoid busy loop (we do the same in all-io.h). The worst case is 1 second delay for all random_get_bytes() on systems with uninitialized entropy pool -- for example you call sfdisk (MBR Id or GPT UUIDs) on very first boot, etc. In this case it will use libc rand() as a fallback solution. Note that we do not use random numbers for security sensitive things like keys or so. It's used for random based UUIDs etc. Addresses: https://github.com/karelzak/util-linux/pull/603 Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add /proc/swaps libmount parser testKarel Zak2018-03-203-0/+31
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libmount: fix example in docsKarel Zak2018-03-201-1/+1
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/599 Signed-off-by: Karel Zak <kzak@redhat.com>
* | libmount: deallocate on /proc/swaps parse errorKarel Zak2018-03-201-5/+6
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/596 Signed-off-by: Karel Zak <kzak@redhat.com>
* | libmount: make sure we deallocate on parse errorKarel Zak2018-03-201-2/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | fstrim: fix fs.h and mount.h collisionKarel Zak2018-03-202-2/+14
| | | | | | | | | | | | | | | | | | Unfortunately, old version of the file linux/fs.h defines MS_* macros, so the file cannot be included together with sys/mount.h. We include sys/mount.h from libmount.h now. Signed-off-by: Karel Zak <kzak@redhat.com>
* | libmount: make libmount.h more robustKarel Zak2018-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | Let's include sys/mount.h to be sure that our local libmount fallbacks are not used by default to avoid possible conflicts with later included sys/mount.h. Addresses: https://github.com/systemd/systemd/pull/8452 Reported-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/randutils: Do not block on getrandom()Carlo Caione2018-03-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | In Endless we have hit a problem when using 'sfdisk' on the really first boot to automatically expand the rootfs partition. On this platform 'sfdisk' is blocking on getrandom() because not enough random bytes are available. This is an ARM platform without a hwrng. We fix this passing GRND_NONBLOCK to getrandom(). 'sfdisk' will use the best entropy it has available and fallback only as necessary. Signed-off-by: Carlo Caione <carlo@endlessm.com>
* | mcookie: (man) add note about getrandom()Karel Zak2018-03-191-2/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'master' of https://github.com/dirkmueller/util-linuxKarel Zak2018-03-191-6/+6
|\ \ | | | | | | | | | | | | * 'master' of https://github.com/dirkmueller/util-linux: Avoid crash in min/max caculation when cpu#0 being offline
| * | Avoid crash in min/max caculation when cpu#0 being offlineDirk Mueller2018-03-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | When cpu#0 is offline, atof(NULL) is called which causes a segfault or endless loop depending on implementation circumstances. So instead of implicitely assumping that the first cpu is always available, do the presence checks for all including the first one.
* | | mount: (man) be explicit about bind operationKarel Zak2018-03-191-1/+8
| | | | | | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>