| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Addresses: https://github.com/karelzak/util-linux/issues/528
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The commit 96cbe362c034305e5f12a912b4247b3321420ee7 forces lsmem to
follow output column for split policy.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Don't force users to go to expert menu to toggle between GPT and PMBR.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
* introduces regressions
* stupid code; parse_kmsg_record() called more than once for each record
This reverts commit 22eb2f0190d8a9850da750641439ccd284ac0bfe.
|
|
|
|
| |
Signed-off-by: Nik Nyby <nikolas@gnu.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
* '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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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, ...).
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The original implementation uses sbin, let's do it too.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| | |
* add --split
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Just to be compatible with another u-l tools.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|