]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
12 years agolibblkid: Probe UDF volumes for ISO9660 info as well
Zeeshan Ali (Khattak) [Tue, 12 Feb 2013 01:33:18 +0000 (03:33 +0200)] 
libblkid: Probe UDF volumes for ISO9660 info as well

I have seen blkid failing to report any meaningful data on some of UDF
volumes I have (Windows installer media):

$ ./blkid -p -o udev en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso
ID_FS_LABEL=UDF_Volume
ID_FS_LABEL_ENC=UDF\x20Volume
ID_FS_TYPE=udf

Also, once my patches to expose more of ISO9660 info get merged, we'd
also need the same info to be exposed for UDF volumes.

This patch adds ISO9660 probing to UDF volumes and here is the result I
see on my example UDF volume (together with my pending patch to expose
more ISO9660 information):

$ ./blkid -p -o udev en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso
ID_FS_PUBLISHER_ID=MICROSOFT CORPORATION
ID_FS_APPLICATION_ID=CDIMAGE 2.54 (01/01/2005 TM)
ID_FS_UUID=2011-04-12-02-38-58-00
ID_FS_UUID_ENC=2011-04-12-02-38-58-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=GSP1RMCPRXFRER_EN_DVD
ID_FS_LABEL_ENC=GSP1RMCPRXFRER_EN_DVD
ID_FS_TYPE=iso9660

$ ./blkid -p -o udev en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso
ID_FS_PUBLISHER_ID=MICROSOFT CORPORATION
ID_FS_APPLICATION_ID=CDIMAGE 2.52 (03/09/2004 TM)
ID_FS_UUID=2008-04-14-12-00-00-00
ID_FS_UUID_ENC=2008-04-14-12-00-00-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=GRTMPFPP_EN
ID_FS_LABEL_ENC=GRTMPFPP_EN
ID_FS_TYPE=iso9660

Before anyone asks, Yes! The UDF media I have is all legal and downloaded
directly from MSDN. :)

[kzak@redhat.com: - read LABEL from UDF only if not found anything
                    useful in ISO9660]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: Expose more ISO9660 headers
Zeeshan Ali (Khattak) [Mon, 11 Feb 2013 21:22:12 +0000 (23:22 +0200)] 
libblkid: Expose more ISO9660 headers

In order to kill libosinfo's infamous udev rule[1], we need to make blkid
report the following information as udev properties on IS09660 media so
that libosinfo can make use of that for detection:

1. Volume ID (already exposed as label).
2. System ID.
3. Publisher ID.
4. Application ID.
5. Boot record's boot system ID, (almost always 'EL TORITO
   SPECIFICATION' if boot record is present).

Example use:

$ blkid -p -o udev Fedora-17-x86_64-DVD.iso
ID_FS_SYSTEM_ID=LINUX
ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C)
1993 E.YOUNGDALE
ID_FS_UUID=2012-05-22-20-55-32-00
ID_FS_UUID_ENC=2012-05-22-20-55-32-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=Fedora_17_x86_64
ID_FS_LABEL_ENC=Fedora\x2017\x20x86_64
ID_FS_TYPE=iso9660
ID_PART_TABLE_TYPE=dos

[1] https://fedorahosted.org/libosinfo/ticket/1

[kzak@redhat.com: - add blkid_ltrim_whitespace() and use it together
                    with blkid_rtrim_whitespace() to trim white spaces
                  - enlarge blkid values to 128 bytes
                  - add generic blkid_probe_set_id_label() function
                  - always terminate all _ID with \0
                  - don't export the _IDs to blkid cache]

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: Don't keep reading same sector of ISO
Zeeshan Ali (Khattak) [Mon, 11 Feb 2013 21:22:11 +0000 (23:22 +0200)] 
libblkid: Don't keep reading same sector of ISO

We were reading the same sector over and over again when parsing ISO9660.
This patches fixes it.

12 years agobuild-sys: add package url to AC_INIT
Sami Kerola [Sun, 10 Feb 2013 21:33:41 +0000 (21:33 +0000)] 
build-sys: add package url to AC_INIT

See last line from './configure --help'.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agobuild-sys: use AC_USE_SYSTEM_EXTENSIONS
Sami Kerola [Sun, 10 Feb 2013 21:33:40 +0000 (21:33 +0000)] 
build-sys: use AC_USE_SYSTEM_EXTENSIONS

The AC_GNU_SOURCE is obsolete.

Addresses: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fGNU_005fSOURCE-2058
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agobuild-sys: use AC_COMPILE_IFELSE
Sami Kerola [Sun, 10 Feb 2013 21:33:39 +0000 (21:33 +0000)] 
build-sys: use AC_COMPILE_IFELSE

The AC_TRY_COMPILE is obsolete.

Addresses: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fTRY_005fCOMPILE-2203
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agolibmount: add missing MNT_ERR_AMBIFS
Karel Zak [Thu, 14 Feb 2013 08:20:30 +0000 (09:20 +0100)] 
libmount: add missing MNT_ERR_AMBIFS

Sorry, the last commit into libmount has been incomplete.

Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agoswitch_root: Add a sanity check
Richard Weinberger [Sat, 9 Feb 2013 18:22:50 +0000 (19:22 +0100)] 
switch_root: Add a sanity check

As switch_root basically does rm -Rf / we should make sure
that / is really an initramfs.

Signed-off-by: Richard Weinberger <richard@nod.at>
12 years agobuild-sys: add config-gen.d stuff for chsh-chfn
Karel Zak [Wed, 13 Feb 2013 12:49:05 +0000 (13:49 +0100)] 
build-sys: add config-gen.d stuff for chsh-chfn

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agochsh-chfn: fix bugs, improve compilation
Karel Zak [Wed, 13 Feb 2013 12:44:34 +0000 (13:44 +0100)] 
chsh-chfn: fix bugs, improve compilation

 * rename --disable-require-password to --disable-chsh-chfn-password

 * is_local() is really unnecessary when linked with libuser

 * fix set_value_libuser() returns codes

 * fix chfn.c, there is no 'pw', but oldf.pw

 * don't link with PAM when--disable-chsh-chfn-password

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibmount: correctly propagate ambivalent blkid probing results
Karel Zak [Wed, 13 Feb 2013 11:36:10 +0000 (12:36 +0100)] 
libmount: correctly propagate ambivalent blkid probing results

libmount ignores "ambivalent probing result" from libblkid and tries
filesystems /etc/filesystems. This is incorrect behavior.

Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agochfn: Add libuser support
Cody Maloney [Thu, 7 Feb 2013 06:22:21 +0000 (23:22 -0700)] 
chfn: Add libuser support

Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
12 years agochsh: Add libuser support
Cody Maloney [Thu, 7 Feb 2013 06:22:20 +0000 (23:22 -0700)] 
chsh: Add libuser support

This is based directly on lchsh which is a part of libuser. libuser.{c,h}
exist because exactly the same code is needed for both chsh and chfn.

[kzak@redhat.com: cleanup err() usage]

Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agochsh-chfn: Move pam auth to its own function, factoring out common code
Cody Maloney [Thu, 7 Feb 2013 06:22:19 +0000 (23:22 -0700)] 
chsh-chfn: Move pam auth to its own function, factoring out common code

This makes it easier to add support for libuser, which needs the same PAM
authentication. Also removes duplicate code between chsh and chfn.

Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
12 years agobuild-sys: Add flag for enabling/disabling libuser support.
Cody Maloney [Thu, 7 Feb 2013 06:22:18 +0000 (23:22 -0700)] 
build-sys: Add flag for enabling/disabling libuser support.

Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
12 years agolibmount: tags does not start with '/'
Karel Zak [Mon, 11 Feb 2013 15:53:11 +0000 (16:53 +0100)] 
libmount: tags does not start with '/'

References: https://bugzilla.redhat.com/show_bug.cgi?id=909866
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: add missing le16_to_cpu to sil raid prober
Karel Zak [Thu, 7 Feb 2013 09:47:32 +0000 (10:47 +0100)] 
libblkid: add missing le16_to_cpu to sil raid prober

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: improve Silicon RAID prober
Karel Zak [Thu, 7 Feb 2013 09:31:49 +0000 (10:31 +0100)] 
libblkid: improve Silicon RAID prober

 * count checksum from superblock
 * new (correct) superblock definition from dmraid

Reported-by: Frank Hirtz <fhirtz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: make blkid_new_probe_from_filename() usable on whole-disk
Karel Zak [Wed, 6 Feb 2013 16:26:46 +0000 (17:26 +0100)] 
libblkid: make blkid_new_probe_from_filename() usable on whole-disk

This is stupid bug, when libblkid probe for partition table on
whole-disk device with old 0.90 Linux RAID then it creates clone of
the struct blkid_probe to avoid collisions with the original probing
setting.

If the cloned prober is unnecessary then it's deallocated by
blkid_free_probe() ... and this function also closes the file
descriptor if the device has been opened by blkid_new_probe_from_filename().

Fortunately we usually use open() + blkid_probe_set_device(), ...
except wipefs(1).

Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosetpriv: Fix an error message typo
Andy Lutomirski [Wed, 6 Feb 2013 01:07:26 +0000 (17:07 -0800)] 
setpriv: Fix an error message typo

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
12 years agotests: add f2fs image test
Alejandro Martinez Ruiz [Tue, 5 Feb 2013 17:00:07 +0000 (18:00 +0100)] 
tests: add f2fs image test

Signed-off-by: Alejandro Martinez Ruiz <alex@nowcomputing.com>
12 years agolibblkid: add Flash-Friendly File System (f2fs) support
Alejandro Martinez Ruiz [Tue, 5 Feb 2013 17:00:06 +0000 (18:00 +0100)] 
libblkid: add Flash-Friendly File System (f2fs) support

This adds support for detecting Flash-Friendly File System (f2fs) to libblkid.
Based on work by Sven-Göran Bergh at http://www.mail-archive.com/busybox@busybox.net/msg17874.html

Signed-off-by: Alejandro Martinez Ruiz <alex@nowcomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agobuild-sys: test for secure_getenv() too.
Cristian Rodríguez [Tue, 5 Feb 2013 05:08:03 +0000 (02:08 -0300)] 
build-sys: test for secure_getenv() too.

In current glibc versions, internal __secure_getenv
no longer exists and was replaced by secure_getenv()

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
12 years agobuild-sys: add namespace.h to distribution
Sami Kerola [Thu, 31 Jan 2013 19:49:48 +0000 (19:49 +0000)] 
build-sys: add namespace.h to distribution

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agoeject: remove a duplicate command name from error message
Sami Kerola [Wed, 30 Jan 2013 20:33:25 +0000 (20:33 +0000)] 
eject: remove a duplicate command name from error message

Let the err() print the command name.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotranslation: unify exec error messages
Sami Kerola [Wed, 30 Jan 2013 20:33:24 +0000 (20:33 +0000)] 
translation: unify exec error messages

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agoa pointer should not be compared to zero [coccinelle]
Sami Kerola [Wed, 30 Jan 2013 20:33:23 +0000 (20:33 +0000)] 
a pointer should not be compared to zero [coccinelle]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotextual: fix two misencodings in comments
Benno Schulenberg [Sat, 26 Jan 2013 16:42:41 +0000 (17:42 +0100)] 
textual: fix two misencodings in comments

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: spell and encode the name of Arkadiusz Miśkiewicz correctly
Benno Schulenberg [Sat, 26 Jan 2013 16:07:51 +0000 (17:07 +0100)] 
textual: spell and encode the name of Arkadiusz Miśkiewicz correctly

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agodocs: AUTHORS: remove four duplicate entries
Benno Schulenberg [Sat, 26 Jan 2013 14:40:44 +0000 (15:40 +0100)] 
docs: AUTHORS: remove four duplicate entries

Also fix a spello, remove unneeded backslashes,
and add two missing accents.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agodocs: NEWS: add some missing accents, since this is now UTF-8
Benno Schulenberg [Sat, 26 Jan 2013 14:35:57 +0000 (15:35 +0100)] 
docs: NEWS: add some missing accents, since this is now UTF-8

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agomount: fix bind mount success message
Bernhard Voelker [Mon, 28 Jan 2013 15:20:24 +0000 (16:20 +0100)] 
mount: fix bind mount success message

* sys-utils/mount.c (success_message): s/binded/bound/.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
12 years agodocs: improve wording, formatting and accuracy of ipcs man page
Benno Schulenberg [Sun, 27 Jan 2013 13:40:19 +0000 (14:40 +0100)] 
docs: improve wording, formatting and accuracy of ipcs man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agoipcs: report an error when -i is used with multiple resources
Benno Schulenberg [Sun, 27 Jan 2013 12:09:51 +0000 (13:09 +0100)] 
ipcs: report an error when -i is used with multiple resources

Also put everything in POSIX order: queues, memory, sempahores.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agosetpriv: move paths to pathnames.h
Karel Zak [Tue, 5 Feb 2013 10:48:55 +0000 (11:48 +0100)] 
setpriv: move paths to pathnames.h

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agosetpriv: run a program with different Linux privilege settings
Andy Lutomirski [Mon, 14 Jan 2013 15:58:57 +0000 (07:58 -0800)] 
setpriv: run a program with different Linux privilege settings

This new command can set no_new_privs, uid, gid, groups, securebits,
inheritable caps, the cap bounding set, securebits, and selinux and
apparmor labels.

[kerolasa@iki.fi: a lot of small adjustment making the command to be good
fit to util-linux project]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
12 years agolibblkid: add blkid_probe_step_back()
Karel Zak [Mon, 4 Feb 2013 10:28:09 +0000 (11:28 +0100)] 
libblkid: add blkid_probe_step_back()

It seems that blkid_do_probe() is too high-level solution for some
mkfs programs (for example ext4 mkfs supports "undo" so all write
operations has to be implemented by filesystem specific functions).

The new function blkid_probe_step_back() resets internal libblkid
buffers and move probing stuff one step back. It means that the
previously used probing function will be called again in the next
blkid_do_probe() call. This allows to modify on-disk data and check
for backup superblocks or alternative magic strings. Something like:

  while (blkid_do_probe(pr) == 0) {
    ... get SBMAGIC_OFFSET and SBMAGIC len ...
    ... use your private seek & write() ...

    blkid_probe_step_back(pr);
  }

References: https://bugzilla.redhat.com/show_bug.cgi?id=902512
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agonewgrp: more robust crypt() usage
Karel Zak [Fri, 1 Feb 2013 17:00:52 +0000 (18:00 +0100)] 
newgrp: more robust crypt() usage

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agolibblkid: remove optimization from verify( funrtion
Karel Zak [Fri, 1 Feb 2013 14:59:58 +0000 (15:59 +0100)] 
libblkid: remove optimization from verify( funrtion

Now libblkid (the cache based part) tries to probe for the cached
filesystem firstly. This optimization is broken, because:

  * new another superblock could be on the device and the original
    is already obsolete
  * we still need to probe for partitions and raids
  * the code was too fragile

The patch also suggests lsblk --fs in blkid.8 for end users. lsblk
read information from used db.

Reported-by: Andreas Hofmeister <andi@collax.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotextual: improve an error message and a help text
Benno Schulenberg [Sat, 26 Jan 2013 22:21:07 +0000 (23:21 +0100)] 
textual: improve an error message and a help text

* disk-utils/isosize.c: Improve grammar of error message, and in the
help text make use of the standard angular brackets for arguments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: gettextize an overlooked string
Benno Schulenberg [Sat, 26 Jan 2013 22:17:38 +0000 (23:17 +0100)] 
textual: gettextize an overlooked string

* login-utils/islocal.c: Gettexttize the usage message.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agofstrim: remove unnecessary "were" from verbose message
Karel Zak [Wed, 30 Jan 2013 14:59:58 +0000 (15:59 +0100)] 
fstrim: remove unnecessary "were" from verbose message

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agomount: remove ext4 journal=update from man page
Karel Zak [Wed, 30 Jan 2013 14:53:39 +0000 (15:53 +0100)] 
mount: remove ext4 journal=update from man page

It's already unsupported.

References: http://patchwork.ozlabs.org/patch/123291/
Reported-by: Roman Žilka <roman.zilka@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotextual: fix the example in whereis man page, plus further improvements
Benno Schulenberg [Mon, 21 Jan 2013 22:01:09 +0000 (23:01 +0100)] 
textual: fix the example in whereis man page, plus further improvements

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agodmesg: fix usage()
Karel Zak [Wed, 30 Jan 2013 14:36:21 +0000 (15:36 +0100)] 
dmesg: fix usage()

12 years agofsck: add "--" to usage()
Karel Zak [Wed, 30 Jan 2013 14:29:12 +0000 (15:29 +0100)] 
fsck: add "--" to usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotextual: slice the help text of lscpu into strips, for translators
Benno Schulenberg [Wed, 23 Jan 2013 13:50:02 +0000 (14:50 +0100)] 
textual: slice the help text of lscpu into strips, for translators

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: slice the help text of fsck into strips, for translators
Benno Schulenberg [Wed, 23 Jan 2013 13:16:18 +0000 (14:16 +0100)] 
textual: slice the help text of fsck into strips, for translators

Also improve the descriptions a bit and alphabetize the options.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: standardize the reporting of program name plus package version
Benno Schulenberg [Wed, 23 Jan 2013 12:48:50 +0000 (13:48 +0100)] 
textual: standardize the reporting of program name plus package version

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agomkfs: indicate that specifying fs-type and fs-options are independent
Benno Schulenberg [Tue, 22 Jan 2013 10:56:58 +0000 (11:56 +0100)] 
mkfs: indicate that specifying fs-type and fs-options are independent

Also standardize and improve the help text, and slice it into strips
for ease of later translation maintenance.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agodoc: remove incorrect spaces from lscpu synopsis in manpage
Benno Schulenberg [Tue, 22 Jan 2013 10:13:07 +0000 (11:13 +0100)] 
doc: remove incorrect spaces from lscpu synopsis in manpage

Also normalize text spacing and add some formatting.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agolscpu: correct the description of --sysroot in help text
Benno Schulenberg [Tue, 22 Jan 2013 09:57:52 +0000 (10:57 +0100)] 
lscpu: correct the description of --sysroot in help text

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agofsck: mark file descriptor for -C as optional in help text
Benno Schulenberg [Tue, 22 Jan 2013 09:26:31 +0000 (10:26 +0100)] 
fsck: mark file descriptor for -C as optional in help text

Also slightly improve the man page.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: tiny tweaks of some error messages
Benno Schulenberg [Tue, 22 Jan 2013 09:08:03 +0000 (10:08 +0100)] 
textual: tiny tweaks of some error messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agomkswap: properly pluralize the bad-pages message
Benno Schulenberg [Tue, 22 Jan 2013 08:49:59 +0000 (09:49 +0100)] 
mkswap: properly pluralize the bad-pages message

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agoagetty: properly pluralize the reporting of the number of users
Benno Schulenberg [Tue, 22 Jan 2013 08:36:01 +0000 (09:36 +0100)] 
agetty: properly pluralize the reporting of the number of users

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agofdisk: add support for the Xtensa architecture
Karel Zak [Wed, 30 Jan 2013 14:18:22 +0000 (15:18 +0100)] 
fdisk: add support for the Xtensa architecture

Based on patch from Chris Zankel <chris@zankel.net>.

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agofstrim: use human readable sizes in verbose output
Karel Zak [Mon, 28 Jan 2013 08:25:08 +0000 (09:25 +0100)] 
fstrim: use human readable sizes in verbose output

  # fstrim -v /home
  /home: 513.9 MiB (538828800 bytes) were trimmed

Reported-by: member graysky <graysky@archlinux.us>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agocolumn: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:13 +0000 (23:27 +0000)] 
column: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agoagetty: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:12 +0000 (23:27 +0000)] 
agetty: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agounshare: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:11 +0000 (23:27 +0000)] 
unshare: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agoumount: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:10 +0000 (23:27 +0000)] 
umount: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agolosetup: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:09 +0000 (23:27 +0000)] 
losetup: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agohwclock: make usage() change translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:08 +0000 (23:27 +0000)] 
hwclock: make usage() change translator friendly

The --compare option from 83765871ef0d6c554c46027577648b77c7351a78 is
made to be separate fputs() line.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodmesg: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:07 +0000 (23:27 +0000)] 
dmesg: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agorename: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:06 +0000 (23:27 +0000)] 
rename: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agolsblk: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:05 +0000 (23:27 +0000)] 
lsblk: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agofindmnt: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:04 +0000 (23:27 +0000)] 
findmnt: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agosu-common: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:03 +0000 (23:27 +0000)] 
su-common: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agopartx: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:02 +0000 (23:27 +0000)] 
partx: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agonsenter: make usage() translator friendly
Sami Kerola [Tue, 22 Jan 2013 23:27:01 +0000 (23:27 +0000)] 
nsenter: make usage() translator friendly

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodocs: usage function and gettext
Sami Kerola [Tue, 22 Jan 2013 23:27:00 +0000 (23:27 +0000)] 
docs: usage function and gettext

I made following survey which was sent to all email addresses in po/
directory that had the on-going millenium as time when translator had
been active.

  There are two quite common styles to write a command usage print out,
  which one you prefer?

  1. Each option as separated translatable string. 18 votes
  2. Or the whole thing as one big output.  1 vote
  3. No preference.  1 vote

The questionaire had also free text field asking 'Why do you prefer
that?', and here are the answers.

  [Separately] It is easier to follow changes with the translations.  If
  you change only one line or two, the big string would change to fuzzy
  and I have to check the whole thing to see what was changed in the
  original.  If the changed line is a single string, the string to check
  is a lot shorter.

  [No preference] Usually, if there is no reason to separate strings,
  better keep them together so that the context is obvious.  In the case at
  hand, it might help if in some language e.g.  one translated line is too
  wide for the screen.  This is unlikely, but...  OTOH, with this solution,
  if you change one string the whole translation will be discarded until a
  translator comes and updates it...

  [Separately] It may be a bit harder to get the formatting right, but it
  is much easier in maintenance.  With one option changing, the
  translator immediately sees the spot.  And even with a lazy translator,
  program author will have all the options translated that have not
  changed at all.

  [Separately] First one would be more in elegant I believe

  [Separately] I prefer to have them separately because they don't form a
  single text paragraph.  In other words, they can be translated
  separately because they are complete and separate "sentences".  Of
  course consistency of format and word choices need to be taken care of,
  but the fact that the messages appear next to each other in the PO file
  should be enough.  Also if the options are not translated separately,
  adding or editing one option causes the translation of all options to
  become fuzzy and if for some reason it isn't checked before next
  release (happens sometimes), all of them will show untranslated to the
  user.

  [Separately] Translations are a lot easier to update that way.  If an
  option is added, removed or changed, only a small amount of text
  becomes fuzzy.  If everything is in one big output, a lot of text
  becomes fuzzy, and you have to read a lot more text to discover what
  exactly changed.

  [Separately] When updating a fuzzy translation, with one big output
  it's very tedious and error-prone to find out the reason for fuzziness,
  i.e.  what actually has changed in the msgid.

  [Separately] Way easier to translate, and especially to spot
  translation updates when one string gets removed, added or modified.

  [Separately] Makes translation memory more efficient.  Some hard terms
  in the list don't prevent translation of the whole block.  Actually the
  beginning of the strings don't need any translation ta all before []
  part.  Information about the context can be provided in comments or the
  context parameter.

  [Separately] Please consider the case when a part of string, (= msgid)
  is changed.  It is marked as fuzzy in the .po files, we translators
  have to check whole sentences for the difference between it and
  previous version.

  [Separately] Every sentence must be a separate translation unit.

  [One big output] for performance to ouput strings

  [Separately] In the second case, if only one option changes (or a new
  one is added), the translator will see as if all of the options
  changed, having to find out which one of them is really new or has
  actually changed.  Also, if the translator has had no time to update
  the string, only one of the options will be shown in the original
  language (which is arguably ugly, but better than nothing for many
  users).

  [Separately] It's easier to translate the options separately using
  translation memory.

  [Separately] Easier to separate and see changes

  [Separately] more translator friendly

  [Separately] From the user POV I found the separeted version more
  interesting because if a maintainer can't update the translation fast
  enough between releases the user will still get the current translated
  string with the new ones untraslated.  From the translator POV the big
  output will give more context information as one can see the whole
  command options.  With a new string added while the rest is translated
  having some context can be more difficult.

  [Separately] Additions to the list or changes to one options means you
  don't have to check all lines each time.

So unless you have very, _very_ good reason you should not output all
usage as one big table.  This implies also that when large usage output
is changed it should be split to small hunks.  That may be a bit more
work once, but the next change will pay the extrawork off so never
hesitate when splitting.

Reference: http://www.surveymonkey.com/s/QKZ75HK
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agonsenter: respect --exec no matter where it appears
Zbigniew Jędrzejewski-Szmek [Fri, 25 Jan 2013 15:32:01 +0000 (16:32 +0100)] 
nsenter: respect --exec no matter where it appears

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: align nsenter.1 man page with howto-man-page.txt
Sami Kerola [Sun, 20 Jan 2013 18:04:51 +0000 (18:04 +0000)] 
docs: align nsenter.1 man page with howto-man-page.txt

Most visible change; the --target option has a path - explanation table
instead a long paragraph.  This makes pairing of the information easier
for an average user such as me.

The rest of the changes are about aligning with howto, i.e., fix spaces
after dots, URL & mail address macros, remove inline emphasis where
possible, mark directory paths and words with underscore to be line
breakable, use optional option syntax from howto, cut line lenght to 80
chars.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agonsenter: fix indentation
Sami Kerola [Sun, 20 Jan 2013 18:04:56 +0000 (18:04 +0000)] 
nsenter: fix indentation

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agonsenter: drop core when impossible happens
Sami Kerola [Sun, 20 Jan 2013 18:04:55 +0000 (18:04 +0000)] 
nsenter: drop core when impossible happens

Message to user is less informative, but impossible events should be
rare so core files are much appriciated for these cases.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agonsenter: fix compiler warning
Sami Kerola [Sun, 20 Jan 2013 18:04:54 +0000 (18:04 +0000)] 
nsenter: fix compiler warning

nsenter.c:53:2: warning: ISO C forbids empty initializer braces [-pedantic]

[kzak@redhat.com: - use initialize .fd to -1]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agonsenter: adjust few error messages
Sami Kerola [Sun, 20 Jan 2013 18:04:53 +0000 (18:04 +0000)] 
nsenter: adjust few error messages

The 'neither filename nor target' is changed to use errx() rather than
err(), because the errno is indicating success at the time of fatal error
which is wrong message for an user.

The "cannot open %s" is same string as in other files, making translators
to work less.

Remaining changes aim to ease understanding what went wrong for a
non-programmer audience.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agobuild-sys: add nsenter to gitignore
Sami Kerola [Sun, 20 Jan 2013 18:04:52 +0000 (18:04 +0000)] 
build-sys: add nsenter to gitignore

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agonsenter: rename --exec/-e to --no-fork/-F
Zbigniew Jędrzejewski-Szmek [Mon, 21 Jan 2013 06:38:05 +0000 (01:38 -0500)] 
nsenter: rename --exec/-e to --no-fork/-F

The naming of this option was really confusing.
Just rename it for clarity.

[kzak@redhat.com: rebase to original code without --all]

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agonsenter: allow arguments to be specified in any order
Zbigniew Jędrzejewski-Szmek [Mon, 21 Jan 2013 06:38:01 +0000 (01:38 -0500)] 
nsenter: allow arguments to be specified in any order

Allows 'nsenter -mt $PID', which would fail previously.

[kzak@redhat.com: - fix open_target_fd() arguments]

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotextual: use UTIL_LINUX_VERSION everywhere
Karel Zak [Fri, 25 Jan 2013 11:05:26 +0000 (12:05 +0100)] 
textual: use UTIL_LINUX_VERSION everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agorenice: accept also -V for --version, and document it
Benno Schulenberg [Mon, 6 Feb 2012 16:48:25 +0000 (17:48 +0100)] 
renice: accept also -V for --version, and document it

Also improve the man page.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agorenice: correct the usage synopsis, and improve help text
Benno Schulenberg [Mon, 6 Feb 2012 15:44:23 +0000 (16:44 +0100)] 
renice: correct the usage synopsis, and improve help text

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: standardize reporting of program name plus package version
Benno Schulenberg [Mon, 6 Feb 2012 15:37:16 +0000 (16:37 +0100)] 
textual: standardize reporting of program name plus package version

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: gettextize several overlooked messages
Benno Schulenberg [Mon, 6 Feb 2012 15:11:27 +0000 (16:11 +0100)] 
textual: gettextize several overlooked messages

Also improve the clarity of some of them.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: tag two bug messages as "internal error"
Benno Schulenberg [Mon, 6 Feb 2012 15:05:35 +0000 (16:05 +0100)] 
textual: tag two bug messages as "internal error"

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: remove inconsistent periods from two error messages
Benno Schulenberg [Mon, 6 Feb 2012 15:04:33 +0000 (16:04 +0100)] 
textual: remove inconsistent periods from two error messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotextual: fix a few typos in some of the usage help texts
Benno Schulenberg [Mon, 6 Feb 2012 15:01:48 +0000 (16:01 +0100)] 
textual: fix a few typos in some of the usage help texts

Also improve clarity of some other lines of those texts.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
12 years agotests: sort commands strings
Sami Kerola [Sat, 19 Jan 2013 00:09:11 +0000 (00:09 +0000)] 
tests: sort commands strings

The list is starting to be long enough that making any order to it seems
like right thing to do.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotests: add ipcmk(1) and ipcrm(1) checks
Sami Kerola [Sat, 19 Jan 2013 00:09:10 +0000 (00:09 +0000)] 
tests: add ipcmk(1) and ipcrm(1) checks

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodmesg: parse level when --color is used
Sami Kerola [Sat, 19 Jan 2013 00:09:09 +0000 (00:09 +0000)] 
dmesg: parse level when --color is used

When user runs with --color it should not need to be combined with
filtering per level or facility, or decoding.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotests: add whereis(1) check
Sami Kerola [Sat, 19 Jan 2013 00:09:08 +0000 (00:09 +0000)] 
tests: add whereis(1) check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotests: add isosize(1) check
Sami Kerola [Sat, 19 Jan 2013 00:09:07 +0000 (00:09 +0000)] 
tests: add isosize(1) check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agodocs: mkswap.8: recommend fallocate(1)
Sami Kerola [Sat, 19 Jan 2013 00:09:06 +0000 (00:09 +0000)] 
docs: mkswap.8: recommend fallocate(1)

There is no reason why fallocate(1) should not be preferred instead of
'dd if=/dev/zero of=swapfile' with it's cumbersome size spec.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
12 years agotests: add fallocate(1) check
Sami Kerola [Sat, 19 Jan 2013 00:09:05 +0000 (00:09 +0000)] 
tests: add fallocate(1) check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotests: add setarch(8) check
Sami Kerola [Sat, 19 Jan 2013 00:09:04 +0000 (00:09 +0000)] 
tests: add setarch(8) check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotests: add setsid(1) check
Sami Kerola [Sat, 19 Jan 2013 00:09:03 +0000 (00:09 +0000)] 
tests: add setsid(1) check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodmesg: add boundary check to facility & level array usage
Sami Kerola [Sat, 19 Jan 2013 00:09:02 +0000 (00:09 +0000)] 
dmesg: add boundary check to facility & level array usage

The dmesg should not crash while --decode'ing message facilities and
levels to readable string even if the values are out of bounds.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agotests: add dmesg(1) check
Sami Kerola [Sat, 19 Jan 2013 00:09:01 +0000 (00:09 +0000)] 
tests: add dmesg(1) check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>