]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Mike Frysinger [Sun, 12 Apr 2015 09:06:51 +0000 (05:06 -0400)]
mkfs: drop hardcoded search path
Rather than maintain a hardcoded search path for looking up tools and
override the user's PATH env setting, respect whatever the user has.
This matches the convention of just about every other tool out there.
It might break on systems that don't have /sbin in their PATH and they
try to run /sbin/mkfs directly, but so be it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Alexey Galakhov [Thu, 16 Apr 2015 15:26:27 +0000 (17:26 +0200)]
hwclock: flush stdout in hwclock -c
This allows using hwclock -c in automated test scripts that parse
its output line-by-line. The standard output is flushed before
each 10 second delay.
Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
J William Piggott [Thu, 23 Apr 2015 23:53:58 +0000 (19:53 -0400)]
hwclock: Remove TZUTC
commit
d53f8ecfbf036eddb2aef737dc0973a613d80ced
introduced the TZUTC environment variable to
facilitate use of the zoneinfo 'right' database.
This was incorrect. Either the TZDIR environment
variable should be used or a system-wide
configuration for the 'right' database should be
used.
See hwclock(8) POSIX vs 'RIGHT' for more details.
TZUTC was undocumented and should be safe to remove.
The commit also caused a regression when using
musl libc, because when TZUTC is unset getenv()
returns a NULL pointer.
Reported-by: Isaac Dunham <ibid.ag@gmail.com>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Karel Zak [Fri, 24 Apr 2015 15:09:17 +0000 (17:09 +0200)]
test_uuidd: add comment
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 13:53:28 +0000 (15:53 +0200)]
test_uuidd: add pid, tid and idx back to object
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 13:01:23 +0000 (15:01 +0200)]
test_uuidd: make objdump more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 12:54:09 +0000 (14:54 +0200)]
test_uuidd: fix include
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 12:47:49 +0000 (14:47 +0200)]
test_uuidd: don't exit on failed pthread_create()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 12:47:09 +0000 (14:47 +0200)]
test_uuidd: don't exit on failed pthread_create()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 12:25:30 +0000 (14:25 +0200)]
test_uuidd: improve readability
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 11:39:17 +0000 (13:39 +0200)]
test_uuidd: cleanup counters names
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 11:35:54 +0000 (13:35 +0200)]
test_uuidd: cleanup pid usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 11:28:12 +0000 (13:28 +0200)]
test_uuidd: cleanup used types
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 24 Apr 2015 10:40:51 +0000 (12:40 +0200)]
test_uuidd: err messages, argv[] parsing and another cleanups
Signed-off-by: Karel Zak <kzak@redhat.com>
Huschaam Hussain [Fri, 24 Apr 2015 09:28:47 +0000 (11:28 +0200)]
tests: add uuidd test program
References: https://bugzilla.redhat.com/show_bug.cgi?id=678306
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 23 Apr 2015 13:08:26 +0000 (15:08 +0200)]
tests: fix sfdisk GPT test
The test uses too large last partition, libfdisk checks this problem
now.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 23 Apr 2015 10:32:36 +0000 (12:32 +0200)]
libfdisk: (gpt) add extra check for First/Last LBA
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 23 Apr 2015 09:37:00 +0000 (11:37 +0200)]
tests: add sfdisk resize tests for GPT
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 23 Apr 2015 09:34:05 +0000 (11:34 +0200)]
libfdisk: (gpt) fix end sector calculation on resize
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 15:15:39 +0000 (17:15 +0200)]
tests: add sfdisk resize regression tests for MBR
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 15:14:28 +0000 (17:14 +0200)]
libfdisk: fix scriptk parser to support alone signs
for example echo "- - - *" | sfdisk /dev/sda1 -N1
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 15:13:48 +0000 (17:13 +0200)]
libfdisk: allow to move start to first usable LBA
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 21 Apr 2015 13:51:45 +0000 (15:51 +0200)]
libfdisk: add warning to resize function
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 21 Apr 2015 12:36:24 +0000 (14:36 +0200)]
libfdisk: support resize operation in fdisk_set_partition()
Note that the resize is not exported by API yet, the only way to use
it is sfdisk-like scripts.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 21 Apr 2015 12:35:18 +0000 (14:35 +0200)]
libfdisk: add fdisk_table_get_partition_by_partno()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 21 Apr 2015 12:32:31 +0000 (14:32 +0200)]
libfdisk: fix script parser to support resize operations
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 21 Apr 2015 12:30:11 +0000 (14:30 +0200)]
libfdisk: don't resize in label drivers
The resize operation has to be implemented on upper layer.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 09:52:24 +0000 (11:52 +0200)]
libfdisk: (gpt) fix LE usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 09:08:05 +0000 (11:08 +0200)]
lib/strutils: fix string_add_to_idarray() int vs. size_t
The function uses "int" as argument, but for array size (and index) is better
to use unsigned type (size_t). If we mix "size_t" in util (e.g. fdisk)
and "int" in lib/strutils.c then result is unexpected behavior on
ppc64.
# sfdisk --list -o DEVICE,START,SIZE /dev/sdb
Disk /dev/sdb: 50 MiB,
52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 32768 bytes
Disklabel type: gpt
Disk identifier:
3B8559DB -33AF-43E9-BEFC-
C331D829B539
lt-sfdisk: libfdisk/src/label.c:178: fdisk_label_get_field: Assertion `id > 0' failed.
The patch cleanup all code to use size_t everywhere.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 08:20:31 +0000 (10:20 +0200)]
fdisk, sfdisk: fix -o <list> backend
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 22 Apr 2015 08:03:12 +0000 (10:03 +0200)]
Merge branch 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux
* 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux:
tests: never use -o pipefail
tests: loop tests, don't call ts_die() with DEVICE parameter
tests: scsi_debug tests, don't call ts_die() with DEVICE parameter
tests: introduce TS_LOOP_DEVS for cleanup
tests: introduce ts_cleanup_on_exit()
Karel Zak [Wed, 22 Apr 2015 07:56:47 +0000 (09:56 +0200)]
Merge branch 'test-fix' of https://github.com/rudimeier/util-linux
Ruediger Meier [Wed, 22 Apr 2015 06:05:47 +0000 (08:05 +0200)]
tests: config.h lives in build directory
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
J William Piggott [Tue, 21 Apr 2015 20:46:23 +0000 (16:46 -0400)]
hwclock: remove dead code
Removes never used #ifdef dead code.
Reported-by: Karel Zak <kzak@redhat.com>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
J William Piggott [Tue, 21 Apr 2015 20:43:41 +0000 (16:43 -0400)]
hwclock: regression fix
Commit
ab8f402952301106ad0bd5c5a51dc8646d1bff64 regression
where synchronize_to_clock_tick_rtc() only returns the correct
value for a select() time out if using debug mode. This caused
hwclock to have invalid output when select() timed out in
normal mode.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Ruediger Meier [Tue, 21 Apr 2015 08:41:01 +0000 (10:41 +0200)]
tests: never use -o pipefail
It was hard to find out that pipefail was the reason why our
test-suite could have random failures for aribtrary tests,
for example the ones which are using ts_device_has_uuid() or
ts_mount().
Bash's pipefall option is evil! It may return error for such a
simple line like this one
$ echo -e "xxx\nyyy" | grep -q "xxx"
because the left echo command will get SIGPIPE when grep exits after
the first match. So the command line above could return an error
eventhough it does exactly what we want.
This patch removes any pipefail from our tests. The funny thing is
that I couldn't find any case where we relied on this feature anyway.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Fri, 17 Apr 2015 08:32:48 +0000 (10:32 +0200)]
sfdisk: don't use BLKRRPART to check loopdev usage
It seesm that kernel always returns EINVAL for BLKRRPART on loop
devices, we call the ioctl to check if nobody else uses the device.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 16 Apr 2015 16:01:32 +0000 (18:01 +0200)]
tests: add old dump for sfdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 16 Apr 2015 15:40:28 +0000 (17:40 +0200)]
sfdisk: accept empty partitions from dump
Old sfdisk uses:
dev/sdc2 : start= 0, size= 0, Id= 0
for undefined MBR partitions. Let's follow this behaviour.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Tue, 14 Apr 2015 12:54:52 +0000 (14:54 +0200)]
tests: fix logger device pathname too long
$TS_OUTDIR may be too long for sockaddr_un.sun_path. Noticed on travis
in distcheck.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 31 Mar 2015 12:35:07 +0000 (14:35 +0200)]
tests: loop tests, don't call ts_die() with DEVICE parameter
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 31 Mar 2015 12:23:30 +0000 (14:23 +0200)]
tests: scsi_debug tests, don't call ts_die() with DEVICE parameter
This was almost useless anyway.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 31 Mar 2015 12:19:40 +0000 (14:19 +0200)]
tests: introduce TS_LOOP_DEVS for cleanup
We are maintaining an array TS_LOOP_DEVS to de-initialize devices
always on exit. Until now there was no cleanup in ts_skip().
The downside is that we can't execute ts_device_init() in a subshell
anymore. The device is returned via global variable TS_LODEV, similar
like we do already in ts_scsi_debug_init().
Tests which don't use ts_device_init() to create loop devices may use
ts_register_loop_device() to get them cleaned up later.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 31 Mar 2015 08:54:56 +0000 (10:54 +0200)]
tests: introduce ts_cleanup_on_exit()
ts_cleanup_on_exit() is always called on exit, e.g. after ts_skip,
ts_die, ts_finalize ...
A first usage example is the cleanup of TS_SUID_PROGS which is now also done
on ts_skip. Later we want to fix some left loop devices.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Tue, 14 Apr 2015 09:52:06 +0000 (11:52 +0200)]
Merge branch 'tests-logger' of https://github.com/rudimeier/util-linux
* 'tests-logger' of https://github.com/rudimeier/util-linux:
travis: install socat >= 1.7.2
tests: add subtests for invalid logger devive
tests: logger/errors does not use --no-act
tests: logger, validate written socket data
tests: logger with socat device
tests: simplify common logger options
logger: --stderr and --no-act turn "auto-errors" on
Karel Zak [Thu, 9 Apr 2015 09:48:07 +0000 (11:48 +0200)]
unshare: allow persisting mount namespaces
We can create a reference (bind mount) to the new namespace after
unshare(2), but it does not make sense to do it within unshared
namespace. (And if I read kernel fs/namespace.c: do_loopback()
correctly than copy mount bind mounts of /proc/<pid>/ns/mnt between
namespaces is unsupported.)
This patch bypass this problem by fork() where parent continue as
usually (call unshare(2), setup another things, etc.), but child
waits for /proc/[ppid]/ns/mnt inode number change (the ino is
changed after parent's unshare(2)) and then it bind mounts the new
namespaces and exit.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 9 Apr 2015 09:34:02 +0000 (11:34 +0200)]
unshare: allow persisting namespaces
For nsenter(1) we already support namespace specification by file
(e.g. bind mount to namespace /proc/[pid]/ns/[type] file). For
example:
# nsenter --uts=/some/path
This patch extends unshare(1) to setup the bind mount for specified
namespace, for example
# touch /some/path
# unshare --uts=/some/path hostname FOO
# nsenter --uts=/some/path hostname
FOO
Note that the problem is mount namespace, because create bind mount
to ns/mount file within unshared namespace does not make sense.
Based on patch from Lubomir Rintel <lkundrak@v3.sk>.
Signed-off-by: Karel Zak <kzak@redhat.com>
Cristian Rodríguez [Fri, 10 Apr 2015 18:57:58 +0000 (15:57 -0300)]
lib/sysfs.c: use fcntl(..F_DUPFD_CLOEXEC) instead of dup(2)
"The two descriptors do not share file descriptor flags (the
close-on-exec flag). The close-on-exec flag for the duplicate descriptor is off"
Karel Zak [Tue, 14 Apr 2015 09:26:54 +0000 (11:26 +0200)]
tests: make libmount python context tests sensitive to USE_LIBMOUNT_FORCE_MOUNTINFO
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 14 Apr 2015 09:26:54 +0000 (11:26 +0200)]
tests: make libmount context tests sensitive to USE_LIBMOUNT_FORCE_MOUNTINFO
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 13 Apr 2015 16:11:38 +0000 (18:11 +0200)]
fdisk: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 13 Apr 2015 15:24:45 +0000 (17:24 +0200)]
fdisk: add --protect-boot
Now fdisk erases the begin of the device when create a new disk label, it seems
like disadvantage for some use-cases.
Reported-by: Jean-Loup 'clippix' Bogalho <clippix@lse.epita.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Mon, 13 Apr 2015 11:29:26 +0000 (13:29 +0200)]
travis: install socat >= 1.7.2
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Fri, 10 Apr 2015 06:28:26 +0000 (08:28 +0200)]
tests: add subtests for invalid logger devive
Note --journald should not complain about invalid sockets.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Thu, 9 Apr 2015 18:14:51 +0000 (20:14 +0200)]
tests: logger/errors does not use --no-act
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Mon, 13 Apr 2015 11:41:10 +0000 (13:41 +0200)]
sfdisk: enable bootbits protection
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
1210428
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 13 Apr 2015 11:40:25 +0000 (13:40 +0200)]
libfdisk: support bootbits protection from (p)MBR
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Thu, 9 Apr 2015 18:14:50 +0000 (20:14 +0200)]
tests: logger, validate written socket data
Actually there should be no data written to the socket because
we are always using --no-act.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Thu, 9 Apr 2015 15:12:34 +0000 (17:12 +0200)]
tests: logger with socat device
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Mon, 13 Apr 2015 10:08:50 +0000 (12:08 +0200)]
sfdisk: improve -N warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 13 Apr 2015 08:56:03 +0000 (10:56 +0200)]
tests: add sfdisk resize tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 13 Apr 2015 08:35:51 +0000 (10:35 +0200)]
tests: require wipefs for sfdisk/gpt
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 13 Apr 2015 08:29:00 +0000 (10:29 +0200)]
libfdisk: (dos) retain existing boot flag when resizing a partition
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
1210912
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: awilliam@redhat.com
Ruediger Meier [Thu, 9 Apr 2015 15:00:26 +0000 (17:00 +0200)]
tests: simplify common logger options
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Thu, 26 Mar 2015 13:20:29 +0000 (14:20 +0100)]
logger: --stderr and --no-act turn "auto-errors" on
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Jörg Jenderek [Wed, 8 Apr 2015 08:24:26 +0000 (10:24 +0200)]
libfdisk: recognize FAT32 partitions hidden by Acronis software
References: http://www.acronis.de/products/trueimage
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Jörg Jenderek <joerg.jen.der.ek@gmx.net>
Karel Zak [Tue, 7 Apr 2015 13:22:22 +0000 (15:22 +0200)]
Merge branch 'fix-last' of https://github.com/rudimeier/util-linux
* 'fix-last' of https://github.com/rudimeier/util-linux:
last, fix race when comparing time stamps
last: fix first (current) runlevel line
Max Klinger [Tue, 7 Apr 2015 11:05:39 +0000 (13:05 +0200)]
cal: add -Y and -n <num>
[kzak@redhat.com: - add month_in_row to avoid extra meaning of num_month=-3,
- add header_year
- add long option for -Y
- define conflicts between -Y, -y and -n
- remove ctl.yflag]
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 7 Apr 2015 10:42:56 +0000 (12:42 +0200)]
Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux
* 'test-fixes' of https://github.com/rudimeier/util-linux:
tests: mount/rlimit tries to restore mtab
tests: fix, don't call ts_die from subshell
tests: ts_scsi_debug_init() sleeps a bit earlier
tests: fix cramfs/mkfs for BE and different pagesizes
Karel Zak [Tue, 7 Apr 2015 10:31:55 +0000 (12:31 +0200)]
Merge branch 'fix-tinfo-typo' of https://github.com/rudimeier/util-linux
* 'fix-tinfo-typo' of https://github.com/rudimeier/util-linux:
build-sys: typo -ltinfo
Mike Place [Tue, 7 Apr 2015 08:44:50 +0000 (10:44 +0200)]
whereis: trivial spelling and grammar fix
Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Tue, 7 Apr 2015 07:58:19 +0000 (08:58 +0100)]
logger: fix memory leaks
Reported-by: Patrick Plagwitz <patrick.plagwitz@fau.de>
Signed-off-by: Sami Kerola <sami.kerola@lastminute.com>
Patrick Plagwitz [Mon, 6 Apr 2015 21:50:46 +0000 (22:50 +0100)]
logger: generate header when reading message from stdin
This change fixes crashing error, that ought not to be simply avoided.
$ echo foo | logger -n localhost
Segmentation fault (core dumped)
If the ctl->hdr is just checked not to be NULL syslog message will not
have valid header, so generating such is not optional when reading
message from stdin and writing it to remote destination.
Reviewed-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Patrick Plagwitz <patrick.plagwitz@fau.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Karel Zak [Fri, 3 Apr 2015 09:44:24 +0000 (11:44 +0200)]
wall: do not use a temporary file.
The issue with using a temporary file in wall is that wall runs as setgid.
This means that an unprivileged user who runs wall can modify wall's
temporary files, even if those are mode 0600, so the unprivileged user can
edit and effectively suppress the banner. The fix is to simply not use
temporary files.
[kzak@redhat.com: - rewrite growing string functions
- use struct buffer
- add buf_print() function]
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Jann Horn <jann@thejh.net>
Karel Zak [Thu, 2 Apr 2015 10:30:26 +0000 (12:30 +0200)]
libmount: add note about flock() to docs
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Thu, 2 Apr 2015 09:35:29 +0000 (11:35 +0200)]
tests: mount/rlimit tries to restore mtab
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 31 Mar 2015 14:07:37 +0000 (16:07 +0200)]
tests: fix, don't call ts_die from subshell
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Sat, 28 Mar 2015 14:32:30 +0000 (15:32 +0100)]
tests: ts_scsi_debug_init() sleeps a bit earlier
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Sat, 28 Mar 2015 11:34:43 +0000 (12:34 +0100)]
tests: fix cramfs/mkfs for BE and different pagesizes
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Wed, 1 Apr 2015 10:23:23 +0000 (12:23 +0200)]
lsblk: don't ignore dependences for partitioned devies
The code only lists partitions, but ignore another dependencies
on whole-disk device:
$ lsblk /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 298.1G 0 disk
└─sdb1 8:17 0 298.1G 0 part
$ ls /sys/block/sdb/holders/
dm-0
fixed version:
$ lsblk /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 298.1G 0 disk
├─sdb1 8:17 0 298.1G 0 part
└─mpatha 253:0 0 298.1G 0 mpath
└─mpatha1 253:1 0 298.1G 0 part
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 1 Apr 2015 10:06:41 +0000 (12:06 +0200)]
lsblk: follow kernel for inverse tree
For multi-path devices kernel defines dependence between the device
and whole-list:
$ ls /sys/block/dm-0/slaves/
sdb
but lsblk inserts partition into the tree:
$ lsblk -s -oNAME,KNAME /dev/dm-1
mpatha1 dm-1
└─mpatha dm-0
└─sdb1 sdb1 <--- !
└─sdb sdb
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 1 Apr 2015 10:06:15 +0000 (12:06 +0200)]
lsblk: add debug support
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 31 Mar 2015 11:10:17 +0000 (13:10 +0200)]
cfdisk: cleanup extra partitions info for slang
The patch removes problem with getch() on slang, now the code is based
on subwin() and extra info window is persistent.
A new problem is that slang does not keep sub-window border
persistent. I'm going to ignore this slang problem... use ncurses
dude!
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 30 Mar 2015 11:54:08 +0000 (13:54 +0200)]
build-sys: define cfdisk dependence on open_memstream
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 30 Mar 2015 10:52:22 +0000 (12:52 +0200)]
mount: fix lazytime docs
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 30 Mar 2015 10:43:45 +0000 (12:43 +0200)]
libmount: add support for MS_LAZYTIME
Signed-off-by: Karel Zak <kzak@redhat.com>
Waldemar Brodkorb [Sun, 29 Mar 2015 13:00:30 +0000 (15:00 +0200)]
setarch: fix regression for sparc builds
With following commit:
5edb0ea6bbd57dd916417737f98c9109dc1ecb5b
Sparc cross-compile fails.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Ruediger Meier [Sat, 28 Mar 2015 10:23:53 +0000 (11:23 +0100)]
build-sys: typo -ltinfo
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Fri, 27 Mar 2015 14:04:58 +0000 (15:04 +0100)]
sfdisk: cleanup prompt usage
Let's use fgets-like callback only when compiled with readline,
otherwise (and also for non-tty) print prompt by printf().
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Fri, 20 Feb 2015 08:41:19 +0000 (09:41 +0100)]
cfdisk: provide extra partinfo with "x"
The new 'extra' info provides:
* filesystem information from libblkid (TYPE, UUID, LABEL)
This feature is based on libblkid ability to probe specified area
on the device. It allows to probe for filesystems although the
partition devices (e.g. /dev/sda2) does not exist. For example from
disk image:
# cfdisk /home/archive/fs-images/disk.img
* additional information from libfdisk (partition UUID, Name, ...)
* mount information from libmount (from fstab or mountinfo)
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 27 Mar 2015 12:47:13 +0000 (13:47 +0100)]
libfdisk: don't return empty strings from fdisk_partition_to_string()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 27 Mar 2015 12:46:15 +0000 (13:46 +0100)]
build-sys: add HAVE_LIBMOUNT
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 27 Mar 2015 09:32:24 +0000 (10:32 +0100)]
build-sys: add TINFO_LIBS_STATIC
and use this variable for $READLINE_LIBS_STATIC.
Note the patch also moves READLINE checks after TINFO check.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 26 Mar 2015 18:05:11 +0000 (19:05 +0100)]
build-sys: fix READLINE_LIBS_STATIC usage for fdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 26 Mar 2015 17:21:53 +0000 (18:21 +0100)]
sfdisk: fix -a vs. -A bug
The -A has been originally used for --activate, since v2.26 it's used
for --append. This is stupid mistake. This patch reverts the change to:
-A, --activate
-a, --append
Note that --append is a new command line option in v2.26.
Addresses: https://bugs.archlinux.org/task/44349
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 26 Mar 2015 12:00:24 +0000 (13:00 +0100)]
docs: document --exclude for tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Wed, 25 Mar 2015 11:09:36 +0000 (12:09 +0100)]
tests: add documentation about environment variables
Introduced in
8e3ac29e , now advertised :)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 24 Mar 2015 18:37:01 +0000 (19:37 +0100)]
tests: verify logger return value
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 24 Mar 2015 08:47:49 +0000 (09:47 +0100)]
tests: avoid &>> for bash compatibility
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier [Tue, 24 Mar 2015 08:37:30 +0000 (09:37 +0100)]
tests: fix getopt for old glibc
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>