summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* sfdisk: create empty label on 'write' commandKarel Zak2017-11-031-1/+1
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/528 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update default lsmem outputKarel Zak2017-11-032-6/+10
| | | | | | | The commit 96cbe362c034305e5f12a912b4247b3321420ee7 forces lsmem to follow output column for split policy. Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: add note about OFDLCKKarel Zak2017-11-032-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: make --split optional, follow output by defaultKarel Zak2017-11-032-27/+36
| | | | | | | | Let's keep lsmem backwardly compatible (<=v2.30) and create ranges according to the output columns by default. This default behavior may be modified by --split command line option. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: Fix uninitialized structureRoddy Shuler2017-11-031-1/+1
| | | | | | | | Without this, 'sfdisk -d' with certain filenames would lead to reading an 's' from the 'type' field in fdisk_reset_labelitem and cause a crash due to prematurely freeing the 'data.str' field. Signed-off-by: Roddy Shuler <roddy@endlessm.com>
* tests: add fsck.cramfs bad-header testKarel Zak2017-11-022-0/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.cramfs: Fix bus error on broken file system.Tobias Stoeckmann2017-11-021-6/+7
| | | | | | | | | | | | | | | | | The utility fsck.cramfs is prone to a bus error on file systems for big endian systems with non-standard header sizes. While calculating the crc32 checksum, it does not properly handle a possible offset for bootcodes, resulting in out of boundary access of mmap'ed area. You can trigger the issue with the following commands: $ mkdir -p cramfs-poc/root/subdir $ cd cramfs-poc $ mkfs.cramfs -p -N big root cramfs $ echo -ne \\00\\x4c | dd of=cramfs bs=1 seek=518 count=2 conv=notrunc $ fsck.cramfs cramfs Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* sfdisk: allow to disable bootable flag on all partitionsKarel Zak2017-11-022-5/+13
| | | | | | | | | Let use '-' rather than a partition number to disable the bootable flag on all partitions: sfdisk --activate /dev/sdc - Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: allow to use --activate for PMBRKarel Zak2017-11-021-3/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (gpt) make PMBR accessible from main menuKarel Zak2017-11-021-4/+6
| | | | | | Don't force users to go to expert menu to toggle between GPT and PMBR. Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'bash-completion-fsck-find' of ↵Karel Zak2017-11-021-1/+2
|\ | | | | | | | | | | | | https://github.com/kevinoid/util-linux * 'bash-completion-fsck-find' of https://github.com/kevinoid/util-linux: bash-completion: Exclude /dev/fd from fsck find
| * bash-completion: Exclude /dev/fd from fsck findKevin Locke2017-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | When the bash-completion for fsck runs `find -L /dev/ -type b` it descends into /dev/fd after opening '.' as file descriptor 3. This causes find to search through /dev/fd/3/ which includes everything below the current directory, which can take a very long time. To avoid this, prune /dev/fd in the find expression. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* | libfdisk: (sun) fix creation of whole disk partitionMikhail Vorobyov2017-11-021-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | sun_add_partition() allowed the 1st sector to be 0 for the 3rd partition only if that sector was free or if other partitions covered the whole disk. Now it's always allowed for the 1st sector to be set to 0 for the 3rd partition. [kzak@redhat.com: - print info about "wholedisk" before "First sector" dialog for 3rd partition - default to 0 for 3rd partition start sector] Signed-off-by: Mikhail Vorobyov <m.vorobyov@cs.msu.ru> Signed-off-by: Karel Zak <kzak@redhat.com>
* | dmesg: Add --force-prefix optionPrarit Bhargava2017-11-012-60/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel outputs multi-line messages (kernel messages that contain the end-of-line character '\n'). These message are currently displayed by dmesg as [965199.028940] runnable tasks: task PID tree-key switches prio wait-time sum-exec sum-sleep ---------------------------------------------------------------------------------------------------------- The kernel timestamps each of these lines with [965199.028940] and the dmesg utility should do the same. Add the 'force-prefix'/'-p' dmesg option to add decode & timestamp information to each line of a multi-line message. Notes: The new print_record() algorithm stores the decode & timestamp information in buffers. If the force-prefix option is used, the message is split into separate lines and each line is prefixed with the stored decode & timestamp information. The splitting of the message into separate lines is done using strtok() which requires write access to the message buffer (ie, the const message buffer is now copied into a writeable buffer). Successfully tested by me by looking at sysrq-t and sysrq-w output. All known good /tests passed with these changes. [kzak@redhat.com: - use snprintf() - cleanup \n usage (don't count line break to the message text in the parsers and always print \n after the text - add the option to the man page - use --force-prefix for kmsg only, old syslog(2) API splits messages itself - strdup() the message text only on force-prefix] Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/mangle: return size of the decoded bufferKarel Zak2017-11-012-3/+5
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* dmesg: add note about -F format to the man pageKarel Zak2017-10-301-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "dmesg: fragment concatenation"Karel Zak2017-10-301-110/+7Star
| | | | | | | * introduces regressions * stupid code; parse_kmsg_record() called more than once for each record This reverts commit 22eb2f0190d8a9850da750641439ccd284ac0bfe.
* Fix typo in carefulputc.hNik Nyby2017-10-251-3/+3
| | | | Signed-off-by: Nik Nyby <nikolas@gnu.org>
* tests: add LUKS test imagesMilan Broz2017-10-244-0/+13
| | | | | | | Testing image contains only the first 4k sector, so it is not valid, but for blkid it should be enough. Signed-off-by: Milan Broz <gmazyland@gmail.com>
* blkid: Add support for LUKS2 and new LABEL attributes.Milan Broz2017-10-231-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for detection of a LUKS2 superblock. LUKS2 is new version of Linux Unified Key Setup for encrypted block devices. LUKS2 contains a binary header and then JSON area for metadata. Blkid should only parse the binary part, including newly available optional LABEL and SUBSYSTEM fields. LABEL is similar to filesystem label. The SUBSYSTEM field is in principle, just a second label and can be used for specific udev rules (for example if you have some 3rd party system that activates volumes automatically, you can mark devices using this attribute). Both labels are optional. The magic string and UUID location are intentionally on the same offset as LUKS v1, so even unpatched blkid now recognizes LUKS2. Anyway, the code should not parse other versions of the header, so we now explicitly check for header version and support only version 1 and 2. Signed-off-by: Milan Broz <gmazyland@gmail.com>
* chmem: cleanup includesKarel Zak2017-10-231-8/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/path: make path_set_prefix() independent on cpu_set_tKarel Zak2017-10-232-20/+18Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/signames: fix redefinition of 'sys_signame' on OSXKarel Zak2017-10-231-12/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: cleanup if-if codeKarel Zak2017-10-231-3/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/signames: remove signame array from header fileKarel Zak2017-10-233-139/+129Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'kill-child-feature' of https://github.com/nh2/util-linuxKarel Zak2017-10-238-129/+270
|\ | | | | | | | | | | | | | | * 'kill-child-feature' of https://github.com/nh2/util-linux: unshare: Allow passing <signame> to --kill-child unshare: Add --kill-child option. signames: Make input char buffers const kill: Extract signal names into signames.h/signames.c
| * unshare: Allow passing <signame> to --kill-childNiklas Hambüchen2017-10-142-8/+16
| |
| * unshare: Add --kill-child option.Niklas Hambüchen2017-10-143-1/+31
| | | | | | | | | | | | | | | | | | | | | | This allows to conveniently kill the entire process tree below the forked program, a common problem when scripting tasks that need to reliably fully terminate without leaving reparented subprocesses behind. The example added to the man page shows the most common use. Implemented using prctl(PR_SET_PDEATHSIG, ...).
| * signames: Make input char buffers constNiklas Hambüchen2017-10-142-3/+3
| |
| * kill: Extract signal names into signames.h/signames.cNiklas Hambüchen2017-10-145-128/+231
| |
* | build-sys: move rfkill to /usr/sbinKarel Zak2017-10-201-1/+1
| | | | | | | | | | | | The original implementation uses sbin, let's do it too. Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: update lsmemKarel Zak2017-10-203-15/+76
| | | | | | | | | | | | * add --split Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsmem: add --splitKarel Zak2017-10-203-35/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the way how lsmem lists memory ranges is affected by used output columns. It makes it very difficult to use in scripts where you want to use for example only one column ranges=$(lsmem -oRANGE) and in this case all is merged to the one (or two) huge ranges and all attributes are ignored. The --split allows to control this behavior ranges=$(lsmem -oRANGE --split=STATE,ZONES) forces lsmem to list ranges by STATE and ZONES differences. Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsmem: add hint about block merges to the man pageKarel Zak2017-10-202-1/+7
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsmem: improve path_read_xxx() usageKarel Zak2017-10-201-5/+6
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | chmem: cleanup usage()Karel Zak2017-10-201-15/+11Star
| | | | | | | | | | | | Just to be compatible with another u-l tools. Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsmem/chmem: add memory zone awareness to bash-completionAndre Wild2017-10-202-1/+2
| | | | | | | | | | | | | | | | | | This patch extends the valid --output values with ZONES for the lsmem bash-completion, and adds the --zone option for the chmem bash-completion. Signed-off-by: Andre Wild <wild@linux.vnet.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
* | tests/lsmem: update lsmem test with ZONES columnGerald Schaefer2017-10-203-0/+61
| | | | | | | | | | | | | | | | The existing s390 and x86_64 dumps already contain the valid_zones sysfs attribute, so just add a new "lsmem -o +ZONES" test command and update the expected results. Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
* | lsmem/chmem: add memory zone awarenessGerald Schaefer2017-10-204-11/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, valid memory zones can be shown with lsmem, and chmem can set memory online/offline in a specific memory zone, if allowed by the kernel. The valid memory zones are read from the "valid_zones" sysfs attribute, and setting memory online to a specific zone is done by echoing "online_kernel" or "online_movable" to the "state" sysfs attribute, in addition to the previous "online". This patch also changes the default behavior of chmem, when setting memory online without specifying a memory zone. If valid, memory will be set online to the zone Movable. This zone is preferable for memory hotplug, as it makes memory offline much more likely to succeed. Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
* | libmount: use eacess() rather than open() to check mtab/utabKarel Zak2017-10-202-6/+14
| | | | | | | | | | | | | | | | | | The open() syscall is probably the most strong way how to check write accessibility in all situations, but it's overkill and on some paranoid systems with enabled audit/selinux. It fills logs with "Permission denied" entries. Let's use eaccess() if available. Signed-off-by: Karel Zak <kzak@redhat.com>
* | build-sys: release++ (v2.31)Karel Zak2017-10-192-1/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: update v2.31-ReleaseNotesKarel Zak2017-10-191-1/+35
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: update AUTHORS fileKarel Zak2017-10-191-0/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | po: merge changesKarel Zak2017-10-1927-4147/+4165
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | po: update sv.po (from translationproject.org)Sebastian Rasmussen2017-10-191-486/+335Star
| |
* | po: update pt_BR.po (from translationproject.org)Rafael Fontenelle2017-10-191-475/+323Star
| |
* | po: update pl.po (from translationproject.org)Jakub Bogusz2017-10-191-786/+319Star
| |
* | rfkill: fix description name typoSami Kerola2017-10-171-1/+1
| | | | | | | | | | | | | | Commit 7d2a9960ad made gps to look like a GUID Partition Table. Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | blkid: improve man page wordingKarel Zak2017-10-161-2/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | blkid: more info about ambivalent results to the man pageKarel Zak2017-10-161-0/+10
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>