]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
14 years agotests: don't run mount/regfile test on old kernel
Karel Zak [Tue, 19 Apr 2011 11:39:35 +0000 (13:39 +0200)] 
tests: don't run mount/regfile test on old kernel

The /sys/.../loop/backing_file is available since 2.6.37.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add test for RLIMIT_FSIZE issue
Karel Zak [Tue, 19 Apr 2011 10:22:06 +0000 (12:22 +0200)] 
tests: add test for RLIMIT_FSIZE issue

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: use libmount tab update tests for UID=0 only
Karel Zak [Tue, 19 Apr 2011 08:04:33 +0000 (10:04 +0200)] 
tests: use libmount tab update tests for UID=0 only

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agogetopt: fix gcc warning
Karel Zak [Tue, 19 Apr 2011 07:22:16 +0000 (09:22 +0200)] 
getopt: fix gcc warning

getopt.c:80:13: warning: ‘set_initial_shell’ declared ‘static’ but
never defined

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomesg: add \n to usage() output
Karel Zak [Thu, 14 Apr 2011 15:16:30 +0000 (17:16 +0200)] 
mesg: add \n to usage() output

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomesg: man page clean wqup
Karel Zak [Thu, 14 Apr 2011 15:11:23 +0000 (17:11 +0200)] 
mesg: man page clean wqup

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomesg: new --verbose option
Sami Kerola [Sun, 10 Apr 2011 14:24:23 +0000 (16:24 +0200)] 
mesg: new --verbose option

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomesg: add long options to the man page
Sami Kerola [Sun, 10 Apr 2011 14:24:22 +0000 (16:24 +0200)] 
mesg: add long options to the man page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomesg: use long options, also --help and --version added
Sami Kerola [Sun, 10 Apr 2011 14:24:21 +0000 (16:24 +0200)] 
mesg: use long options, also --help and --version added

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoagetty: coding style - fix identation
Karel Zak [Thu, 14 Apr 2011 11:43:11 +0000 (13:43 +0200)] 
agetty: coding style - fix identation

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: coding style - fix comments, remove tailing whitespace
Karel Zak [Thu, 14 Apr 2011 11:25:57 +0000 (13:25 +0200)] 
agetty: coding style - fix comments, remove tailing whitespace

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: getopt case segment reordering
Sami Kerola [Sun, 10 Apr 2011 10:16:15 +0000 (12:16 +0200)] 
agetty: getopt case segment reordering

The case clause after getopts is in alphabetical order, just like
option string definition and manual page. The patch also convers
spaces to tabs in this code block.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: agetty long options
Sami Kerola [Sun, 10 Apr 2011 10:16:14 +0000 (12:16 +0200)] 
docs: agetty long options

Long options to manual page with the new --version and --help.
The manual page option order is also set to be the same as it is
in code. For the persons who don't see the order it is short
option case in sensitive alphabetical order.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoagetty: symbolic standard file descriptors
Sami Kerola [Sun, 10 Apr 2011 10:16:13 +0000 (12:16 +0200)] 
agetty: symbolic standard file descriptors

I find it easier to read code in which standard file descriptors
are symbolic strings rather than numbers.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoagetty: #endif comments
Sami Kerola [Sun, 10 Apr 2011 10:16:12 +0000 (12:16 +0200)] 
agetty: #endif comments

The longer #ifdef ... #endif markups have now at the end section
comment where they begun, which should improve preprosessor
directive readability.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoagetty: error message about required arguments
Sami Kerola [Sun, 10 Apr 2011 10:16:11 +0000 (12:16 +0200)] 
agetty: error message about required arguments

This patch also fixes only remaining magical number to EXIT_*
markup.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoagetty: use long options
Sami Kerola [Sun, 10 Apr 2011 10:16:10 +0000 (12:16 +0200)] 
agetty: use long options

This patch will introducing --help and --version options, which
does not have short version. Reason to this is a that the -h was
already assigned.

[kzak@redhat.com: - fix one usage call,
                  - use %1$s in usage printf format
                  - remove "static const" from enum]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: use program_invocation_short_name
Sami Kerola [Sun, 10 Apr 2011 10:16:09 +0000 (12:16 +0200)] 
agetty: use program_invocation_short_name

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoagetty: use xalloc.h
Sami Kerola [Sun, 10 Apr 2011 10:16:08 +0000 (12:16 +0200)] 
agetty: use xalloc.h

Unifies and fixes malloc and strdup calls.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolibmount: use libmnt_lock for utab flock
Karel Zak [Wed, 13 Apr 2011 14:27:18 +0000 (16:27 +0200)] 
libmount: use libmnt_lock for utab flock

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: merge mtab and utab locking code
Karel Zak [Wed, 13 Apr 2011 13:38:10 +0000 (15:38 +0200)] 
libmount: merge mtab and utab locking code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: block signals when update utab
Karel Zak [Wed, 13 Apr 2011 12:37:44 +0000 (14:37 +0200)] 
libmount: block signals when update utab

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)
Karel Zak [Wed, 13 Apr 2011 09:02:34 +0000 (11:02 +0200)] 
libmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)

http://thread.gmane.org/gmane.comp.security.oss.general/4374

Changes:

 - always use temporary file

 - use fflush() for the temporary file

 - check fprintf() return value

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: use lock from mnt_update_table()
Karel Zak [Wed, 13 Apr 2011 08:49:26 +0000 (10:49 +0200)] 
mount: use lock from mnt_update_table()

The mnt_update_table() is able to create a mtab lock now.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoumount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-2011-1677)
Karel Zak [Wed, 13 Apr 2011 08:11:50 +0000 (10:11 +0200)] 
umount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-2011-1677)

http://thread.gmane.org/gmane.comp.security.oss.general/4374

Based on CVE-2011-1089.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: use fflush() and temporary file for mtab updates (CVE-2011-1089)
Karel Zak [Tue, 12 Apr 2011 20:52:33 +0000 (22:52 +0200)] 
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)

http://thread.gmane.org/gmane.comp.security.oss.general/4374

Changes:

  - force mount(8) to use /etc/mtab.tmp file every time. The original
    code used the tmp file for remount/move operations only.

  - call and check fflush() return code for the tmp file

Note mount(8) blocks all signals when writing to mtab, so it's not
affected by SIGXFSZ and the mtab lock file is always removed.

This patch does not fix the same issue in umount(8) and libmount.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: remove test for non-zero head count in FAT superblock probe.
Nick Holloway [Sun, 10 Apr 2011 12:35:56 +0000 (13:35 +0100)] 
libblkid: remove test for non-zero head count in FAT superblock probe.

This change enables the auto-detection of the internal storage on a VTech
Kidizoom camera, which has a zero head count value in the superblock.

Microsoft documentation, "FAT: General Overview of On-Disk Format", states
that the sectors and heads fields are only relevant for media that have
a geometry.

The Linux kernel also does not require a non-zero head count, and can
manually mount the filesystem.

Signed-off-by: Nick Holloway <Nick.Holloway@pyrites.org.uk>
14 years agoscript: optional timing output file argument added
Sami Kerola [Sat, 9 Apr 2011 19:40:45 +0000 (21:40 +0200)] 
script: optional timing output file argument added

And update to manual page accordingly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: scriptreplay add note about new options
Sami Kerola [Sat, 9 Apr 2011 19:40:44 +0000 (21:40 +0200)] 
docs: scriptreplay add note about new options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoscriptreplay: allow arguments as command line switches
Sami Kerola [Sat, 9 Apr 2011 19:40:43 +0000 (21:40 +0200)] 
scriptreplay: allow arguments as command line switches

The command line switches override old style arguments

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: scriptreplay mention basic long options
Sami Kerola [Sat, 9 Apr 2011 19:40:42 +0000 (21:40 +0200)] 
docs: scriptreplay mention basic long options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoscriptreplay: support long options
Sami Kerola [Sat, 9 Apr 2011 19:40:41 +0000 (21:40 +0200)] 
scriptreplay: support long options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoscriptreplay: end printing with new line
Sami Kerola [Sat, 9 Apr 2011 19:40:40 +0000 (21:40 +0200)] 
scriptreplay: end printing with new line

Depending on opinion this is either modest bug fix or tiny
improvement.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolibmount: avoid redundant declaration of mnt_context_do_umount
Jan Engelhardt [Sat, 9 Apr 2011 12:11:35 +0000 (14:11 +0200)] 
libmount: avoid redundant declaration of mnt_context_do_umount

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agomkswap: add alignment check
Davidlohr Bueso [Sat, 9 Apr 2011 00:20:53 +0000 (21:20 -0300)] 
mkswap: add alignment check

This patch produces the program to warn if the given device is misaligned.

[kzak@redhat.com: - call the check for block devices only]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkdev: add blkdev_is_misaligned()
Davidlohr Bueso [Sat, 9 Apr 2011 00:20:49 +0000 (21:20 -0300)] 
blkdev: add blkdev_is_misaligned()

This functions returns the status of the device's alignment. It will
be 0 when aligned, otherwise return the offset.

[kzak@redhat.com: - returns 0 if the ioctl failed]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agohexdump: don't include err.h directly
Karel Zak [Tue, 12 Apr 2011 10:58:17 +0000 (12:58 +0200)] 
hexdump: don't include err.h directly

14 years agoscript: don't include err.h directly
Karel Zak [Tue, 12 Apr 2011 10:57:56 +0000 (12:57 +0200)] 
script: don't include err.h directly

14 years agoiosize: fix gcc warning
Karel Zak [Tue, 12 Apr 2011 10:37:57 +0000 (12:37 +0200)] 
iosize: fix gcc warning

isosize.c: In function ‘main’:
isosize.c:168:8: warning: unused variable ‘p’

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoelvtune, isosize: print usage text in case of invalid option
Francesco Cosoleto [Fri, 8 Apr 2011 13:51:50 +0000 (15:51 +0200)] 
elvtune, isosize: print usage text in case of invalid option

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agoisosize: use program_invocation_short_name
Francesco Cosoleto [Fri, 8 Apr 2011 13:51:49 +0000 (15:51 +0200)] 
isosize: use program_invocation_short_name

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agoisosize: simplify some error messages
Francesco Cosoleto [Fri, 8 Apr 2011 13:51:48 +0000 (15:51 +0200)] 
isosize: simplify some error messages

perror() and fprintf() are replaced with err() calls

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoelvtune, isosize: remove redundant message in case of invalid option
Francesco Cosoleto [Fri, 8 Apr 2011 13:51:47 +0000 (15:51 +0200)] 
elvtune, isosize: remove redundant message in case of invalid option

This leaves getopt() only to print a similar error message on invalid
options.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agoreadprofile: don't stop parsing at __init_end
Po-Yu Chuang [Fri, 8 Apr 2011 09:35:53 +0000 (17:35 +0800)] 
readprofile: don't stop parsing at __init_end

Some architectures like ARM place __init_end before .text section.
If any function in .init section is hit while profiling, readprofile
stops at __init_end.  That means if we enable profiling at boot time,
the profiler probably hits init functions and readprofile does not
work well unless we reset profiling buffer with -r option.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
14 years agowall: support --timeout switch (vol 2.)
Karel Zak [Tue, 12 Apr 2011 09:50:00 +0000 (11:50 +0200)] 
wall: support --timeout switch (vol 2.)

This is the rest of the commit

cae7485e59299c4b70ea7e1c7a4206df416701dc

the original patch was committed without man page and Makefile
changes. Sorry.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agowall: cleanup mbufsize usage
Karel Zak [Tue, 12 Apr 2011 09:49:28 +0000 (11:49 +0200)] 
wall: cleanup mbufsize usage

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agowall: support --timeout switch
Sami Kerola [Wed, 6 Apr 2011 19:31:04 +0000 (21:31 +0200)] 
wall: support --timeout switch

The switch controls message write time out to terminals.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowall: add long options and 79 char cut info to the man page
Sami Kerola [Wed, 6 Apr 2011 19:31:03 +0000 (21:31 +0200)] 
wall: add long options and 79 char cut info to the man page

Mention that over 79 characters long lines are cut, while long
options is an obvious change.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agottymsg: fix compiler warnings and use EXIT_
Sami Kerola [Wed, 6 Apr 2011 19:31:02 +0000 (21:31 +0200)] 
ttymsg: fix compiler warnings and use EXIT_

[kzak@redhat.com: - remove 'register' storage class specifier]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agowall: use long options
Sami Kerola [Wed, 6 Apr 2011 19:31:01 +0000 (21:31 +0200)] 
wall: use long options

Also --version & --help options added, and rewrote help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agowall: remove global variables and support TMPDIR
Sami Kerola [Wed, 6 Apr 2011 19:31:00 +0000 (21:31 +0200)] 
wall: remove global variables and support TMPDIR

The TMPDIR environment is preferred over _PATH_TMP in which a
file is created that is ultimately sent to terminals. This patch
will also fix compiler warnings and removes magical numbers,
which has not explanation.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: add note about blank lines to fstab.5
Karel Zak [Tue, 12 Apr 2011 08:05:25 +0000 (10:05 +0200)] 
mount: add note about blank lines to fstab.5

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=694648
Signed-off-by: Karel Zak <kzak@redhat.com>
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>