]>
git.ipfire.org Git - thirdparty/util-linux.git/log
Karel Zak [Tue, 3 Dec 2013 12:32:55 +0000 (13:32 +0100)]
script: script input redirection / eof handling
echo "ps uf" | script
does not work because script assume that stdin is terminal and
it does not forward EOF to the pty.
This patch:
* make non-tty use-case more robust (don't call tty ioclts to
non-tty file descriptors.
* send EOF (CTL('D') control char) to the master channel when
detected eof by read() on stdin
* wait for empty master and slave file descriptors to be sure that
we don't miss date for typescript. This is also necessary to be
sure that slave channel (shell) is completely initialized otherwise
EOF is ignored.
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:14 +0000 (17:13 +0100)]
hexdump: Create struct hexdump containing previously global variables.
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:13 +0000 (17:13 +0100)]
hexdump: add __attribute__ ((__noreturn__)) to bad*() functions
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:12 +0000 (17:13 +0100)]
hexdump: rename struct _fs to struct hexdump_fs and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:11 +0000 (17:13 +0100)]
hexdump: rename struct _fu to struct hexdump_fu and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:10 +0000 (17:13 +0100)]
hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:09 +0000 (17:13 +0100)]
hexdump: rename rewrite to rewrite_rules
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:08 +0000 (17:13 +0100)]
hexdump: rename add to add_fmt
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:07 +0000 (17:13 +0100)]
hexdump: Merge hexsyntax.c into hexdump.c
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Fri, 8 Nov 2013 16:13:06 +0000 (17:13 +0100)]
hexdump: add the prefix 'hexdump-' to {conv,display,parse}.c
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Karel Zak [Mon, 2 Dec 2013 12:42:01 +0000 (13:42 +0100)]
script: check that stdin is a terminal
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 2 Dec 2013 11:21:47 +0000 (12:21 +0100)]
setterm: fix -dump man page info
It seems that setterm -dump does not dump terminal attributes, but
the man page says -dump includes the attributes. Let's fix the man
page.
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Werner Fink [Fri, 29 Nov 2013 15:44:25 +0000 (16:44 +0100)]
agetty: support the special terminal on first serial line on a S/390
which is due legacy reasons a block terminal of type 3270 or higher.
Whereas the second serial line on a S/390(x) is a real character
terminal which is compatible with VT220.
Signed-off-by: Werner Fink <werner@suse.de>
Phillip Susi [Mon, 25 Nov 2013 15:35:40 +0000 (10:35 -0500)]
mount man page cleanups
Fowarding this patch submitted by Bjarni Ingi Gislason
<bjarniig@rhi.hi.is> to deb bug #674595.
Phillip Susi [Mon, 25 Nov 2013 15:23:26 +0000 (10:23 -0500)]
mount.8: fix grammar
Switch "A unbindable" to "An unbindable"
Reported-by: Regid Ichira <regid23@nt1.in>
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Dave Reisner [Thu, 21 Nov 2013 17:25:27 +0000 (12:25 -0500)]
pylibmount: correctly import from pylibmount.so
Without this, python is unable to find the module:
$ python -c 'import libmount'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/libmount/__init__.py", line 1, in <module>
from pylibmount import *
ImportError: No module named 'pylibmount'
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Sami Kerola [Wed, 20 Nov 2013 00:57:04 +0000 (00:57 +0000)]
namei: align missing files with rest of the print out
This change should make namei output more readable when multiple
arguments are supplied.
The old:
$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
foo - No such file or directory
The new:
$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
foo - No such file or directory
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Wed, 20 Nov 2013 00:57:03 +0000 (00:57 +0000)]
losetup, agetty: remove unnecessary if's before free()
Reference: http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/useless-if-before-free
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Karel Zak [Wed, 27 Nov 2013 21:04:10 +0000 (22:04 +0100)]
libfdisk: (dos) warn on type 0
This is old warning, but somehow lost during rewrite to libfdisk. Sorry.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 27 Nov 2013 20:42:18 +0000 (21:42 +0100)]
libfdisk: (dos) fix free part counter
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 27 Nov 2013 15:55:08 +0000 (16:55 +0100)]
libblkid: fix sgi PT parser to report system partitions
... to be compatible with Linux kernel.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 25 Nov 2013 12:18:02 +0000 (13:18 +0100)]
fdisk: (gpt) more human readable info about free space
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 25 Nov 2013 11:00:55 +0000 (12:00 +0100)]
fdisk: don't care about partition type
fdisk allows to overwrite existing partition if the partition has
partition type set to zero (very unusual, but possible).
This is incorrect because such partition is pretty valid (and Linux
kernel does not care about the type at all). For example:
Device Boot Start End Blocks Id System
/dev/sdb1 2048 22527 10240 83 Linux
/dev/sdb2 22528 227327 102400 0 Empty
^^^^^ ^^^^^^^^
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p):
Using default response p
Partition number (3,4, default 3):
First sector (22528-
1228799 , default 22528):
^^^^^^^
.. if user follows the default then the result are overlapping
partitions:
Device Boot Start End Blocks Id System
/dev/sdb1 2048 22527 10240 83 Linux
/dev/sdb2 22528 227327 102400 0 Empty
/dev/sdb3 22528
1228799 603136 83 Linux
^^^^^
... and if you call "mkfs /dev/sdb3" then you lost data on sdb2. Sad
thing.
Reported-by: Marc MERLIN <marc@merlins.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 25 Nov 2013 09:58:18 +0000 (10:58 +0100)]
fdisk: fix nasty coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Nov 2013 17:30:40 +0000 (18:30 +0100)]
fdisk: fix usage(), -l [<disk>]
Add square brackets, <disk> is optional for -l.
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Nov 2013 16:55:12 +0000 (17:55 +0100)]
umount: fix umount by tag for non-roots
$ umount LABEL=foo
currently does not work for non-root users as umount uses the
LABEL= as a path in sanitize_path().
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Nov 2013 16:52:56 +0000 (17:52 +0100)]
libblkid: fix memory leak in blkid_parse_tag_string()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Nov 2013 16:44:21 +0000 (17:44 +0100)]
mount: make NAME=value tags usable for non-root
The libmount does not care if we set source or target, it's able to
swap it, but the mount.c function sanitize_paths() does not work as
expected if we set NAME=value as target. It means that
$ mount LABEL=foo
does not work for non-root users (since
51e3530cdcb1d4f3ab91ae953ebc5adcdc5f9239 , v2.24).
This patch also checks if source or target is specified more
than once.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Nov 2013 16:41:28 +0000 (17:41 +0100)]
libmount: add mnt_tag_is_valid()
Signed-off-by: Karel Zak <kzak@redhat.com>
Phillip Susi [Mon, 18 Nov 2013 19:15:50 +0000 (14:15 -0500)]
fsck: add ext4 to list of filesystems with progress bars in fsck man page
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Phillip Susi [Mon, 18 Nov 2013 19:00:17 +0000 (14:00 -0500)]
mount: fix man mount page type
Slight grammatical error in the mount man page
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Karel Zak [Tue, 19 Nov 2013 13:42:22 +0000 (14:42 +0100)]
setpriv: simplify usage()
Let's keep usage() simple and details in the man page. The current
brief description in usage() seems confusing for some users.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 19 Nov 2013 12:17:34 +0000 (13:17 +0100)]
Merge branch 'fixes' of https://github.com/rudimeier/util-linux
* 'fixes' of https://github.com/rudimeier/util-linux:
tests: fix fdisk GPT test
Karel Zak [Tue, 19 Nov 2013 12:02:39 +0000 (13:02 +0100)]
libfdisk: (sgi) generate partname according to partition position
The SGI drive currently counts only usable partitions, that's wrong as
Linux kernel counts all partition to generate partition number. For
example:
Kernel:
sdb 8:16 0 600M 0 disk
├─sdb9 8:25 0 2M 0 part
└─sdb11 8:27 0 596.2M 0 part
Fdisk:
Pt# Device Info Start End Sectors Id System
9: /dev/sdb1 0 4095 4096 0 SGI volhdr
11: /dev/sdb2 0
1220939 1220940 6 SGI volume
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 18 Nov 2013 11:50:27 +0000 (12:50 +0100)]
unshare: add more hints about mount namespaces to the man page
There is also idea (by Lennart) to add --propagation=[shared|private|slave|off]
to unshare(1), but it seems unnecessary and too complex as everyone can call
mount(8) after unshare(1) to setup a proper namespace.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 18 Nov 2013 10:27:35 +0000 (11:27 +0100)]
lsblk: fix -D segfault
References: https://bugzilla.redhat.com/show_bug.cgi?id=
1031262
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 18 Nov 2013 09:58:41 +0000 (10:58 +0100)]
mkfs.minix: fix fscanf() format string [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Ruediger Meier [Thu, 14 Nov 2013 11:12:47 +0000 (12:12 +0100)]
tests: fix fdisk GPT test
There was a missing newline since
cd05de50 .
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Thu, 14 Nov 2013 13:38:06 +0000 (14:38 +0100)]
script: restore errno in signal handler
References: https://plus.google.com/+LennartPoetteringTheOneAndOnly/posts/gHSscCJkakd
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 14 Nov 2013 13:34:15 +0000 (14:34 +0100)]
script: don't call TIOCGWINSZ in signal handler
Signed-off-by: Karel Zak <kzak@redhat.com>
Phillip Susi [Wed, 13 Nov 2013 15:30:52 +0000 (10:30 -0500)]
mkswap: remove cruft from the man page
I don't think there's any reason to continue to mention behavior
of kernels older than 10 years.
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Phillip Susi [Wed, 13 Nov 2013 15:19:04 +0000 (10:19 -0500)]
mount: correct mount man page default iso9660 permission
The mount man page said the default permissions are read for
everyone, but it is in fact, read and execute.
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Karel Zak [Tue, 12 Nov 2013 14:49:33 +0000 (15:49 +0100)]
libmount: cleanup fix_optstr() regards to selinux and smack
It's better (more robust) to make the code based on datetypes
rather than on if(strcmp(...)).
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 12 Nov 2013 14:48:42 +0000 (15:48 +0100)]
build-sys: add --with-smack to config-gen.d
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 12 Nov 2013 14:17:28 +0000 (15:17 +0100)]
libmount: fix typo in smack path
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 12 Nov 2013 14:07:12 +0000 (15:07 +0100)]
libmount: remove smackfs* option when SMACK not enabled
If there is no /sys/fs/smackfs then libmount removes smackfs*= mount
options when compiled --with-smack.
Note that we do the same for SELinux.
References: http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg13740.html
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 12 Nov 2013 11:26:13 +0000 (12:26 +0100)]
sulogin: use dirent->d_type when scans /dev
... it's more effective than call fstatat() for all device.
Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Sun, 10 Nov 2013 20:06:10 +0000 (20:06 +0000)]
docs: update links to http://git.kernel.org/ web repository views
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Sami Kerola [Sun, 10 Nov 2013 20:06:09 +0000 (20:06 +0000)]
docs: add patching process to howto-contribute.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Karel Zak [Mon, 11 Nov 2013 08:18:18 +0000 (09:18 +0100)]
chsh, chfn: add info about non-local support to the man pages
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 8 Nov 2013 13:22:35 +0000 (14:22 +0100)]
tests: update blkid swap tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:38 +0000 (15:39 +0200)]
hexdump: catch memory leaks
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:37 +0000 (15:39 +0200)]
hexdump: make addfile() variable names more hinting of their purpose
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:36 +0000 (15:39 +0200)]
hexdump: use skip_space() in add()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:34 +0000 (15:39 +0200)]
strutils: add skip_space() function
[kzak@redhat.com: - add also skip_blank(),
- remove duplicate implementation from libmount]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:32 +0000 (15:39 +0200)]
hexdump: rename in() to first_letter()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:31 +0000 (15:39 +0200)]
hexdump: get rid of redundant typecasts
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:30 +0000 (15:39 +0200)]
hexdump: minor formatting improvements in display()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:29 +0000 (15:39 +0200)]
hexdump: rewrite cluttered case statements
[kzak@redhat.com: - use strchr() for in() macro]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:27 +0000 (15:39 +0200)]
hexdump: use xasprintf in conv_c()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:26 +0000 (15:39 +0200)]
hexdump: delete redundant typecasts
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:24 +0000 (15:39 +0200)]
hexdump: use GNU case ranges where possible
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:23 +0000 (15:39 +0200)]
hexdump: use xstrncpy in add()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:22 +0000 (15:39 +0200)]
hexdump: simplify newsyntax arguments
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:21 +0000 (15:39 +0200)]
hexdump: minor formatting improvements
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:20 +0000 (15:39 +0200)]
hexdump: rename next{fs,fu,pr} to {fs,fu,pr}list
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:19 +0000 (15:39 +0200)]
hexdump: rewrite addfile() to use getline()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:18 +0000 (15:39 +0200)]
hexdump: formatting and variable name cleanup
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:17 +0000 (15:39 +0200)]
hexdump: rewrite() formatting improvements
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:16 +0000 (15:39 +0200)]
hexdump: rewrite escape()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:15 +0000 (15:39 +0200)]
hexdump: rewrite rewrite()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:14 +0000 (15:39 +0200)]
hexdump:rewrite add()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:13 +0000 (15:39 +0200)]
hexdump: rewrite next()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:12 +0000 (15:39 +0200)]
hexdump: rewrite get()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:11 +0000 (15:39 +0200)]
hexdump: rewrite addfile()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:10 +0000 (15:39 +0200)]
hexdump: cleanup of redundant symbols/repeating literals
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:09 +0000 (15:39 +0200)]
hexdump: use list.h queues and rewrite redundant for cycles
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Ondrej Oprala [Mon, 23 Sep 2013 13:39:40 +0000 (15:39 +0200)]
hexdump: add basic tests
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Phillip Susi [Fri, 8 Nov 2013 09:12:17 +0000 (10:12 +0100)]
blkid: simple typo
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 8 Nov 2013 09:00:43 +0000 (10:00 +0100)]
docs: add note about make distcheck
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 7 Nov 2013 13:07:17 +0000 (14:07 +0100)]
blkid: escape quotes in the output
# e2label /dev/loop0 'La"bel'
# blkid -p /dev/loop0
/dev/loop0: LABEL="La"bel" ....
new version:
/dev/loop0: LABEL="La\"bel" ....
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 5 Nov 2013 11:49:20 +0000 (12:49 +0100)]
tests: add sparc64 lscpu test
Signed-off-by: Karel Zak <kzak@redhat.com>
Alexander Troosh [Tue, 5 Nov 2013 09:16:38 +0000 (10:16 +0100)]
lscpu: support non sequentially numbering of CPUs
lscpu don't work correctly on my system with:
$ cat /sys/devices/system/cpu/possible
0-1,4-5,8-9,12-13
[kzak@redhat.com: - coding style,
- add commit message
- add real_cpu_num() macro,
- fix functions where we need idx as well as CPU number]
Signed-off-by: Karel Zak <kzak@redhat.com>
Phillip Susi [Fri, 1 Nov 2013 17:37:05 +0000 (13:37 -0400)]
blockdev: don't use HDIO_GETGEO
blockdev was still using this depreciated ioctl and that was
causing blockdev --report to fail on loop and nbd devices.
Switch to reading the partition start from sysfs instead.
This also allows it to correctly report > 2^32 sector counts.
[kzak@redhat.com: - check sysfs_init() return,
- use uint64_t rather than unsigned long long]
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Theodore Ts'o [Sat, 2 Nov 2013 23:46:06 +0000 (19:46 -0400)]
blkdiscard: BLKSSZGET fills in an int, not a uint64
Reported-by: Jason Cipriani <jason.cipriani@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Karel Zak [Mon, 4 Nov 2013 11:45:33 +0000 (12:45 +0100)]
libmount: update utab after successful extern helper mount
This patch allows to maintain private utab libmount file also for
external mount/umount helpers that are not linked with libmount.
The libmount check if utab has been updated after successful extern
helper execution (status=0). If not then the file is updated.
This patch affects only 'user' fstab mount option. So, for example
with suid mount.cifs you can use:
//server/foo /mnt cifs username=foo,noauto,user
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 4 Nov 2013 09:50:48 +0000 (10:50 +0100)]
libmount: allow to use -s (sloppy) for all external helpers
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 4 Nov 2013 08:59:54 +0000 (09:59 +0100)]
libblkid: fix swap-area version
* v1: hdr->version = 1, magic string = SWAPSPACE2
* v0: no versio in header, magic string = SWAP-SPACE
The mistake has been introduced in the old udev volume_id
binary where the version was set according to magic string.
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 1 Nov 2013 11:15:25 +0000 (12:15 +0100)]
libfdisk: (sun) fix end sectors with +1 error
partx (or parted, etc.):
NR START END SECTORS SIZE NAME UUID
1 0 410047 410048 200.2M
2 410048
82329055 81919008 39.1G
4
82329056 102807615 20478560 9.8G
5
102807616 110999039 8191424 3.9G
6
110999040 312580543 201581504 96.1G
and the same with fdisk:
Device Flag Start End Blocks Id System
/dev/loop0p1 0 410048 205024 1 Boot
/dev/loop0p2 410048
82329056 40959504 83 Linux native
/dev/loop0p3 0
312580544 156290272 5 Whole disk
/dev/loop0p4
82329056 102807616 10239280 83 Linux native
/dev/loop0p5
102807616 110999040 4095712 83 Linux native
/dev/loop0p6
110999040 312580544 100790752 8e Linux LVM
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 31 Oct 2013 09:44:33 +0000 (10:44 +0100)]
mount: improve -s man mage info
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 31 Oct 2013 07:53:03 +0000 (08:53 +0100)]
libfdisk: (gpt) add /home GUID
Reported-by: andreas.hanke@gmx-topmail.de
References: http://cgit.freedesktop.org/systemd/systemd/commit/?id=
1a14a53cfded6e78c6e8dfb73fdff0039971d642
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 23 Oct 2013 14:59:45 +0000 (16:59 +0200)]
libfdisk: (gpt) allow to work with hybrid GPT
Notes:
* fdisk don't sync hybrid MBR with GPT
* hybrid MBR is ignored and not overwritten by PBMR
* users is informed about expert command 'M' to toggle between MBR
and GPT mode. It's possible to manually modify hybrid MBR.
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 23 Oct 2013 10:06:47 +0000 (12:06 +0200)]
libfdisk: (gpt) improve and cleanup recovery code
* use AlternativeLBA rather than hardcoded offset to backup GPT
* create gpt_copy_header()
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 23 Oct 2013 08:44:58 +0000 (10:44 +0200)]
tests: test corruted GPT headers
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 23 Oct 2013 08:27:39 +0000 (10:27 +0200)]
libfdisk: (gpt) recover from corrupted primary/backup PT
We already have all code to support this feature, unfortunately
it was not used in gpt_probe_label()...
References: https://bugzilla.redhat.com/show_bug.cgi?id=
1022217
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Oct 2013 11:53:14 +0000 (13:53 +0200)]
docs: update TODO, wipe check for fdisk already implemented
Note that rather than implement wipe command in fdisk it's better
inform users to call wipefs(8).
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Oct 2013 11:52:18 +0000 (13:52 +0200)]
libfdisk: warn about obsolete signatures on the device
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 18 Oct 2013 11:52:10 +0000 (13:52 +0200)]
fdisk: reorder intro warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Oct 2013 13:30:43 +0000 (15:30 +0200)]
fdisk: (gpt) add A,B,R,S expert commands to modify attributes
Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 16 Oct 2013 13:28:32 +0000 (15:28 +0200)]
libfdisk: support extended attributes modification
* GPT attributes defined by standard (e.g. legacy boot etc.)
* attributes (bits 48-63) reserved for GUID specific attributes (used for example
by MS Windows)
Signed-off-by: Karel Zak <kzak@redhat.com>