]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
14 years agoumount: support non-canonical devnames in mtab
Karel Zak [Mon, 11 Apr 2011 12:05:57 +0000 (14:05 +0200)] 
umount: support non-canonical devnames in mtab

Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/755193
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO
Karel Zak [Fri, 8 Apr 2011 08:15:06 +0000 (10:15 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agosetterm: use xmalloc()
Karel Zak [Wed, 6 Apr 2011 09:24:23 +0000 (11:24 +0200)] 
setterm: use xmalloc()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agosetterm: fix variable types, and unused argument warnings
Sami Kerola [Sun, 3 Apr 2011 09:10:55 +0000 (11:10 +0200)] 
setterm: fix variable types, and unused argument warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agosetterm: add note about long dump file paths to man page
Sami Kerola [Sat, 2 Apr 2011 20:56:54 +0000 (22:56 +0200)] 
setterm: add note about long dump file paths to man page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agosetterm: function screendump coding style fixed
Sami Kerola [Sat, 2 Apr 2011 20:56:53 +0000 (22:56 +0200)] 
setterm: function screendump coding style fixed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agosetterm: mention in man setterm.1 -version and -help switches
Sami Kerola [Sun, 3 Apr 2011 09:10:56 +0000 (11:10 +0200)] 
setterm: mention in man setterm.1 -version and -help switches

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agosetterm: use libc error printing facilities
Sami Kerola [Sat, 2 Apr 2011 20:56:52 +0000 (22:56 +0200)] 
setterm: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agosetterm: support -help and -version options
Sami Kerola [Sat, 2 Apr 2011 20:56:51 +0000 (22:56 +0200)] 
setterm: support -help and -version options

[kzak@redhat.com: - merge all options to the one string]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agosetterm: segfault with long dump file name
Sami Kerola [Sat, 2 Apr 2011 20:56:50 +0000 (22:56 +0200)] 
setterm: segfault with long dump file name

The patch will make too long path to be truncated to MAX_PATH
lenght. If user supplies too long file name that is caught at
fopen. Some users might find this unintuitive, so the altered
behavior will be mantioned in manual page.

Bug in earlier version was visible with a command bellow.

setterm -dump -file $(for i in $(seq 254); do printf x ; done)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolumn: use xalloc lib
Sami Kerola [Sat, 2 Apr 2011 16:30:40 +0000 (18:30 +0200)] 
column: use xalloc lib

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agorev: mention long options in man page
Sami Kerola [Sat, 2 Apr 2011 16:11:10 +0000 (18:11 +0200)] 
rev: mention long options in man page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agorev: option parsing bug fixed & long options added
Sami Kerola [Sat, 2 Apr 2011 16:11:09 +0000 (18:11 +0200)] 
rev: option parsing bug fixed & long options added

The former getopts segment gave impression unknown options will
cause the program to exit with error and help is available with
-h. Neither work quite as designed, all unknown options made the
program to exit with success; and none of the options where
known.

The fix also has support for long options, and new --version
switch.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agorev: memory leak fix
Sami Kerola [Sat, 2 Apr 2011 16:11:08 +0000 (18:11 +0200)] 
rev: memory leak fix

Moving the malloc out of loop will make leak to disappear, and
the command might run few jiffie quicker when there are 1+N
arguments.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agorev: use xrealloc from xalloc.h
Sami Kerola [Sat, 2 Apr 2011 16:11:07 +0000 (18:11 +0200)] 
rev: use xrealloc from xalloc.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agopartx: trivial comment fix
Davidlohr Bueso [Thu, 31 Mar 2011 19:08:04 +0000 (16:08 -0300)] 
partx: trivial comment fix

Replace atgv for argv

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agogetopt: add static qualifiers
Olivier Mengué [Sun, 27 Mar 2011 16:29:56 +0000 (18:29 +0200)] 
getopt: add static qualifiers

Signed-off-by: Olivier Mengué <dolmen@cpan.org>
14 years agobuild-sys: remove check-news
Karel Zak [Tue, 5 Apr 2011 14:38:06 +0000 (16:38 +0200)] 
build-sys: remove check-news

I need to call "make distcheck" often during development phase to check
that all files are correctly added to Makefiles. The "check-new"
automake option is useless if $(VERSION) is generated from git.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: use git-version-gen to distinct git and release versions
Sami Kerola [Thu, 31 Mar 2011 20:10:07 +0000 (22:10 +0200)] 
build-sys: use git-version-gen to distinct git and release versions

The script is copied as is from gnulib.

[kzak@redhat.com: - generate .tarball-version and .version files in
                    top level Makefile.am
                  - delete autom4te.cache in autogen.sh]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: fix parsing of mountinfo from 2.6.39
Karel Zak [Tue, 5 Apr 2011 12:17:51 +0000 (14:17 +0200)] 
libmount: fix parsing of mountinfo from 2.6.39

The /proc/self/mountinfo file uses " - " field as a separator between
optional fields and next fields in the file. The '-' char could be
used in the fields (for example in UUIDs), so it's necessary to check
for whole " - " string rather than for '-' char only.

Reported-by: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: fix distcheck for term-utils
Karel Zak [Mon, 4 Apr 2011 08:53:07 +0000 (10:53 +0200)] 
build-sys: fix distcheck for term-utils

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mountpoint(1) implementation to samples/
Karel Zak [Fri, 1 Apr 2011 12:17:51 +0000 (14:17 +0200)] 
libmount: add mountpoint(1) implementation to samples/

14 years agoumount: use helper= for all UIDs
Karel Zak [Fri, 1 Apr 2011 07:03:39 +0000 (09:03 +0200)] 
umount: use helper= for all UIDs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: support /run/mount rather than /dev/.mount
Karel Zak [Thu, 31 Mar 2011 19:26:57 +0000 (21:26 +0200)] 
libmount: support /run/mount rather than /dev/.mount

The /run directory should be preferred on distributions where this
directory exists.

http://thread.gmane.org/gmane.linux.redhat.fedora.devel/146976

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add dump from PPC64 to lscpu tests
Karel Zak [Thu, 31 Mar 2011 12:47:45 +0000 (14:47 +0200)] 
tests: add dump from PPC64 to lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: detect sun4{u,v} in /proc/cpuinfo for sparc64
Karel Zak [Thu, 31 Mar 2011 12:30:06 +0000 (14:30 +0200)] 
lscpu: detect sun4{u,v} in /proc/cpuinfo for sparc64

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add dump from UltraSparc T1 to lscpu tests
Karel Zak [Thu, 31 Mar 2011 12:12:35 +0000 (14:12 +0200)] 
tests: add dump from UltraSparc T1 to lscpu tests

Thanks to Jan Engelhardt.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add dump from huge ia64 to lscpu tests
Karel Zak [Thu, 31 Mar 2011 12:11:26 +0000 (14:11 +0200)] 
tests: add dump from huge ia64 to lscpu tests

Thanks to Jan Engelhardt.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: fix op-mode for /{sys,proc} dumps
Karel Zak [Thu, 31 Mar 2011 11:09:50 +0000 (13:09 +0200)] 
lscpu: fix op-mode for /{sys,proc} dumps

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: fix threads-per-core calculation
Karel Zak [Thu, 31 Mar 2011 10:55:13 +0000 (12:55 +0200)] 
lscpu: fix threads-per-core calculation

On Thu, Mar 24, 2011 at 01:45:34PM +0100, Jan Engelhardt wrote:
> On a 24-thread/6-core SPARC T1, lscpu would wrongly output "5
> threads per core".
>
> It seems that the 6c T1 is simply an 8c T1 where 2c are disabled
> (offering a lesser model for a lower price, and all that marketing
> fluff). So the machine description header of the 6c T1 reports 32
> threads, but only goes on to provide 24 elements thereafter, which
> is why Linux will report threads 24-31 as "offline". So far so good.
>
> But lscpu would take the number of all (online and offline) threads
> (32) and divides it by the number of online cores (6), which yields
> an odd 5.33 threads/core.
>
> Simply pick the number of online threads.

Based on Jan's patch.

Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agologin: fix checktty test to compile with old glibc
Karel Zak [Thu, 31 Mar 2011 09:39:01 +0000 (11:39 +0200)] 
login: fix checktty test to compile with old glibc

Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: plug memory leak in sample program
Petr Uzel [Wed, 30 Mar 2011 22:05:01 +0000 (00:05 +0200)] 
libmount: plug memory leak in sample program

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: fix some typos and copy&paste mistakes in comments
Petr Uzel [Wed, 30 Mar 2011 22:01:33 +0000 (00:01 +0200)] 
libmount: fix some typos and copy&paste mistakes in comments

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
14 years agolibmount: fix memory leak in cache
Karel Zak [Wed, 30 Mar 2011 21:52:56 +0000 (23:52 +0200)] 
libmount: fix memory leak in cache

Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add phelper= support
Karel Zak [Wed, 30 Mar 2011 13:40:56 +0000 (15:40 +0200)] 
libmount: add phelper= support

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: add phelper=
Karel Zak [Wed, 30 Mar 2011 12:56:33 +0000 (14:56 +0200)] 
mount: add phelper=

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: small lock code cleanup
Karel Zak [Wed, 30 Mar 2011 11:58:04 +0000 (13:58 +0200)] 
libmount: small lock code cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: use chdir() and NOFOLLOW umount flag for umount operation
Karel Zak [Wed, 30 Mar 2011 11:00:03 +0000 (13:00 +0200)] 
libmount: use chdir() and NOFOLLOW umount flag for umount operation

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: fix test
Karel Zak [Wed, 30 Mar 2011 10:39:24 +0000 (12:39 +0200)] 
libmount: fix test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: cleanup umount code
Karel Zak [Wed, 30 Mar 2011 09:30:23 +0000 (11:30 +0200)] 
libmount: cleanup umount code

This patch removes obsolete stuff. The minimal requirement for
libmount umount code is Linux >= 2.4.11.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: block signals when writing to mtab
Karel Zak [Wed, 30 Mar 2011 07:30:05 +0000 (09:30 +0200)] 
libmount: block signals when writing to mtab

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO
Karel Zak [Tue, 29 Mar 2011 22:27:29 +0000 (00:27 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO
Karel Zak [Tue, 29 Mar 2011 22:10:00 +0000 (00:10 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: small fix for safe_print()
Sergey Gusarov [Fri, 25 Mar 2011 13:54:05 +0000 (16:54 +0300)] 
blkid: small fix for safe_print()

This small fix makes it possible to print the first unprintable character
with code 128 from ASCII table.

Signed-off-by: Sergey Gusarov <laborer2008@gmail.com>
14 years agoumount: use UMOUNT_NOFOLLOW for non-root users
Karel Zak [Tue, 29 Mar 2011 08:19:56 +0000 (10:19 +0200)] 
umount: use UMOUNT_NOFOLLOW for non-root users

The UMOUNT_NOFOLLOW umount2() flag is supported since kernel 2.6.34.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: add -d option to print non-printable chars
Karel Zak [Tue, 29 Mar 2011 09:44:29 +0000 (11:44 +0200)] 
blkid: add -d option to print non-printable chars

Reported-by: laborer2008 laborer <laborer2008@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopartx: add fallback for openat() to be usable on old systems
Karel Zak [Tue, 29 Mar 2011 08:45:57 +0000 (10:45 +0200)] 
partx: add fallback for openat() to be usable on old systems

Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoinclude: [c.h] add definition wrappers for old libc versions
Davidlohr Bueso [Tue, 22 Mar 2011 13:42:09 +0000 (10:42 -0300)] 
include: [c.h] add definition wrappers for old libc versions

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: fix leak in sample program
Karel Zak [Mon, 28 Mar 2011 21:28:45 +0000 (23:28 +0200)] 
libmount: fix leak in sample program

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: create a default lock for mtab update
Karel Zak [Mon, 28 Mar 2011 10:40:24 +0000 (12:40 +0200)] 
libmount: create a default lock for mtab update

Now it's necessary to explicitly create a lock for mnt_update_table().
It seems better to create the lock in mnt_update_table() by default to
skip this extra step.

Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: do not ignore datarootdir
Sami Kerola [Tue, 15 Mar 2011 20:58:07 +0000 (21:58 +0100)] 
build-sys: do not ignore datarootdir

Fix to the ./configure warning which has been printed since
autotools version 2.59c (released at April 2006).

WARNING:  'po/Makefile.in.in' seems to ignore the --datarootdir setting

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO
Karel Zak [Tue, 22 Mar 2011 09:11:26 +0000 (10:11 +0100)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [fsprobe.c] fix blkid_evaluate_spec() call
Karel Zak [Tue, 22 Mar 2011 08:54:57 +0000 (09:54 +0100)] 
lib: [fsprobe.c] fix blkid_evaluate_spec() call

lib/fsprobe.c:56:2: warning: passing argument 2 of ‘blkid_evaluate_spec’ from incompatible pointer type
shlibs/blkid/src/blkid.h:189:14: note: expected ‘struct blkid_struct_cache **’ but argument is of type ‘blkid_cache’

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoddate: use ARRAY_SIZE
Karel Zak [Fri, 18 Mar 2011 09:27:09 +0000 (10:27 +0100)] 
ddate: use ARRAY_SIZE

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoddate: remove non-ascii chars from ddate
Karel Zak [Fri, 18 Mar 2011 09:25:42 +0000 (10:25 +0100)] 
ddate: remove non-ascii chars from ddate

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotailf: support --lines 0
Karel Zak [Fri, 18 Mar 2011 08:52:07 +0000 (09:52 +0100)] 
tailf: support --lines 0

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: rename mount option "quiet" to "silent"
Karel Zak [Fri, 18 Mar 2011 08:21:32 +0000 (09:21 +0100)] 
libmount: rename mount option "quiet" to "silent"

 See commit 2ac1890aa0d8ce404528587134fcabe0e2834963.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofdisk: check index before access to array [coverity scan]
Karel Zak [Thu, 17 Mar 2011 21:58:05 +0000 (22:58 +0100)] 
fdisk: check index before access to array [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add blkid_evaluate_spec()
Karel Zak [Thu, 17 Mar 2011 11:51:06 +0000 (12:51 +0100)] 
libblkid: add blkid_evaluate_spec()

The function blkid_evaluate_tag() is useful for tags only (e.g.
LABEL=foo). But we also need to address devices by tags OR paths in
many utils.

The function blkid_evaluate_spec() support this functionality without
extra care about the way how device is addressed. The tags as well as
paths are converted to the standardized device path.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [fsprobe.c] remove obsolete <blkid/blkid.h>
Karel Zak [Wed, 16 Mar 2011 16:48:47 +0000 (17:48 +0100)] 
lib: [fsprobe.c] remove obsolete <blkid/blkid.h>

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: don't use HAVE_LIBBLKID_INTERNAL macro
Karel Zak [Wed, 16 Mar 2011 16:45:53 +0000 (17:45 +0100)] 
build-sys: don't use HAVE_LIBBLKID_INTERNAL macro

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: clean up partx Makefile
Karel Zak [Wed, 16 Mar 2011 16:39:54 +0000 (17:39 +0100)] 
build-sys: clean up partx Makefile

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: don't support external (e2fsprogs) libblkid
Karel Zak [Wed, 16 Mar 2011 16:31:50 +0000 (17:31 +0100)] 
build-sys: don't support external (e2fsprogs) libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: include <uuid.h> rather than <uuid/uuid.h>
Karel Zak [Wed, 16 Mar 2011 16:04:21 +0000 (17:04 +0100)] 
build-sys: include <uuid.h> rather than <uuid/uuid.h>

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: don't support external (e2fsprogs) libuuid
Karel Zak [Wed, 16 Mar 2011 16:03:48 +0000 (17:03 +0100)] 
build-sys: don't support external (e2fsprogs) libuuid

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [fsprobe.c] use internal libblkid only
Karel Zak [Wed, 16 Mar 2011 15:22:36 +0000 (16:22 +0100)] 
lib: [fsprobe.c] use internal libblkid only

fsck, mount and swapon will be compilable with libblkid from
util-linux package. The old libblkid from e2fsprogs will not be
supported.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: use blkid_probe_get_buffer() more carefully
Karel Zak [Wed, 16 Mar 2011 13:06:23 +0000 (14:06 +0100)] 
libblkid: use blkid_probe_get_buffer() more carefully

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoRevert "umount: call /sbin/umount.<uhelper> for root user too"
Karel Zak [Tue, 15 Mar 2011 12:59:55 +0000 (13:59 +0100)] 
Revert "umount: call /sbin/umount.<uhelper> for root user too"

This reverts commit c56226697342ddd663492f77768e7a7cb8e579a1.

14 years agoumount: call /sbin/umount.<uhelper> for root user too
Karel Zak [Tue, 15 Mar 2011 09:31:06 +0000 (10:31 +0100)] 
umount: call /sbin/umount.<uhelper> for root user too

Originally the "uhelper=" was ignored for root, now the umount command
calls /sbin/umount.<uhelper> always.

This change is necessary for things like pam_mount where a device has
to be uninitialized by uhelper rather than directly umounted by
umount(2).

Note that all uhelpers has to be linked with libmount or execute

umount -fake -i /mountpoint

to remove mountpoint entry from /etc/mtab or /dev/.mount/utab.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: cleanup *_do_[u]mount() return codes and docs
Karel Zak [Mon, 14 Mar 2011 13:33:53 +0000 (14:33 +0100)] 
libmount: cleanup *_do_[u]mount() return codes and docs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: rename "quiet" to "silent" (MS_SILENT)
Karel Zak [Fri, 11 Mar 2011 15:58:27 +0000 (16:58 +0100)] 
mount: rename "quiet" to "silent" (MS_SILENT)

The quiet mount option was in collision with vfat and hfs mount
options. The option was also undocumented -- so it's probably safe to
rename the option than add some ugly hacks or exceptions for vfat/hfs
to the mount(8) code.

Reported-by: https://bugzilla.redhat.com/show_bug.cgi?id=622089
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: update GPT test
Karel Zak [Fri, 11 Mar 2011 15:21:20 +0000 (16:21 +0100)] 
tests: update GPT test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: fix double free [coverity scan]
Karel Zak [Fri, 11 Mar 2011 15:12:20 +0000 (16:12 +0100)] 
blkid: fix double free [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [tt.c] use mbs_truncate() from mbsalign.c
Karel Zak [Fri, 11 Mar 2011 14:30:27 +0000 (15:30 +0100)] 
lib: [tt.c] use mbs_truncate() from mbsalign.c

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [tt.c] dereferencing data before a null check [coverity scan]
Karel Zak [Fri, 11 Mar 2011 14:00:30 +0000 (15:00 +0100)] 
lib: [tt.c] dereferencing data before a null check [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotailf: fix open() return value check [coverity scan]
Karel Zak [Fri, 11 Mar 2011 13:25:45 +0000 (14:25 +0100)] 
tailf: fix open() return value check [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofsck.minix: use lib/ismounted.c
Karel Zak [Fri, 11 Mar 2011 13:15:47 +0000 (14:15 +0100)] 
fsck.minix: use lib/ismounted.c

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: keep code more readable for analyzers [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:57:14 +0000 (13:57 +0100)] 
libmount: keep code more readable for analyzers [coverity scan]

This is not a bug ('ent' is always non-NULL is 'm' is non-NULL), but
let's keep static analyzes and humans who read the code happy.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix typo in *_to_cpu() usage in raid detection [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:40:33 +0000 (13:40 +0100)] 
libblkid: fix typo in *_to_cpu() usage in raid detection [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolsblk: fix strtoul() usage [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:36:00 +0000 (13:36 +0100)] 
lsblk: fix strtoul() usage [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add PART_ENTRY_* to docs
Karel Zak [Fri, 11 Mar 2011 12:31:07 +0000 (13:31 +0100)] 
libblkid: add PART_ENTRY_* to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofindmnt: check mnt_tab_next_fs() return code [coverity scan]
Karel Zak [Fri, 11 Mar 2011 12:23:17 +0000 (13:23 +0100)] 
findmnt: check mnt_tab_next_fs() return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agohwclock: build on non-Linux
Samuel Thibault [Thu, 3 Mar 2011 01:18:32 +0000 (02:18 +0100)] 
hwclock: build on non-Linux

Thanks to the direct ISA method and by disabling the RTC get/set epoch
functionality, hwclock can work fine on non-Linux systems which provide
ioperm or iopl.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
14 years agocfdisk: add home and end keys movements in partition list
Francesco Cosoleto [Mon, 28 Feb 2011 11:16:42 +0000 (12:16 +0100)] 
cfdisk: add home and end keys movements in partition list

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agocfdisk: move keys related to the cursor of the partition list outside menuselect()
Francesco Cosoleto [Mon, 28 Feb 2011 11:16:41 +0000 (12:16 +0100)] 
cfdisk: move keys related to the cursor of the partition list outside menuselect()

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agocfdisk: move "No more partition" warning to draw_cursor()
Francesco Cosoleto [Mon, 28 Feb 2011 11:16:40 +0000 (12:16 +0100)] 
cfdisk: move "No more partition" warning to draw_cursor()

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agocfdisk: use keypad() in menu selection function
Francesco Cosoleto [Mon, 28 Feb 2011 11:16:39 +0000 (12:16 +0100)] 
cfdisk: use keypad() in menu selection function

This makes the source code looks cleaner, and works a bit better than
the previous way with hardcoded escape sequences.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agolsblk: use ssize_t for readlink() return code
Karel Zak [Fri, 11 Mar 2011 09:49:08 +0000 (10:49 +0100)] 
lsblk: use ssize_t for readlink() return code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolsblk: add TYPE column to lsblk output
Milan Broz [Thu, 24 Feb 2011 16:41:33 +0000 (17:41 +0100)] 
lsblk: add TYPE column to lsblk output

[kzak@redhat.com: - fix leaks
                  - use lowercase for TYPEs]

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotailf: fix memmove() usage
Karel Zak [Tue, 8 Mar 2011 13:13:41 +0000 (14:13 +0100)] 
tailf: fix memmove() usage

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: print helpful error when pkg.m4 is missing
Sami Kerola [Sat, 26 Feb 2011 14:37:21 +0000 (15:37 +0100)] 
build-sys: print helpful error when pkg.m4 is missing

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: fix unportable Makefile.am assignment
Sami Kerola [Sat, 26 Feb 2011 14:37:20 +0000 (15:37 +0100)] 
build-sys: fix unportable Makefile.am assignment

Makefile.am:36: warning: `:='-style assignments are not portable

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: Enable automake's -Wno-portability option.
Sami Kerola [Sat, 26 Feb 2011 14:37:19 +0000 (15:37 +0100)] 
build-sys: Enable automake's -Wno-portability option.

The util-linux depends on GNU make.

shlibs/blkid/src/Makefile.am:58: warning: `%'-style pattern rules are a GNU make extension
shlibs/mount/src/Makefile.am:62: warning: `%'-style pattern rules are a GNU make extension

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: introduce AM_PROG_CC_C_O macro
Sami Kerola [Sat, 26 Feb 2011 14:37:18 +0000 (15:37 +0100)] 
build-sys: introduce AM_PROG_CC_C_O macro

Fix to warning which will appear when using fairly new automake
(automake commit id fd22dca).

disk-utils/Makefile.am:31: warning: compiling `mkswap.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'

Reference documentation
http://www.gnu.org/software/hello/manual/automake/Public-Macros.html#index-AM_005fPROG_005fCC_005fC_005fO-296

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>