]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agobuild-sys: use AC_LANG_SOURCE to suppress warnings
Sami Kerola [Sat, 26 Feb 2011 14:37:17 +0000 (15:37 +0100)] 
build-sys: use AC_LANG_SOURCE to suppress warnings

Messages bellow be supressed by using AC_LANG_SOURCE macro around
code test blocks.

m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level
configure.ac:335: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2660: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2677: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2728: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2747: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2030: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2051: AC_CACHE_CHECK is expanded from...
m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level

Reference to documentation;
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html#id1168723648533

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agortcwake: do not duplicate argument strings
Davidlohr Bueso [Sun, 27 Feb 2011 17:45:01 +0000 (14:45 -0300)] 
rtcwake: do not duplicate argument strings

This is not necessary and prevents memory leaks.

Reported-by: Marek Otahal <markotahal@gmail.com>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agoblkid: don't ignore -i
Karel Zak [Tue, 8 Mar 2011 12:32:05 +0000 (13:32 +0100)] 
blkid: don't ignore -i

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoblkid: uniformize the synopsis, remove "the the"
Benno Schulenberg [Sun, 27 Feb 2011 15:30:20 +0000 (16:30 +0100)] 
blkid: uniformize the synopsis, remove "the the"

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
13 years agotextual: tweak several manpages, mainly the blkid one
Benno Schulenberg [Sun, 27 Feb 2011 15:28:14 +0000 (16:28 +0100)] 
textual: tweak several manpages, mainly the blkid one

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
13 years agoraw: remove constants from message strings; undo some abbrevs
Benno Schulenberg [Sun, 27 Feb 2011 15:27:43 +0000 (16:27 +0100)] 
raw: remove constants from message strings; undo some abbrevs

Having a constant embedded within a message string prevents gettext from
picking up the rest of the string.  Also, translators may wish to change
word order; using a constant as a prefix or postfix makes this impossible.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
13 years agouuidd: add "-q" to synopsis, order options alphabetically
Benno Schulenberg [Sun, 27 Feb 2011 15:26:56 +0000 (16:26 +0100)] 
uuidd: add "-q" to synopsis, order options alphabetically

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
13 years agoinclude: [c.h]: remove strings.h include dublicate
Sami Kerola [Sun, 27 Feb 2011 12:05:11 +0000 (13:05 +0100)] 
include: [c.h]: remove strings.h include dublicate

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoinclude: [c.h]: typeof to __typeof__ fix
Sami Kerola [Sun, 27 Feb 2011 12:05:09 +0000 (13:05 +0100)] 
include: [c.h]: typeof to __typeof__ fix

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: update TODO
Sami Kerola [Thu, 24 Feb 2011 21:39:13 +0000 (22:39 +0100)] 
docs: update TODO

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotailf: tailf mention new help & version options in man page
Sami Kerola [Thu, 24 Feb 2011 21:39:12 +0000 (22:39 +0100)] 
tailf: tailf mention new help & version options in man page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotailf: use long options
Sami Kerola [Thu, 24 Feb 2011 21:39:11 +0000 (22:39 +0100)] 
tailf: use long options

This was TODO item from commit 947a7c9c. The patch also
introduces version and help switches.

[kzak@redhat.com: rewrite old_style_option()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologger: mention long option in logger man page
Sami Kerola [Thu, 24 Feb 2011 19:16:42 +0000 (20:16 +0100)] 
logger: mention long option in logger man page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agologger: use libc error printing facilities
Sami Kerola [Thu, 24 Feb 2011 19:16:41 +0000 (20:16 +0100)] 
logger: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologger: support long options
Sami Kerola [Thu, 24 Feb 2011 19:16:40 +0000 (20:16 +0100)] 
logger: support long options

Use getopt_long and usage output changed to match long options.
This patch will also scrutiny argument of formerly undocumented
-P option.

[kzak@redhat.com: - include c.h]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologger: fix variable type compiler warning
Sami Kerola [Thu, 24 Feb 2011 19:16:39 +0000 (20:16 +0100)] 
logger: fix variable type compiler warning

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agofsck: fix clang compiler warning
Sami Kerola [Thu, 24 Feb 2011 19:15:43 +0000 (20:15 +0100)] 
fsck: fix clang compiler warning

fsck.c:874:22: warning: format string is not a string literal
      (potentially insecure) [-Wformat-security]
errx(EXIT_USAGE, _(fs_type_syntax_error));
 ^~~~~~~~~~~~~~~~~~~~~~~

The issue was introduced in my commit 0a09eb4e, sorry.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoman page syntax fixes
Ville Skyttä [Sun, 6 Mar 2011 09:02:25 +0000 (11:02 +0200)] 
man page syntax fixes

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
13 years agomount: update mtab on "-f" and compiled with libmount
Karel Zak [Mon, 7 Mar 2011 09:06:24 +0000 (10:06 +0100)] 
mount: update mtab on "-f" and compiled with libmount

Reported-by: silvan minghetti <bu1137@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: segfaults with inconsistent entry in /etc/fstab
Karel Zak [Fri, 4 Mar 2011 13:44:29 +0000 (14:44 +0100)] 
umount: segfaults with inconsistent entry in /etc/fstab

Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/726283
Reported-by: Greg Brockman <gdb@gregbrockman.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO
Karel Zak [Thu, 3 Mar 2011 21:57:27 +0000 (22:57 +0100)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomove struct option to .rodata
Karel Zak [Thu, 3 Mar 2011 14:00:30 +0000 (15:00 +0100)] 
move struct option to .rodata

It does not make sense to have writable large arrays of "struct
option" on the stack.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO file
Karel Zak [Thu, 3 Mar 2011 13:58:59 +0000 (14:58 +0100)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add term-utils/.gitignore
Karel Zak [Wed, 2 Mar 2011 13:29:34 +0000 (14:29 +0100)] 
build-sys: add term-utils/.gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move wall to term-utils/
Karel Zak [Wed, 2 Mar 2011 13:20:33 +0000 (14:20 +0100)] 
build-sys: move wall to term-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move mesg to term-utils/
Karel Zak [Wed, 2 Mar 2011 13:18:31 +0000 (14:18 +0100)] 
build-sys: move mesg to term-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move reset to term-utils/
Karel Zak [Wed, 2 Mar 2011 13:08:30 +0000 (14:08 +0100)] 
build-sys: move reset to term-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move script and scriptreplay to term-utils/
Karel Zak [Wed, 2 Mar 2011 13:06:23 +0000 (14:06 +0100)] 
build-sys: move script and scriptreplay to term-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move setterm to term-utils/
Karel Zak [Wed, 2 Mar 2011 13:02:01 +0000 (14:02 +0100)] 
build-sys: move setterm to term-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move agetty to term-utils
Karel Zak [Wed, 2 Mar 2011 12:57:00 +0000 (13:57 +0100)] 
build-sys: move agetty to term-utils

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add term-utils/
Karel Zak [Wed, 2 Mar 2011 12:44:02 +0000 (13:44 +0100)] 
build-sys: add term-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: fix gcc warnings
Karel Zak [Tue, 1 Mar 2011 14:31:49 +0000 (15:31 +0100)] 
libblkid: fix gcc warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: fix EFI GPT uuid byte order
Karel Zak [Tue, 1 Mar 2011 09:01:21 +0000 (10:01 +0100)] 
libblkid: fix EFI GPT uuid byte order

Intel uses little-endians for UUID, the rest of the sane world uses 16
byte big-endian array...

Reported-by: Andrew Lutomirski <luto@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agokill: add -q sigval to use sigqueue(2)
Karel Zak [Mon, 28 Feb 2011 16:15:40 +0000 (17:15 +0100)] 
kill: add -q sigval to use sigqueue(2)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agokill: translate "-l <num>" to RT<n>
Karel Zak [Mon, 28 Feb 2011 14:09:18 +0000 (15:09 +0100)] 
kill: translate "-l <num>" to RT<n>

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agokill: add support for real-time signals
Karel Zak [Mon, 28 Feb 2011 12:43:28 +0000 (13:43 +0100)] 
kill: add support for real-time signals

Newly supported syntax for RT signals:

 RT<n>   = SIGRTMIN + n
 RTMIN+<n> = SIGRTMIN + n
 RTMAX-<n> = SIGRTMAX - n

the final signal number has to be in interval [SIGRTMIN,SIGRTMAX].

Note that the "SIG" prefix is also supported for RT signals of course.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=676297
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agortcwake: test for available suspend modes
Lawrence Rust [Thu, 10 Feb 2011 09:02:20 +0000 (10:02 +0100)] 
rtcwake: test for available suspend modes

Signed-off-by: Lawrence Rust <lawrence@softsystem.co.uk>
13 years agodmesg.c: cleanups -- use err(), xalloc()
Marek Polacek [Mon, 28 Feb 2011 09:10:32 +0000 (10:10 +0100)] 
dmesg.c: cleanups -- use err(), xalloc()

Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO
Karel Zak [Sat, 26 Feb 2011 13:14:17 +0000 (14:14 +0100)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: try to detect if PT is newer than LVM
Karel Zak [Thu, 24 Feb 2011 13:03:44 +0000 (14:03 +0100)] 
libblkid: try to detect if PT is newer than LVM

LVM (pvcreate) wipes the begin of the device. If there is a PT in the
wiped area then LVM signature is obsolete.

 # pvcreate /dev/sdb
 # fdisk /dev/sdb

old version:
 # blkid -p -o udev /dev/sdb
 ID_FS_TYPE=LVM2_member

new version:
 # blkid -p -o udev /dev/sdb
 ID_PART_TABLE_TYPE=dos

Reported-by: Matej Cepl <mcepl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=679799
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO
Karel Zak [Wed, 23 Feb 2011 16:26:19 +0000 (17:26 +0100)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: update libmount tests (add optstr output)
Karel Zak [Tue, 22 Feb 2011 23:22:00 +0000 (00:22 +0100)] 
tests: update libmount tests (add optstr output)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: better "user" evaluation
Karel Zak [Tue, 22 Feb 2011 23:21:54 +0000 (00:21 +0100)] 
libmount: better "user" evaluation

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: don't export functions for vfs/fs/userspace mount options
Karel Zak [Tue, 22 Feb 2011 17:41:20 +0000 (18:41 +0100)] 
libmount: don't export functions for vfs/fs/userspace mount options

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoipcs: fix typo
Karel Zak [Mon, 21 Feb 2011 18:06:54 +0000 (19:06 +0100)] 
ipcs: fix typo

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO file
Karel Zak [Mon, 21 Feb 2011 16:18:09 +0000 (17:18 +0100)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: bitwise or TT_FL_ASCII with tt_flags instead of setting
Dave Reisner [Mon, 21 Feb 2011 13:51:24 +0000 (08:51 -0500)] 
lsblk: bitwise or TT_FL_ASCII with tt_flags instead of setting

Signed-off-by: Dave Reisner <d@falconindy.com>
13 years agohwclock: make RTC default to UTC time
Daniel Drake [Mon, 21 Feb 2011 13:27:07 +0000 (13:27 +0000)] 
hwclock: make RTC default to UTC time

If /etc/adjtime doesn't specify UTC or LOCAL, rtcwake defaults to UTC
and hwclock defaults to LOCAL.

Switch hwclock to meet the behaviour of rtcwake (default=UTC), also
matching the kernel's CONFIG_RTC_HCTOSYS behaviour.

The user impact of this change should be minimal, as anyone who has run
"hwclock --systohc" before will have their UTC/LOCAL choice already
recorded in /etc/adjtime.

Signed-off-by: Daniel Drake <dsd@laptop.org>
13 years agocfdisk: fix compiler warning
Karel Zak [Mon, 21 Feb 2011 16:06:26 +0000 (17:06 +0100)] 
cfdisk: fix compiler warning

cfdisk.c: In function ‘menuUpdate’:
cfdisk.c:1034:25: warning: unused variable ‘ymargin’

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agocfdisk: remove unused vertical menu direction code
Francesco Cosoleto [Sun, 20 Feb 2011 07:36:16 +0000 (08:36 +0100)] 
cfdisk: remove unused vertical menu direction code

It isn't used and doesn't seem very important, as well as requires more
work to run properly.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
13 years agoscriptreplay: bug in argument check
Sami Kerola [Sun, 20 Feb 2011 12:21:17 +0000 (13:21 +0100)] 
scriptreplay: bug in argument check

Number of arguments cannot be at the same time too many and few.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoscript: inform about long options in script manual page
Sami Kerola [Sun, 20 Feb 2011 12:21:16 +0000 (13:21 +0100)] 
script: inform about long options in script manual page

[kzak@redhat.com: - use -V instead of -v]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoscript: support for long options
Sami Kerola [Sun, 20 Feb 2011 12:21:15 +0000 (13:21 +0100)] 
script: support for long options

[kzak@redhat.com: - use -V instead of -v
  - minor changes in usage()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoscript: use libc error printing facilities
Sami Kerola [Sun, 20 Feb 2011 12:21:14 +0000 (13:21 +0100)] 
script: use libc error printing facilities

[kzak@redhat.com: - use more verbose warnings]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoscript: fix compiler warnings
Sami Kerola [Sun, 20 Feb 2011 12:21:13 +0000 (13:21 +0100)] 
script: fix compiler warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agogetopt: fix '--unqote' typo in usage text
Francesco Cosoleto [Sun, 20 Feb 2011 07:34:27 +0000 (08:34 +0100)] 
getopt: fix '--unqote' typo in usage text

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
13 years agomkswap: fix compiler warning
Karel Zak [Mon, 21 Feb 2011 15:22:52 +0000 (16:22 +0100)] 
mkswap: fix compiler warning

mkswap.c: In function ‘main’:
mkswap.c:646:6: warning: too few arguments for format

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodoc: mention mkswap long options in man page
Sami Kerola [Sat, 19 Feb 2011 23:00:42 +0000 (00:00 +0100)] 
doc: mention mkswap long options in man page

The update will also expand kernel version numbers to have a
month and year next to them. This should help users can get idea
how long, for example, swap v1 has been around.

[kzak@redhat.com: - modify synopsis, remove duplicate info about page size]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomkswap: coding style unification
Sami Kerola [Sat, 19 Feb 2011 23:00:41 +0000 (00:00 +0100)] 
mkswap: coding style unification

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomkswap: fix to compiler warnings
Sami Kerola [Sat, 19 Feb 2011 23:00:40 +0000 (00:00 +0100)] 
mkswap: fix to compiler warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomkswap: use EXIT_ values
Sami Kerola [Sat, 19 Feb 2011 23:00:39 +0000 (00:00 +0100)] 
mkswap: use EXIT_ values

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomkswap: support long options and check user inputs
Sami Kerola [Sat, 19 Feb 2011 23:00:38 +0000 (00:00 +0100)] 
mkswap: support long options and check user inputs

[kzak@redhat-com: - mimor changes to usage()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib: [strutils.c] more robust strtol checks
Karel Zak [Mon, 21 Feb 2011 14:35:04 +0000 (15:35 +0100)] 
lib: [strutils.c] more robust strtol checks

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agostrutils: new wrapper function strtoll_or_err
Sami Kerola [Sat, 19 Feb 2011 23:00:37 +0000 (00:00 +0100)] 
strutils: new wrapper function strtoll_or_err

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomkswap: use xalloc
Sami Kerola [Sat, 19 Feb 2011 23:00:36 +0000 (00:00 +0100)] 
mkswap: use xalloc

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomkswap: use libc error messaging facilities
Sami Kerola [Sat, 19 Feb 2011 23:00:35 +0000 (00:00 +0100)] 
mkswap: use libc error messaging facilities

[kzak@redhat.com: - use "%s from %s" for -V output]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add tests for [u]mount regular file
Karel Zak [Mon, 21 Feb 2011 14:12:30 +0000 (15:12 +0100)] 
tests: add tests for [u]mount regular file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoumount: allow unmounting loopdev specified by associated file
Petr Uzel [Thu, 17 Feb 2011 11:52:43 +0000 (12:52 +0100)] 
umount: allow unmounting loopdev specified by associated file

Make it possible to unmount a filesystem on a loop device if it is
specified by associated backing file. It does not attempt to unmount
anything if there are more than one loop device associated with the
given file.

Umount looks for associated loopdevice(s) only if umount is called
with the regular file as an argument.

Before:
mount -o loop -t ext2 img mnt
umount -v img
> Could not find /home/puzel/upstream/util-linux/img in mtab
> umount: img: not mounted

After:
mount -o loop -t ext2 img mnt
umount -v img
> img is associated with /dev/loop0, trying to unmount it
> /dev/loop0 has been unmounted

[kzak@redhat.com: - fix memory leak in lomount.c]

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoinclude: [xalloc.h]: mention strdup in the file description
Petr Uzel [Thu, 17 Feb 2011 12:09:07 +0000 (13:09 +0100)] 
include: [xalloc.h]: mention strdup in the file description

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolscpu: use xstrdup from xalloc.h
Petr Uzel [Thu, 17 Feb 2011 12:09:06 +0000 (13:09 +0100)] 
lscpu: use xstrdup from xalloc.h

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolosetup: spelling fixes
Petr Uzel [Thu, 17 Feb 2011 12:09:05 +0000 (13:09 +0100)] 
losetup: spelling fixes

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agohexdump: new usage(), xalloc and err.h stuff
Sami Kerola [Sat, 12 Feb 2011 20:55:53 +0000 (21:55 +0100)] 
hexdump: new usage(), xalloc and err.h stuff

New usage help screen and print version switch. Also fixes to
exit codes, util linux xmalloc replaced emalloc and every error
print is using libc error function.

[kzak@redhat.com: - minor changes in formatting and coding style]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoipcs: really show all resources when -a and -i are combined
Jens Kristian Søgaard [Fri, 11 Feb 2011 21:28:03 +0000 (22:28 +0100)] 
ipcs: really show all resources when -a and -i are combined

When you have more than one resource with the same id (but differing
types) combining -a and -i does not show all resources. This patch
corrects that.

Signed-off-by: Jens Kristian Søgaard <jens@mermaidconsulting.dk>
13 years agolsblk: fix readlink() usage
Karel Zak [Fri, 18 Feb 2011 13:36:04 +0000 (14:36 +0100)] 
lsblk: fix readlink() usage

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoRevert "libmount: do not check for EAGAIN after flock()"
Karel Zak [Fri, 18 Feb 2011 09:53:50 +0000 (10:53 +0100)] 
Revert "libmount: do not check for EAGAIN after flock()"

 Linux is not 100% POSIX compatible in this area...
 strace: "flock(3, LOCK_EX|LOCK_NB)   = -1 EAGAIN (Resource temporarily unavailable)"

This reverts commit 78d8c28f746bcc8d4e642c39669d8e58dea8d029.

13 years agoRevert "libuuid: do not check for EAGAIN after flock()"
Karel Zak [Fri, 18 Feb 2011 09:52:22 +0000 (10:52 +0100)] 
Revert "libuuid: do not check for EAGAIN after flock()"

 Linux is not 100% POSIX compatible in this area...
 strace: "flock(3, LOCK_EX|LOCK_NB)   = -1 EAGAIN (Resource temporarily unavailable)"

This reverts commit d6c8d399b93f4646a90d0180fdcc1be35235a9c7.

13 years agobuild-sys: add uuid_generate_time_safe.3 .gitignore
Karel Zak [Thu, 17 Feb 2011 15:32:36 +0000 (16:32 +0100)] 
build-sys: add uuid_generate_time_safe.3 .gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update TODO file
Karel Zak [Thu, 17 Feb 2011 15:30:52 +0000 (16:30 +0100)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochsh: fix gcc link() warn_unused_result warning
Karel Zak [Thu, 17 Feb 2011 11:00:36 +0000 (12:00 +0100)] 
chsh: fix gcc link() warn_unused_result warning

setpwnam.c:176:9: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofsck: fix -C parsing
Karel Zak [Thu, 17 Feb 2011 10:56:51 +0000 (11:56 +0100)] 
fsck: fix -C parsing

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: [cpuset] call free() for range
Karel Zak [Thu, 17 Feb 2011 10:26:36 +0000 (11:26 +0100)] 
tests: [cpuset] call free() for range

The free() before exit() is not so important, but let's keep the
example code nice and consistent.

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agochsh: fix small memory leak
Karel Zak [Thu, 17 Feb 2011 10:23:24 +0000 (11:23 +0100)] 
chsh: fix small memory leak

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: does not ignore setgid() return code for non-roots
Karel Zak [Thu, 17 Feb 2011 10:16:43 +0000 (11:16 +0100)] 
login: does not ignore setgid() return code for non-roots

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: more robust whole-disk detection
Karel Zak [Thu, 17 Feb 2011 10:02:26 +0000 (11:02 +0100)] 
fdisk: more robust whole-disk detection

In lib/wholedisk.c, i is set to 0. If fd was a -1, then at
line 18 geometry.start is used without it being initialized.

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibuuid: move __uuid function to UUIDD_PRIVATE in uuid.sym
Karel Zak [Wed, 16 Feb 2011 15:36:18 +0000 (16:36 +0100)] 
libuuid: move __uuid function to UUIDD_PRIVATE in uuid.sym

The private functions for uuidd should not be included in the normal
versioned part or the library.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibuuid: update manpage, mention uuid_generate_time_safe
Petr Uzel [Mon, 14 Feb 2011 13:43:30 +0000 (14:43 +0100)] 
libuuid: update manpage, mention uuid_generate_time_safe

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: introduce uuid_generate_time_safe()
Petr Uzel [Mon, 14 Feb 2011 13:43:29 +0000 (14:43 +0100)] 
libuuid: introduce uuid_generate_time_safe()

The problem with libuuid interface is that it is impossible to
inform the caller of uuid_generate_time() if the UUID was generated
in a safe manner (either via uuidd, or using the global clock state
counter).

This patch introduces new function,

int uuid_generate_time_safe(uuid_t out)

which can report whether the generated UUID is safe.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: __uuid_generate_time(): report if clock_seq is safe
Petr Uzel [Mon, 14 Feb 2011 13:43:28 +0000 (14:43 +0100)] 
libuuid: __uuid_generate_time(): report if clock_seq is safe

Propagate return value from get_clock() through __uuid_generate_time().

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: rename uuid__generate_* to __uuid_generate_*
Petr Uzel [Mon, 14 Feb 2011 13:43:27 +0000 (14:43 +0100)] 
libuuid: rename uuid__generate_* to __uuid_generate_*

Having uuid_generate_time and uuid__generate_time at
the same time is confusing. These functions are exported,
but not part of the official API (used by uuidd only).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: get_clock(): report if the clock_seq is safe
Petr Uzel [Mon, 14 Feb 2011 13:43:26 +0000 (14:43 +0100)] 
libuuid: get_clock(): report if the clock_seq is safe

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: do not use invalid file descriptor
Petr Uzel [Mon, 14 Feb 2011 13:43:25 +0000 (14:43 +0100)] 
libuuid: do not use invalid file descriptor

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: manpage spelling fixes
Petr Uzel [Mon, 14 Feb 2011 13:43:24 +0000 (14:43 +0100)] 
libuuid: manpage spelling fixes

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibuuid: fix test in get_clock()
Petr Uzel [Mon, 14 Feb 2011 13:43:23 +0000 (14:43 +0100)] 
libuuid: fix test in get_clock()

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agouuidd: fix manpage: libuuid(3) does not exist
Petr Uzel [Mon, 14 Feb 2011 13:43:22 +0000 (14:43 +0100)] 
uuidd: fix manpage: libuuid(3) does not exist

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agopartx: improve clarity of some messages, gettextize two missed ones
Benno Schulenberg [Tue, 1 Feb 2011 10:41:29 +0000 (11:41 +0100)] 
partx: improve clarity of some messages, gettextize two missed ones

[kzak@redhat.com: - use <disk> rather than <device> in
                    error/verbose messages]

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotextual: improve the wording of some error and usage messages
Benno Schulenberg [Mon, 31 Jan 2011 21:35:44 +0000 (22:35 +0100)] 
textual: improve the wording of some error and usage messages

[kzak@redhat.com: - cleanup lscpu(1) usage text
                  - use <disk> rather than <device> in partx(8)
                    usage text]

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotextual: fix three typos in message strings and improve consistency
Benno Schulenberg [Mon, 31 Jan 2011 10:44:42 +0000 (11:44 +0100)] 
textual: fix three typos in message strings and improve consistency

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
13 years agofsck: use xmalloc, warn & err and new usage
Sami Kerola [Wed, 16 Feb 2011 14:20:11 +0000 (15:20 +0100)] 
fsck: use xmalloc, warn & err and new usage

All compler errors reported by -Wall -Wextra -pedantic are fixed.

The patch also makes fsck to use xalloc instead of it's own malloc.
That will make fsck to exit, which could be good thing, at sections
where it previously did not.

Almost all print outs where touched, where various printfs where
converted to warn or err messages.

Finally theres a fix to counter wrap bug that could (very unlikely)
manifest itself if an user specifies same flag exactly UINT_MAX times.

[kzak@redhat.com: - coding style
                  - define XALLOC_EXIT_CODE
                  - use verbose++ in main()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: favour small patches
Sami Kerola [Tue, 15 Feb 2011 08:03:28 +0000 (09:03 +0100)] 
docs: favour small patches

http://www.spinics.net/lists/util-linux-ng/msg04084.html

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolib: [strutils] avoid integer overflow on large values
Dave Reisner [Tue, 15 Feb 2011 09:06:08 +0000 (10:06 +0100)] 
lib: [strutils] avoid integer overflow on large values

This is visible on a 2TB disk via lsblk, where a large partition
incorrectly displays as 1.171798692T instead of 1.8T. This is
corrected by using a uint64_t type instead of a simple int --
consistant with the type used in lsblk.c to represent the raw size in
bytes.

[kzak@redhat.com: - add EiB support
                  - add size_to_human_string() to regression tests]

Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Karel Zak <kzak@redhat.com>