Commit Graph

7274 Commits

Author SHA1 Message Date
Ondrej Oprala bb8ae572ef hexdump: rename struct _fs to struct hexdump_fs and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:23 +01:00
Ondrej Oprala 046921da22 hexdump: rename struct _fu to struct hexdump_fu and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:22 +01:00
Ondrej Oprala 4c73d29c06 hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:21 +01:00
Ondrej Oprala 9f399910f2 hexdump: rename rewrite to rewrite_rules
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:21 +01:00
Ondrej Oprala 9fa53cebe4 hexdump: rename add to add_fmt
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:20 +01:00
Ondrej Oprala d4646ea4b0 hexdump: Merge hexsyntax.c into hexdump.c
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:19 +01:00
Ondrej Oprala af324b1f72 hexdump: add the prefix 'hexdump-' to {conv,display,parse}.c
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:17 +01:00
Karel Zak f50473e7ca script: check that stdin is a terminal
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-02 13:42:01 +01:00
Karel Zak 43298be931 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>
2013-12-02 12:21:47 +01:00
Werner Fink fba8a53542 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>
2013-12-02 11:07:32 +01:00
Phillip Susi fb724eef6d mount man page cleanups
Fowarding this patch submitted by Bjarni Ingi Gislason
<bjarniig@rhi.hi.is> to deb bug #674595.
2013-12-02 11:07:07 +01:00
Phillip Susi c4b8d43d1d 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>
2013-12-02 10:59:36 +01:00
Dave Reisner c8e5e6e732 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>
2013-12-02 10:59:31 +01:00
Sami Kerola cd80445017 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>
2013-12-02 10:59:27 +01:00
Sami Kerola f614b73c0e 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>
2013-12-02 10:59:20 +01:00
Karel Zak b37ab36eec 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>
2013-11-27 22:04:10 +01:00
Karel Zak 28a5bccc47 libfdisk: (dos) fix free part counter
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-27 21:42:18 +01:00
Karel Zak 4253275490 libblkid: fix sgi PT parser to report system partitions
... to be compatible with Linux kernel.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-27 16:55:08 +01:00
Karel Zak 6d0ed4cb38 fdisk: (gpt) more human readable info about free space
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-25 13:18:02 +01:00
Karel Zak d0a870c5b3 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>
2013-11-25 12:00:55 +01:00
Karel Zak 488cc17a99 fdisk: fix nasty coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-25 10:58:18 +01:00
Karel Zak 38d663a6b3 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>
2013-11-19 18:30:40 +01:00
Karel Zak d41acf740e 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>
2013-11-19 17:55:12 +01:00
Karel Zak c1178175e7 libblkid: fix memory leak in blkid_parse_tag_string()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-19 17:52:56 +01:00
Karel Zak 6751f0627d 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 51e3530cdc, v2.24).

This patch also checks if source or target is specified more
than once.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-19 17:44:21 +01:00
Karel Zak a53cc4e0cb libmount: add mnt_tag_is_valid()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-19 17:41:28 +01:00
Phillip Susi 9fbf878305 fsck: add ext4 to list of filesystems with progress bars in fsck man page
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2013-11-19 14:46:27 +01:00
Phillip Susi 2a7b920fd1 mount: fix man mount page type
Slight grammatical error in the mount man page

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2013-11-19 14:46:13 +01:00
Karel Zak de81a77dea 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>
2013-11-19 14:42:22 +01:00
Karel Zak 89a5263adc Merge branch 'fixes' of https://github.com/rudimeier/util-linux
* 'fixes' of https://github.com/rudimeier/util-linux:
  tests: fix fdisk GPT test
2013-11-19 13:17:34 +01:00
Karel Zak e41e151427 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>
2013-11-19 13:02:39 +01:00
Karel Zak c07f86e7ac 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>
2013-11-18 12:50:27 +01:00
Karel Zak 71d842c019 lsblk: fix -D segfault
References: https://bugzilla.redhat.com/show_bug.cgi?id=1031262
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-18 11:27:35 +01:00
Karel Zak 33cac1003a mkfs.minix: fix fscanf() format string [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-18 10:58:41 +01:00
Ruediger Meier 247e259c0e tests: fix fdisk GPT test
There was a missing newline since cd05de50.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2013-11-14 20:01:30 +01:00
Karel Zak 185b1bc7f4 script: restore errno in signal handler
References: https://plus.google.com/+LennartPoetteringTheOneAndOnly/posts/gHSscCJkakd
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-14 14:42:23 +01:00
Karel Zak f630400c4e script: don't call TIOCGWINSZ in signal handler
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-14 14:34:15 +01:00
Phillip Susi d9ba898a7f 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>
2013-11-14 12:29:54 +01:00
Phillip Susi 9167f4c2e8 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>
2013-11-14 12:29:28 +01:00
Karel Zak 50bdacb823 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>
2013-11-12 15:49:33 +01:00
Karel Zak 413875b649 build-sys: add --with-smack to config-gen.d
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-12 15:48:42 +01:00
Karel Zak 74aad572e0 libmount: fix typo in smack path
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-12 15:17:28 +01:00
Karel Zak b8095d25ba 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>
2013-11-12 15:07:12 +01:00
Karel Zak 3deb67f50d 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>
2013-11-12 12:26:13 +01:00
Sami Kerola d8a9b90756 docs: update links to http://git.kernel.org/ web repository views
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-11-12 11:47:57 +01:00
Sami Kerola 55fb2bc195 docs: add patching process to howto-contribute.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-11-12 11:47:56 +01:00
Karel Zak 9e480be7ac chsh, chfn: add info about non-local support to the man pages
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-11 09:18:18 +01:00
Karel Zak 5dc242cc97 tests: update blkid swap tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-08 14:22:35 +01:00
Ondrej Oprala d2740b0ef6 hexdump: catch memory leaks
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 14:16:29 +01:00
Ondrej Oprala 3917a95d90 hexdump: make addfile() variable names more hinting of their purpose
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 14:16:04 +01:00