]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agolibfdisk: (gpt) use le64_to_cpu() for alternative LBA checks
Karel Zak [Thu, 18 Apr 2013 10:27:32 +0000 (12:27 +0200)] 
libfdisk: (gpt) use le64_to_cpu() for alternative LBA checks

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: remove obsolete code
Karel Zak [Thu, 18 Apr 2013 09:56:46 +0000 (11:56 +0200)] 
libblkid: remove obsolete code

 ... forgot in the previous commit to the swap prober.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: ubifs is LE
Karel Zak [Thu, 18 Apr 2013 09:50:56 +0000 (11:50 +0200)] 
libblkid: ubifs is LE

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: make swap detection arch independent
Karel Zak [Thu, 18 Apr 2013 09:36:09 +0000 (11:36 +0200)] 
libblkid: make swap detection arch independent

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix compiler warning
Karel Zak [Thu, 18 Apr 2013 09:23:34 +0000 (11:23 +0200)] 
tests: fix compiler warning

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: use pkg-config results for libuser
Karel Zak [Thu, 18 Apr 2013 08:50:30 +0000 (10:50 +0200)] 
build-sys: use pkg-config results for libuser

Our code depends on libuser >= 0.58, it's better to completely rely on
pkg-config results rather than also call UL_CHECK_LIB (that overwrites
previous pkg-config have_user= result independently on libuser
version).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: fix UL_REQUIRES_HAVE
Karel Zak [Thu, 18 Apr 2013 08:19:35 +0000 (10:19 +0200)] 
build-sys: fix UL_REQUIRES_HAVE

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisks: fix compiler warning
Karel Zak [Wed, 17 Apr 2013 15:35:47 +0000 (17:35 +0200)] 
fdisks: fix compiler warning

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosulogin: fix compiler warnings
Karel Zak [Wed, 17 Apr 2013 15:23:26 +0000 (17:23 +0200)] 
sulogin: fix compiler warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: fix nsenter requirements
Karel Zak [Wed, 17 Apr 2013 15:05:48 +0000 (17:05 +0200)] 
build-sys: fix nsenter requirements

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoinclude: fix SYS_{unshare,nsenter} usage
Karel Zak [Wed, 17 Apr 2013 14:58:00 +0000 (16:58 +0200)] 
include: fix SYS_{unshare,nsenter} usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: set 32-bit / 64-bit for ppc
Karel Zak [Wed, 17 Apr 2013 14:20:10 +0000 (16:20 +0200)] 
lscpu: set 32-bit / 64-bit for ppc

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: use more robust code in silicon_raid checksum prober
Karel Zak [Wed, 17 Apr 2013 14:17:46 +0000 (16:17 +0200)] 
libblkid: use more robust code in silicon_raid checksum prober

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix silicon raid checksum code on BE
Karel Zak [Tue, 16 Apr 2013 11:45:49 +0000 (13:45 +0200)] 
libblkid: fix silicon raid checksum code on BE

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: add BE minix test
Karel Zak [Mon, 15 Apr 2013 13:26:55 +0000 (15:26 +0200)] 
tests: add BE minix test

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: arch independent minix detection
Karel Zak [Mon, 15 Apr 2013 13:14:33 +0000 (15:14 +0200)] 
libblkid: arch independent minix detection

It seems that on-disk MINIX FS superblock is native-endian.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=833841
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: consolidate scsi_debug usage
Karel Zak [Fri, 12 Apr 2013 14:36:33 +0000 (16:36 +0200)] 
tests: consolidate scsi_debug usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: add debug message to guess FS function
Karel Zak [Fri, 12 Apr 2013 13:04:57 +0000 (15:04 +0200)] 
libmount: add debug message to guess FS function

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: use udevadm settle rather than sleep
Karel Zak [Fri, 12 Apr 2013 11:49:08 +0000 (13:49 +0200)] 
tests: use udevadm settle rather than sleep

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: fix mount.nfs segfault, rely on assert() rather than on nonnull
Karel Zak [Fri, 12 Apr 2013 10:35:34 +0000 (12:35 +0200)] 
libmount: fix mount.nfs segfault, rely on assert() rather than on nonnull

We use
   mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL);

in mount.nfs, unfortunately mnt_optstr_append_option() has been marked
ass nonnull(1, 2). That's wrong because append and prepend should
robust enough to accept NULL as option name.

The patch also removes almost all __attribute__((nonnull). It seems
better to rely on assert() to have usable feedback. In many cases
(nonnull) is premature optimization for the library. This attribute
makes sense for things like strlen() or so...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=948274
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: release++ (v2.23-rc2) v2.23-rc2
Karel Zak [Wed, 10 Apr 2013 21:38:06 +0000 (23:38 +0200)] 
build-sys: release++ (v2.23-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update v2.23-ReleaseNotes
Karel Zak [Wed, 10 Apr 2013 21:36:46 +0000 (23:36 +0200)] 
docs: update v2.23-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: make wall optional in bash-completion
Karel Zak [Wed, 10 Apr 2013 21:34:23 +0000 (23:34 +0200)] 
build-sys: make wall optional in bash-completion

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --disable-fdformat
Karel Zak [Wed, 10 Apr 2013 21:03:20 +0000 (23:03 +0200)] 
build-sys: add --disable-fdformat

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --disable-hwclock
Karel Zak [Wed, 10 Apr 2013 20:57:27 +0000 (22:57 +0200)] 
build-sys: add --disable-hwclock

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --disable-bfs
Karel Zak [Wed, 10 Apr 2013 20:38:54 +0000 (22:38 +0200)] 
build-sys: add --disable-bfs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --disable-cytune
Karel Zak [Wed, 10 Apr 2013 20:27:31 +0000 (22:27 +0200)] 
build-sys: add --disable-cytune

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: update AUTHORS file
Karel Zak [Wed, 10 Apr 2013 15:44:59 +0000 (17:44 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopo: merge changes
Karel Zak [Wed, 10 Apr 2013 15:43:19 +0000 (17:43 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoblkid: use xalloc everywhere
Karel Zak [Wed, 10 Apr 2013 15:30:34 +0000 (17:30 +0200)] 
blkid: use xalloc everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: make line(1) optional
Karel Zak [Wed, 10 Apr 2013 15:30:15 +0000 (17:30 +0200)] 
tests: make line(1) optional

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: remove duplicate includes
Karel Zak [Wed, 10 Apr 2013 15:16:28 +0000 (17:16 +0200)] 
libblkid: remove duplicate includes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/xalloc: add xstrndup()
Karel Zak [Wed, 10 Apr 2013 15:16:01 +0000 (17:16 +0200)] 
lib/xalloc: add xstrndup()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update lscpu tests
Karel Zak [Wed, 10 Apr 2013 13:26:10 +0000 (15:26 +0200)] 
tests: update lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix ZFS superblok offset for SBMAGIC
Karel Zak [Wed, 10 Apr 2013 13:13:02 +0000 (15:13 +0200)] 
libblkid: fix ZFS superblok offset for SBMAGIC

 # wipefs /dev/sdd1

 offset               type
 ----------------------------------------------------------------
 0x65000              zfs_member   [raid]
                      LABEL: zm1
                      UUID:  18067835215330778964

 and "wipefs -o 0x65000 /dev/sdd1" seems to run in an endless loop.

Reported-by: Helmut Hullen <Hullen@t-online.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobash-completion: add swapoff
Bernhard Voelker [Wed, 10 Apr 2013 09:36:21 +0000 (11:36 +0200)] 
bash-completion: add swapoff

[kzak@redhat.com: remove short options]

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: add Model name
Karel Zak [Wed, 10 Apr 2013 12:29:53 +0000 (14:29 +0200)] 
lscpu: add Model name

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosu: remove '+' from getopt_long()
Karel Zak [Wed, 10 Apr 2013 12:21:22 +0000 (14:21 +0200)] 
su: remove '+' from getopt_long()

 # /bin/su - -c 'echo test'
 su: user -c does not exist

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=950495
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoloopdev: sync capacity after setting it
Jeff Mahoney [Tue, 9 Apr 2013 12:32:50 +0000 (14:32 +0200)] 
loopdev: sync capacity after setting it

I recently tried to mount an hfsplus file system from an image file with
a partition table by using the loop offset and sizelimit options to specify
the location of the file system.

hfsplus stores some metadata at a set offset from the end of the partition,
so it's sensitive to the device size reported by the kernel.

It worked with this:

But failed with this:

/dev/loop0: [0089]:2 (<imagefile>), offset 32768, sizelimit 102400000
/dev/loop1: [0089]:2 (<imagefile>), offset 32768, sizelimit 102400000

/proc/partitions shows the correct number of blocks to match the sizelimit.

But if I set a breakpoint in mount before the mount syscall, I could see:
102400000
102432768

The kernel loop driver will set the gendisk capacity of the device at
LOOP_SET_STATUS64 but won't sync it to the block device until one of two
conditions are met: All open file descriptors referring to the device are
closed (and it will sync when re-opened) or if the LOOP_SET_CAPACITY ioctl
is called to sync it. Since mount opens the device and passes it directly
to the mount syscall after LOOP_SET_STATUS64 without closing and reopening
it, the sizelimit argument is effectively ignroed. The capacity needs to
be synced immediately for it to work as expected.

This patch adds the LOOP_SET_CAPACITY call to loopctx_setup_device since
the device isn't yet released to the user, so it's safe to sync the capacity
immediately.

[kzak@redhat.com: - port to the current git HEAD,
                  - use uint64_t]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: export blkid_init_debug()
Karel Zak [Tue, 9 Apr 2013 11:12:15 +0000 (13:12 +0200)] 
libblkid: export blkid_init_debug()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: support LIBBLKID_DEBUG= only
Karel Zak [Tue, 9 Apr 2013 10:52:09 +0000 (12:52 +0200)] 
libblkid: support LIBBLKID_DEBUG= only

 ... the BLKID_DEBUG= is not more supported.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix DBG()
Karel Zak [Tue, 9 Apr 2013 10:44:02 +0000 (12:44 +0200)] 
libblkid: fix DBG()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodocs: add fsck.cramfs manual page
Sami Kerola [Mon, 8 Apr 2013 19:32:59 +0000 (20:32 +0100)] 
docs: add fsck.cramfs manual page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: add mkfs.cramfs manual page
Sami Kerola [Mon, 8 Apr 2013 19:32:58 +0000 (20:32 +0100)] 
docs: add mkfs.cramfs manual page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotools: make checkmans.sh to find missing manuals
Sami Kerola [Mon, 8 Apr 2013 19:32:57 +0000 (20:32 +0100)] 
tools: make checkmans.sh to find missing manuals

Finding missing manuals is loosely based on ideas in man-page-day-1.sh,
wrote by Peter Schiffer.

CC: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: remove repeated words [checkmans.sh]
Sami Kerola [Mon, 8 Apr 2013 19:32:56 +0000 (20:32 +0100)] 
docs: remove repeated words [checkmans.sh]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: col.1: fix manual page name section [checkmans.sh]
Sami Kerola [Mon, 8 Apr 2013 19:32:55 +0000 (20:32 +0100)] 
docs: col.1: fix manual page name section [checkmans.sh]

$ lexgrog text-utils/col.1
text-utils/col.1: parse failed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: mount.8: make propagation flags adjustable [checkmans.sh]
Sami Kerola [Mon, 8 Apr 2013 19:32:54 +0000 (20:32 +0100)] 
docs: mount.8: make propagation flags adjustable [checkmans.sh]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotools: add checks to manual page test script
Sami Kerola [Mon, 8 Apr 2013 19:32:53 +0000 (20:32 +0100)] 
tools: add checks to manual page test script

This change includes

- better way to detect manual page inclusion
- man -k header test, which uses lexgrog
- repeated word detection
- static declaration to known repeated words

Most of the  changes are based on man-page-day-1.sh, that is in use at
RedHat Quality Assurance, and wrote by Peter Schiffer.

CC: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolibblkid: number of functions should not be declared extern [smatch scan]
Sami Kerola [Mon, 8 Apr 2013 19:32:52 +0000 (20:32 +0100)] 
libblkid: number of functions should not be declared extern [smatch scan]

These functions are already marked extern in header file.

libblkid/src/dev.c:70:19: warning: function 'blkid_dev_devname' with external linkage has definition
libblkid/src/dev.c:128:26: warning: function 'blkid_dev_iterate_begin' with external linkage has definition
libblkid/src/dev.c:148:12: warning: function 'blkid_dev_set_search' with external linkage has definition
libblkid/src/dev.c:175:12: warning: function 'blkid_dev_next' with external linkage has definition
libblkid/src/dev.c:196:13: warning: function 'blkid_dev_iterate_end' with external linkage has definition
libblkid/src/tag.c:84:12: warning: function 'blkid_dev_has_tag' with external linkage has definition
libblkid/src/tag.c:282:26: warning: function 'blkid_tag_iterate_begin' with external linkage has definition
libblkid/src/tag.c:303:12: warning: function 'blkid_tag_next' with external linkage has definition
libblkid/src/tag.c:322:13: warning: function 'blkid_tag_iterate_end' with external linkage has definition
libblkid/src/tag.c:336:18: warning: function 'blkid_find_dev_with_tag' with external linkage has definition

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolibmount, col: remove redundant null checks [smatch scan]
Sami Kerola [Mon, 8 Apr 2013 19:32:51 +0000 (20:32 +0100)] 
libmount, col: remove redundant null checks [smatch scan]

libmount/src/context_umount.c:174 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free()
libmount/src/context_umount.c:179 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free()
text-utils/col.c:406 flush_lines() info: redundant null check on l->l_line calling free()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agovarious: fix shadow declarations [smatch scan]
Sami Kerola [Mon, 8 Apr 2013 19:32:50 +0000 (20:32 +0100)] 
various: fix shadow declarations [smatch scan]

libmount/src/tab.c:990:34: warning: symbol 'fs' shadows an earlier one
libmount/src/tab.c:970:26: originally declared here
misc-utils/findmnt.c:492:30: warning: symbol 'tmp' shadows an earlier one
misc-utils/findmnt.c:473:14: originally declared here
fdisks/fdiskdoslabel.c:211:36: warning: symbol 'pe' shadows an earlier one
fdisks/fdiskdoslabel.c:180:20: originally declared here
fdisks/fdiskdoslabel.c:639:34: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:578:16: originally declared here
fdisks/fdiskdoslabel.c:947:21: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:924:16: originally declared here
fdisks/fdiskdoslabel.c:976:29: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:924:16: originally declared here
fdisks/fdiskdoslabel.c:984:29: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:924:16: originally declared here

[kzak@redhat.com: - don't use local 'tmp' in findmnt.c]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agovarious: fix variable and function declarations [smatch scan]
Sami Kerola [Mon, 8 Apr 2013 19:32:49 +0000 (20:32 +0100)] 
various: fix variable and function declarations [smatch scan]

disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code
fdisks/sfdisk.c:982:5: warning: mixing declarations and code
fdisks/sfdisk.c:1254:5: warning: mixing declarations and code
fdisks/sfdisk.c:1564:5: warning: mixing declarations and code
lib/mbsalign.c:279:7: warning: mixing declarations and code
libblkid/src/devname.c:378:17: warning: mixing declarations and code
libfdisk/src/alignment.c:219:9: warning: mixing declarations and code
term-utils/wall.c:111:9: warning: mixing declarations and code
text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks'
text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line'
text-utils/rev.c:105:9: warning: mixing declarations and code
text-utils/tailf.c:245:9: warning: mixing declarations and code

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agobash-completion: swapon: add options and fix argument
Sami Kerola [Mon, 8 Apr 2013 19:32:48 +0000 (20:32 +0100)] 
bash-completion: swapon: add options and fix argument

The initial bash-completion missed swapon options -L and -U.  Use of
block device was proposed to be more appropriate than a path to a file.

Requested-by: Karel Zak <kzak@redhat.com>
References: http://marc.info/?l=util-linux-ng&m=136517310727426&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agobash-completion: setarch: use correct list for architectures
Sami Kerola [Mon, 8 Apr 2013 19:32:47 +0000 (20:32 +0100)] 
bash-completion: setarch: use correct list for architectures

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetarch: clean up usage()
Sami Kerola [Mon, 8 Apr 2013 19:32:46 +0000 (20:32 +0100)] 
setarch: clean up usage()

Requested-by: Karel Zak <kzak@redhat.com>
References: http://marc.info/?l=util-linux-ng&m=136516351523680&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolibblkid: clean up DBG()
Karel Zak [Mon, 8 Apr 2013 16:22:13 +0000 (18:22 +0200)] 
libblkid: clean up DBG()

 - use stderr only
 - use BLKID_ prefix for debug masks
 - don't use \n in in messages and don't use printf(),
   but use generic blkid_debug().

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobash-completion: Symlink runuser symlink to su so it gets loaded on demand.
Ville Skyttä [Sun, 7 Apr 2013 08:56:12 +0000 (11:56 +0300)] 
bash-completion: Symlink runuser symlink to su so it gets loaded on demand.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
[kzak@redhat.com: - use '-runuser' in the install hook
  - use the hook only if runuser is enabled]

11 years agobash-completion: Don't offer short options where corresponding long one exists.
Ville Skyttä [Sun, 7 Apr 2013 08:12:08 +0000 (11:12 +0300)] 
bash-completion: Don't offer short options where corresponding long one exists.

Users who know the short options can just hit the short option instead
of tab, and it's not likely that it would be helpful to present a list
of single character options to users who don't know them, doing so
just unnecessarily trashes the list of suggestions.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
11 years agoSpelling fixes.
Ville Skyttä [Sun, 7 Apr 2013 08:12:07 +0000 (11:12 +0300)] 
Spelling fixes.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
11 years agouuidd.8: Document --debug and --quiet long options.
Ville Skyttä [Sun, 7 Apr 2013 08:12:06 +0000 (11:12 +0300)] 
uuidd.8: Document --debug and --quiet long options.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
11 years agobash-completion: Avoid some unnecessary subshells.
Ville Skyttä [Sun, 7 Apr 2013 08:12:05 +0000 (11:12 +0300)] 
bash-completion: Avoid some unnecessary subshells.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
11 years agobash-completion: Don't offer any more completions after help or version.
Ville Skyttä [Sun, 7 Apr 2013 08:12:04 +0000 (11:12 +0300)] 
bash-completion: Don't offer any more completions after help or version.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
11 years agologger: make socket initialization in main() more readable
Karel Zak [Mon, 8 Apr 2013 14:39:59 +0000 (16:39 +0200)] 
logger: make socket initialization in main() more readable

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agologger: allow to log using tcp transport protocol
Sami Kerola [Fri, 5 Apr 2013 20:17:24 +0000 (21:17 +0100)] 
logger: allow to log using tcp transport protocol

This commit fixes error in usage() text, which claimed TCP is default
transport protocol.  That was not true, and neither it should be.  The
syslog messages has traditionally sent using UDP.

For the logger remains using UDP as first transport, but if it fails a
TCP connection is attempted.  If an user wishes remote logging can be
forced to use either UDP or TCP.  The service port for UDP is familiar
'syslog', for TCP the port 'syslog-conn' seems like reasonable default.

[kzak@redhat.com: - rename myopenlog to unix_socket(),
                  - always reset st to -1]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofsfreeze: add note about atime to the man page
Karel Zak [Mon, 8 Apr 2013 11:32:16 +0000 (13:32 +0200)] 
fsfreeze: add note about atime to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add --disable-bash-completion
Karel Zak [Fri, 5 Apr 2013 13:54:31 +0000 (15:54 +0200)] 
build-sys: add --disable-bash-completion

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobash-completion: rename shell-completion -> bash-completion
Karel Zak [Fri, 5 Apr 2013 12:58:07 +0000 (14:58 +0200)] 
bash-completion: rename shell-completion -> bash-completion

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'shell-completion' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Fri, 5 Apr 2013 12:14:28 +0000 (14:14 +0200)] 
Merge branch 'shell-completion' of git://github.com/kerolasa/lelux-utiliteetit

* 'shell-completion' of git://github.com/kerolasa/lelux-utiliteetit:
  bash-completion: add completion files to Makefile.am
  bash-completion: text-utils
  bash-completion: term-utils
  bash-completion: sys-utils
  bash-completion: schedutils
  bash-completion: misc-utils
  bash-completion: login-utils
  bash-completion: fdisks
  bash-completion: disk-utils
  bash-completion: add bash completetion configure option

11 years agologger: make local sockets to try both stream and datagram
Sami Kerola [Tue, 2 Apr 2013 19:42:57 +0000 (20:42 +0100)] 
logger: make local sockets to try both stream and datagram

When journald, from systemd, is in use logger gave following error.

$ logger --socket /dev/log test logger: connect /dev/log: Protocol wrong
type for socket

The journald supports only AF_DGRAM, and nothing else.  Support for
AF_STREAM sockets was dropped because it messed up message ordering.

From an users point of view necessity to add --udp (UNIX(TM) Datagram
Protocol?) option when talking to syslog via unix socket felt confusing
and wrong.  The command should know what is the socket type, and silently
use the correct one, unless the type is explicitely defined.

CC: Karel Zak <kzak@redhat.com>
Adviced-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetarch: add option to list settable architectures
Sami Kerola [Tue, 2 Apr 2013 19:42:53 +0000 (20:42 +0100)] 
setarch: add option to list settable architectures

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agochrt: make command syntax easier to understand in usage()
Sami Kerola [Tue, 2 Apr 2013 19:42:56 +0000 (20:42 +0100)] 
chrt: make command syntax easier to understand in usage()

And mention in manual that the default is referring to the internal
default of this command, not the Linux system default.  Manual page
example also tries to be a little more complete how to use the command.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agovipw: add usage() function
Sami Kerola [Tue, 2 Apr 2013 19:42:55 +0000 (20:42 +0100)] 
vipw: add usage() function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agosetterm: fix various color option argument lists
Sami Kerola [Tue, 2 Apr 2013 19:42:54 +0000 (20:42 +0100)] 
setterm: fix various color option argument lists

The lists did not have correct colors in usage().  Because the usage()
had to be fixed, it is best to make the output easy for translators to
work with.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agopartx: remove deprecated option from usage()
Sami Kerola [Tue, 2 Apr 2013 19:42:52 +0000 (20:42 +0100)] 
partx: remove deprecated option from usage()

The fact that -l, --list is deprecated will remain in manual page till
unforeseeable future.  Meanwhile the usage() can be made shorter.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolscpu: fix error message
Sami Kerola [Tue, 2 Apr 2013 19:42:51 +0000 (20:42 +0100)] 
lscpu: fix error message

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolosetup: allow -j option argument to be relative path
Sami Kerola [Tue, 2 Apr 2013 19:42:50 +0000 (20:42 +0100)] 
losetup: allow -j option argument to be relative path

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agofsfreeze: tell user when mandatory option is not specified
Sami Kerola [Tue, 2 Apr 2013 19:42:49 +0000 (20:42 +0100)] 
fsfreeze: tell user when mandatory option is not specified

This commit also removes use of internal magic values by replacing them
with a enum definition.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodmesg: fix usage() output consistancy
Sami Kerola [Tue, 2 Apr 2013 19:42:48 +0000 (20:42 +0100)] 
dmesg: fix usage() output consistancy

Possible facilities and levels are meant to be printed to same file as
the rest of the usage output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoagetty: the command does not have -h and -V options
Sami Kerola [Tue, 2 Apr 2013 19:42:47 +0000 (20:42 +0100)] 
agetty: the command does not have -h and -V options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agonewgrp: use xstrdup to check allocation succeeded
Sami Kerola [Tue, 2 Apr 2013 19:42:46 +0000 (20:42 +0100)] 
newgrp: use xstrdup to check allocation succeeded

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodocs: remove repeated words
Karel Zak [Fri, 5 Apr 2013 11:35:30 +0000 (13:35 +0200)] 
docs: remove repeated words

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agortcwake: add --auto to usage()
Karel Zak [Fri, 5 Apr 2013 11:19:13 +0000 (13:19 +0200)] 
rtcwake: add --auto to usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoreadprofile: reorder options in man page
Karel Zak [Fri, 5 Apr 2013 11:16:02 +0000 (13:16 +0200)] 
readprofile: reorder options in man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoreadprofile: add --counters to the man page
Karel Zak [Fri, 5 Apr 2013 11:13:10 +0000 (13:13 +0200)] 
readprofile: add --counters to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofsck: cleanup usage()
Karel Zak [Fri, 5 Apr 2013 11:07:59 +0000 (13:07 +0200)] 
fsck: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoagetty: add --chroot to usage() and man page
Karel Zak [Fri, 5 Apr 2013 10:55:20 +0000 (12:55 +0200)] 
agetty: add --chroot to usage() and man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoagetty: add -E, --remote to usage()
Karel Zak [Fri, 5 Apr 2013 10:47:42 +0000 (12:47 +0200)] 
agetty: add -E, --remote to usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoul: cleanup usage() and man page
Karel Zak [Fri, 5 Apr 2013 10:43:51 +0000 (12:43 +0200)] 
ul: cleanup usage() and man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoraw: add long options to man page
Karel Zak [Fri, 5 Apr 2013 10:36:29 +0000 (12:36 +0200)] 
raw: add long options to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agomount: add --read-write to man page
Karel Zak [Fri, 5 Apr 2013 10:32:34 +0000 (12:32 +0200)] 
mount: add --read-write to man page

11 years agomount: add --show-labels to man page
Karel Zak [Fri, 5 Apr 2013 10:19:40 +0000 (12:19 +0200)] 
mount: add --show-labels to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosetarch: normalize man page formatting
Karel Zak [Fri, 5 Apr 2013 09:49:37 +0000 (11:49 +0200)] 
setarch: normalize man page formatting

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agogetopt: fix usage() typo unquote -> unquoted
Karel Zak [Fri, 5 Apr 2013 09:21:17 +0000 (11:21 +0200)] 
getopt: fix usage() typo unquote -> unquoted

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: fix typo fsroot -> nofsroot
Karel Zak [Fri, 5 Apr 2013 09:19:56 +0000 (11:19 +0200)] 
findmnt: fix typo fsroot -> nofsroot

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoblkid: use O_CLOEXEC
Karel Zak [Wed, 3 Apr 2013 14:14:47 +0000 (16:14 +0200)] 
blkid: use O_CLOEXEC

... to make "strace -e open blkid" for libblkid stuff without
exceptions.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: use O_CLOEXEC
Karel Zak [Wed, 3 Apr 2013 14:14:15 +0000 (16:14 +0200)] 
libblkid: use O_CLOEXEC

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: use O_CLOEXEC
Karel Zak [Wed, 3 Apr 2013 14:14:03 +0000 (16:14 +0200)] 
libmount: use O_CLOEXEC

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibuuid: use O_CLOEXEC
Karel Zak [Wed, 3 Apr 2013 14:13:55 +0000 (16:13 +0200)] 
libuuid: use O_CLOEXEC

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: use O_CLOEXEC
Karel Zak [Wed, 3 Apr 2013 14:13:45 +0000 (16:13 +0200)] 
libfdisk: use O_CLOEXEC

Signed-off-by: Karel Zak <kzak@redhat.com>