]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agomkfs.minix: add minix v3 support
Davidlohr Bueso [Wed, 29 Jun 2011 16:55:49 +0000 (12:55 -0400)] 
mkfs.minix: add minix v3 support

We can now create minix v3 filesystems. Support for this fs was added a few
years ago in the Linux kernel. One of the most important benefits is the
ability to handle file names up to 60 characters long.  With this change we
also introduce the -3 option which naturally indicates which version to create.
Version 1 is still left as the default one for backwards compatibility reasons.

[kzak@redhat.com: - fix gcc warnings:

mkfs.minix.c: In function ‘super_set_state_ptr’:
mkfs.minix.c:174:1: warning: no return statement in function returning non-void [-Wreturn-type]
mkfs.minix.c: In function ‘write_tables’:
mkfs.minix.c:182:7: warning: unused variable ‘state’ [-Wunused-variable]
mkfs.minix.c: At top level:
mkfs.minix.c:111:27: warning: ‘blksz’ defined but not used [-Wunused-variable]
]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agominix: add version 3 layout
Davidlohr Bueso [Wed, 29 Jun 2011 16:55:18 +0000 (12:55 -0400)] 
minix: add version 3 layout

Create a specific minix v3 superblock structure and adjust the attribute
wrapper functions to handle it.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agoMerge branch 'mkfs' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Mon, 11 Jul 2011 08:21:02 +0000 (10:21 +0200)] 
Merge branch 'mkfs' of git://github.com/kerolasa/lelux-utiliteetit

* 'mkfs' of git://github.com/kerolasa/lelux-utiliteetit:
  mkfs: coding style fixes
  mkfs: include-what-you-use header check
  docs: add long options to mkfs.8
  mkfs: add long options

14 years agodmesg; support level names (e.g. --console-level=alert)
Karel Zak [Fri, 1 Jul 2011 14:33:34 +0000 (16:33 +0200)] 
dmesg; support level names (e.g. --console-level=alert)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add --console-on and --console-off
Karel Zak [Fri, 1 Jul 2011 13:30:16 +0000 (15:30 +0200)] 
dmesg: add --console-on and --console-off

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: cleanup options and man page
Karel Zak [Fri, 1 Jul 2011 12:56:22 +0000 (14:56 +0200)] 
dmesg: cleanup options and man page

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add --clear (SYSLOG_ACTION_CLEAR)
Karel Zak [Fri, 1 Jul 2011 12:33:27 +0000 (14:33 +0200)] 
dmesg: add --clear (SYSLOG_ACTION_CLEAR)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: refactoring - cleanup main() code
Karel Zak [Fri, 1 Jul 2011 12:26:19 +0000 (14:26 +0200)] 
dmesg: refactoring - cleanup main() code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: refactoring - cleanup read buffer code
Karel Zak [Fri, 1 Jul 2011 12:15:07 +0000 (14:15 +0200)] 
dmesg: refactoring - cleanup read buffer code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: refactoring - cleanup print buffer code
Karel Zak [Fri, 1 Jul 2011 11:57:36 +0000 (13:57 +0200)] 
dmesg: refactoring - cleanup print buffer code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: refactoring - cleanup get bufsize code
Karel Zak [Fri, 1 Jul 2011 11:49:25 +0000 (13:49 +0200)] 
dmesg: refactoring - cleanup get bufsize code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: use SYSLOG_ACTION_* macros rather than magic constatnts
Karel Zak [Fri, 1 Jul 2011 11:41:56 +0000 (13:41 +0200)] 
dmesg: use SYSLOG_ACTION_* macros rather than magic constatnts

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add long options, --help and --version
Karel Zak [Fri, 1 Jul 2011 11:24:04 +0000 (13:24 +0200)] 
dmesg: add long options, --help and --version

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add docs for new PART_ENTRY_* values
Karel Zak [Fri, 1 Jul 2011 11:13:46 +0000 (13:13 +0200)] 
libblkid: add docs for new PART_ENTRY_* values

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO file
Karel Zak [Fri, 1 Jul 2011 11:13:13 +0000 (13:13 +0200)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomkfs: coding style fixes
Sami Kerola [Tue, 28 Jun 2011 22:24:27 +0000 (00:24 +0200)] 
mkfs: coding style fixes

The patch includes two symbolic exit values and a main argv
notation change, none of which should cause any side effects.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs: include-what-you-use header check
Sami Kerola [Tue, 28 Jun 2011 22:23:01 +0000 (00:23 +0200)] 
mkfs: include-what-you-use header check

Two headers added
 #include <limits.h> // for CHAR_MAX
 #include <stdlib.h> // for exit, EXIT_SUCCESS, getenv, etc

Rest sorted, and nls.h recategorized to be local header.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: add long options to mkfs.8
Sami Kerola [Tue, 28 Jun 2011 21:49:34 +0000 (23:49 +0200)] 
docs: add long options to mkfs.8

Two switches -c and -l where removed from manual, they might be
supported by the real file system builder but not necessarily.
The -v option was also corrected to be -V.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs: add long options
Sami Kerola [Tue, 28 Jun 2011 21:22:47 +0000 (23:22 +0200)] 
mkfs: add long options

Includes new help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agosfdisk: fix coding style.
Karel Zak [Wed, 29 Jun 2011 10:44:30 +0000 (12:44 +0200)] 
sfdisk: fix coding style.

The style in the file is really horrible and unreadable. This patch
uses:

 indent -linux -i4 -psl -brf sfdisk.c

to fix the style. The ideal solution is to call the indent with only
-linux option, but it's too invasive...

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'sfdisk' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Wed, 29 Jun 2011 10:12:48 +0000 (12:12 +0200)] 
Merge branch 'sfdisk' of git://github.com/kerolasa/lelux-utiliteetit

* 'sfdisk' of git://github.com/kerolasa/lelux-utiliteetit:
  Merge branch 'master', remote-tracking branch 'upstream/master'
  sfdisk: fix for data type mismatches
  sfdisk: fix implicit overflow
  docs: sfdisk manual update
  sfdisk: previously undocumented options to usage
  sfdisk: help screen format
  sfdisk: declare unused function attributes

14 years agoscript: remove magic constants and a type mismatch fix
Sami Kerola [Tue, 28 Jun 2011 10:43:26 +0000 (12:43 +0200)] 
script: remove magic constants and a type mismatch fix

The type mismatch; doinput: int -> ssize_t

[kzak@redhat.com: - int -> pid_t,
                  - remove "register" keyword]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoscript: include-what-you-use header check
Sami Kerola [Tue, 28 Jun 2011 10:43:25 +0000 (12:43 +0200)] 
script: include-what-you-use header check

The tool proposed;

script.c should add these lines:

script.c should remove these lines:
- #include <sys/file.h>  // lines 53-53
- #include <sys/types.h>  // lines 48-48
- #include "c.h"  // lines 61-61

and the change nearly did what the tool told. We should keep on
using c.h, not err.h. The config.h is not needed, it's added
automaticly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoscript: remove unnecessary void casting
Sami Kerola [Tue, 28 Jun 2011 10:43:24 +0000 (12:43 +0200)] 
script: remove unnecessary void casting

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoscript: option --force added
Sami Kerola [Tue, 28 Jun 2011 10:43:23 +0000 (12:43 +0200)] 
script: option --force added

The --force will allow default output destination, e.g.
typescript file, to be hard or symbolic link.

[kzak@redhat.com: - remove "error:" prefix from errx()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoumount: do not hang with disconnected NFS mounts
Petr Uzel [Wed, 29 Jun 2011 08:24:09 +0000 (10:24 +0200)] 
umount: do not hang with disconnected NFS mounts

Since util-linux commit f4612577c942a3683b97632ad0b49671897c2070,
umount stat(2)s its argument to check whether it can be associated
with some loop device. This could hang with broken NFS mounts.

Fix by first checking mtab if umount's argument is mounted and only if
we fail, check if there is a loop device associated.

http://marc.info/?l=util-linux-ng&m=130924963804836&w=2

Reported-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
14 years agomount: first look for mountpoint
Karel Zak [Wed, 29 Jun 2011 07:02:50 +0000 (09:02 +0200)] 
mount: first look for mountpoint

  # mount <device|dir>

The current code looks for a device and then for a mountpoint in
/etc/fstab. This is not user friendly solution. People usually use

 # mount /dir

to mount any filesystem. It makes more sense to check for mountpoint
and if not found then for device.

This is also important for bind mounts, for example if you have in
your fstab:

/dev/sda1 /mnt/foo auto defaults
/mnt/foo /mnt/bar none bind

then
# mount /mnt/foo

should be interpreted as the first entry and /dev/sda1 should be
mounted.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=716483
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'wknd23' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Mon, 27 Jun 2011 15:21:57 +0000 (17:21 +0200)] 
Merge branch 'wknd23' of git://github.com/kerolasa/lelux-utiliteetit

* 'wknd23' of git://github.com/kerolasa/lelux-utiliteetit: (41 commits)
  getopt: fix coding style
  getopt: options struct, usage and version outputs
  build-sys: remove unnecessary files from getopt
  getopt: make user getopt_long parsing to use function pointer
  getopt: remove unnecessary free()
  getopt: use xalloc.h
  docs: look.1 manual rewrote
  look: add long options
  docs: mention long options in uuidd.8 manual page
  uuidd: coding style fixes
  uuidd: remove goto statement
  uuidd: use symbolic exit and return values
  uuidd: die() function removed
  uuidd: long options & new usage
  docs: uuidgen.1 mention long options
  uuidgen: add long options
  wipefs: add version printing & compiler warning
  write: maintenance fixes
  write: long options & new usage
  build-sys: move write to term-utils directory
  ...

14 years agolscpu: fix bogomips detection for s390
Heiko Carstens [Tue, 21 Jun 2011 11:24:33 +0000 (13:24 +0200)] 
lscpu: fix bogomips detection for s390

s390 has a "bogomips per cpu" string instead of a "bogomips" string in
/proc/sysinfo. So add a second bogomips lookup which detects the s390
variant.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
14 years agomkfs.minix: check for misalignment
Davidlohr Bueso [Tue, 21 Jun 2011 03:10:13 +0000 (23:10 -0400)] 
mkfs.minix: check for misalignment

Produce a warning if the device is misaligned.

[kzak@redhat.com: - use it for block devices only]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [blkdev.c] remove kernel version check from blkdev_get_sector_size()
Karel Zak [Mon, 27 Jun 2011 14:09:56 +0000 (16:09 +0200)] 
lib: [blkdev.c] remove kernel version check from blkdev_get_sector_size()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [blkdev.c] more robust blkdev_is_misaligned()
Karel Zak [Mon, 27 Jun 2011 13:57:14 +0000 (15:57 +0200)] 
lib: [blkdev.c] more robust blkdev_is_misaligned()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [blkdev.c] add blkdev_get_physector_size()
Davidlohr Bueso [Tue, 21 Jun 2011 02:51:47 +0000 (22:51 -0400)] 
lib: [blkdev.c] add blkdev_get_physector_size()

This function uses the BLKPBSZGET ioctl to get the physical block size
of the device.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: minor fixes
Karel Zak [Mon, 27 Jun 2011 11:31:48 +0000 (13:31 +0200)] 
libmount: minor fixes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'wknd23' into sfdisk
Sami Kerola [Sat, 25 Jun 2011 16:33:21 +0000 (18:33 +0200)] 
Merge branch 'wknd23' into sfdisk

14 years agoMerge branch 'master' into sfdisk
Sami Kerola [Sat, 25 Jun 2011 16:32:34 +0000 (18:32 +0200)] 
Merge branch 'master' into sfdisk

14 years agoMerge branch 'master', remote-tracking branch 'upstream/master'
Sami Kerola [Sat, 25 Jun 2011 15:35:59 +0000 (17:35 +0200)] 
Merge branch 'master', remote-tracking branch 'upstream/master'

14 years agogetopt: fix coding style
Sami Kerola [Sat, 25 Jun 2011 14:32:11 +0000 (16:32 +0200)] 
getopt: fix coding style

This patch is purely reindentation, spacing, tabing, comment line
lenght and so on style fix. The only potential cause of havok is
two fixed ambiguous assignments which very likely did not break.

indent: getopt.c:147: Warning:old style assignment ambiguity in "=*".  Assuming "= *"
indent: getopt.c:151: Warning:old style assignment ambiguity in "=*".  Assuming "= *"

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agogetopt: options struct, usage and version outputs
Sami Kerola [Mon, 13 Jun 2011 11:47:29 +0000 (13:47 +0200)] 
getopt: options struct, usage and version outputs

Move commands own option structure from global scope into main(),
and make it as read-only. The usage() ouput mechanims is made to
look more like other commands.

Misleading old version string `getopt (enhanced) 1.1.4' is
replaced to look like the other util-linux version outputs. If
anyone is relying on identifying the command by that string he
should use -T option instead.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: remove unnecessary files from getopt
Sami Kerola [Sun, 12 Jun 2011 23:10:11 +0000 (01:10 +0200)] 
build-sys: remove unnecessary files from getopt

The Linux Software Map (lsm) file is not maintained, and the test
scripts where more confusing than advicing.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agogetopt: make user getopt_long parsing to use function pointer
Sami Kerola [Sun, 12 Jun 2011 22:49:08 +0000 (00:49 +0200)] 
getopt: make user getopt_long parsing to use function pointer

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agogetopt: remove unnecessary free()
Sami Kerola [Sun, 12 Jun 2011 22:11:56 +0000 (00:11 +0200)] 
getopt: remove unnecessary free()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agogetopt: use xalloc.h
Sami Kerola [Sun, 12 Jun 2011 21:31:59 +0000 (23:31 +0200)] 
getopt: use xalloc.h

The xalloc fix requires exit codes to symbolical refrences to
overwrite default value on error.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: look.1 manual rewrote
Sami Kerola [Sun, 12 Jun 2011 18:33:08 +0000 (20:33 +0200)] 
docs: look.1 manual rewrote

Mention long options in manual page. The nroff syntax is also
re-wrote to be more similar to other manual pages.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolook: add long options
Sami Kerola [Sun, 12 Jun 2011 17:41:31 +0000 (19:41 +0200)] 
look: add long options

Including new help screen. Additionally unused includes are
removed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: mention long options in uuidd.8 manual page
Sami Kerola [Sun, 12 Jun 2011 15:42:39 +0000 (17:42 +0200)] 
docs: mention long options in uuidd.8 manual page

Options in manual page are ordered to match help output. I also
added example section now when the synopsis section is less
verbose.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agouuidd: coding style fixes
Sami Kerola [Sat, 25 Jun 2011 13:13:24 +0000 (15:13 +0200)] 
uuidd: coding style fixes

Few unnecessary void casts removed, rest is about spacing.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agouuidd: remove goto statement
Sami Kerola [Sat, 25 Jun 2011 12:58:35 +0000 (14:58 +0200)] 
uuidd: remove goto statement

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agouuidd: use symbolic exit and return values
Sami Kerola [Sat, 25 Jun 2011 12:53:50 +0000 (14:53 +0200)] 
uuidd: use symbolic exit and return values

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agouuidd: die() function removed
Sami Kerola [Sat, 25 Jun 2011 12:44:35 +0000 (14:44 +0200)] 
uuidd: die() function removed

The function is replaced with err().

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agouuidd: long options & new usage
Sami Kerola [Sat, 25 Jun 2011 12:36:34 +0000 (14:36 +0200)] 
uuidd: long options & new usage

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: uuidgen.1 mention long options
Sami Kerola [Sun, 12 Jun 2011 13:22:18 +0000 (15:22 +0200)] 
docs: uuidgen.1 mention long options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agouuidgen: add long options
Sami Kerola [Sun, 12 Jun 2011 13:17:07 +0000 (15:17 +0200)] 
uuidgen: add long options

Affects to help output as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowipefs: add version printing & compiler warning
Sami Kerola [Sun, 12 Jun 2011 12:58:44 +0000 (14:58 +0200)] 
wipefs: add version printing & compiler warning

The --version option is added, and a storage type is fixed to
correct a compiler warnings.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowrite: maintenance fixes
Sami Kerola [Sat, 25 Jun 2011 12:25:40 +0000 (14:25 +0200)] 
write: maintenance fixes

Use libc error printing facilities, remove void casting, clean up
unused headers and alignt coding style with README.devel.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowrite: long options & new usage
Sami Kerola [Sat, 25 Jun 2011 12:22:33 +0000 (14:22 +0200)] 
write: long options & new usage

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: move write to term-utils directory
Sami Kerola [Sat, 11 Jun 2011 22:19:45 +0000 (00:19 +0200)] 
build-sys: move write to term-utils directory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomisc-utils: remove misleading README files
Sami Kerola [Sat, 11 Jun 2011 22:00:55 +0000 (00:00 +0200)] 
misc-utils: remove misleading README files

Clean up of files which primarily caused confusion.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: rename.1 verbose, long options and warning
Sami Kerola [Sat, 11 Jun 2011 21:42:45 +0000 (23:42 +0200)] 
docs: rename.1 verbose, long options and warning

Add new verbose and long options to manual page. I also added
warning section which hopefully gets read by people who run the
command first time.

It might be good idea to make the rename such that it would not
overwrite by default, and have a --force option if an use wants
that. In current state the rename is somewhat dangerous.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agorename: verbose option & maintenance fixes
Sami Kerola [Sat, 11 Jun 2011 21:21:31 +0000 (23:21 +0200)] 
rename: verbose option & maintenance fixes

The rename has new verbose option which will print which files
where renamed. Maintenance fixes includes long options, coding
style and freeing memory after usage.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: inform about cal long options
Sami Kerola [Sat, 11 Jun 2011 20:27:18 +0000 (22:27 +0200)] 
docs: inform about cal long options

The parameters section is now split per a parameter, which I
found more readable than the previous layout. In addition the
nroff syntax is changed to be closer what help2man is suggesting
it should be.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocal: clean up few coding style issues
Sami Kerola [Sat, 25 Jun 2011 11:44:12 +0000 (13:44 +0200)] 
cal: clean up few coding style issues

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocal: fix compiler warnings
Sami Kerola [Sat, 25 Jun 2011 11:43:14 +0000 (13:43 +0200)] 
cal: fix compiler warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocal: argument checking, long options and argument checking
Sami Kerola [Sat, 25 Jun 2011 11:38:47 +0000 (13:38 +0200)] 
cal: argument checking, long options and argument checking

Check numeric user inputs with strtol_on_err. Add long options
with nice looking usage.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowhereis: coding style
Sami Kerola [Sat, 25 Jun 2011 11:29:59 +0000 (13:29 +0200)] 
whereis: coding style

Changes only placement of braces, spacing, tabs etc.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowhereis: warnings, exit values, braces and returns
Sami Kerola [Sat, 25 Jun 2011 11:05:12 +0000 (13:05 +0200)] 
whereis: warnings, exit values, braces and returns

Compiler type mismatch warning fixed, symbolic exit value taken
in use where missing, unnecessary single statement 'block' braces
removed and return is not a function bracing fixed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowhereis: remove goto statements
Sami Kerola [Sat, 25 Jun 2011 10:57:05 +0000 (12:57 +0200)] 
whereis: remove goto statements

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agowhereis: new usage output & version printing
Sami Kerola [Sat, 25 Jun 2011 10:48:26 +0000 (12:48 +0200)] 
whereis: new usage output & version printing

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomcookie: change coding style
Sami Kerola [Sat, 11 Jun 2011 17:14:59 +0000 (19:14 +0200)] 
mcookie: change coding style

Now in align with README.devel.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: inform about mcookie long options
Sami Kerola [Sat, 11 Jun 2011 15:44:12 +0000 (17:44 +0200)] 
docs: inform about mcookie long options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomcookie: use warnx, long options and help screen
Sami Kerola [Sat, 11 Jun 2011 15:08:34 +0000 (17:08 +0200)] 
mcookie: use warnx, long options and help screen

Help and version options added. Additionally one compiler warning
got to be fixed.

mcookie.c:115:18: warning: comparison of integers of different signs: 'int' and 'unsigned long'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agonamei: fix to argument handling
Sami Kerola [Sat, 11 Jun 2011 14:45:53 +0000 (16:45 +0200)] 
namei: fix to argument handling

Missing pathname argument can only be checked after options are
parsed. Earlier for example 'namei -l' print nothing and was
successful.

The option parsing is changed to be less POSIXLY_CORRECT and
continue if nonoption argument is found, which allows users to
define options and arguments in the order they prefer.

Unknown short options, which earlier matched case '?' that was
help option alias, are now made to indicate failure in return
value.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agonamei: use xalloc.h
Sami Kerola [Sat, 11 Jun 2011 13:20:56 +0000 (15:20 +0200)] 
namei: use xalloc.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agonamei: add --version option
Sami Kerola [Sat, 11 Jun 2011 13:07:10 +0000 (15:07 +0200)] 
namei: add --version option

Add to namei.1 man also the --help option along with the new
--version.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agologin-utils: include fix
Sami Kerola [Sat, 25 Jun 2011 10:36:38 +0000 (12:36 +0200)] 
login-utils: include fix

Add missing and remove unneeded includes as reported by:
http://code.google.com/p/include-what-you-use/

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agochecktty: fix unused parameters
Sami Kerola [Sat, 25 Jun 2011 10:27:43 +0000 (12:27 +0200)] 
checktty: fix unused parameters

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: tell mount/* is in maintenance mode
Sami Kerola [Sat, 25 Jun 2011 10:11:50 +0000 (12:11 +0200)] 
docs: tell mount/* is in maintenance mode

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoMerge branch 'master', remote-tracking branch 'upstream/master'
Sami Kerola [Thu, 23 Jun 2011 20:04:24 +0000 (22:04 +0200)] 
Merge branch 'master', remote-tracking branch 'upstream/master'

14 years agolibmount: allow to convert /dev/loopN to backing filename
Karel Zak [Thu, 23 Jun 2011 14:06:27 +0000 (16:06 +0200)] 
libmount: allow to convert /dev/loopN to backing filename

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: cleanup return codes in mount sample
Karel Zak [Thu, 23 Jun 2011 13:19:37 +0000 (15:19 +0200)] 
libmount: cleanup return codes in mount sample

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add support for mount -a
Karel Zak [Thu, 23 Jun 2011 13:07:55 +0000 (15:07 +0200)] 
libmount: add support for mount -a

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: fix fstype caching
Karel Zak [Thu, 23 Jun 2011 10:29:00 +0000 (12:29 +0200)] 
libmount: fix fstype caching

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: rename in cache.c
Karel Zak [Thu, 23 Jun 2011 10:24:02 +0000 (12:24 +0200)] 
libmount: rename in cache.c

 * don't use mnt_ prefix for static functions

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: clean up cache.c
Karel Zak [Thu, 23 Jun 2011 10:19:30 +0000 (12:19 +0200)] 
libmount: clean up cache.c

 * rename fields in the cache entry to be more readable...

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add generic function to read table for context
Karel Zak [Wed, 22 Jun 2011 11:34:47 +0000 (13:34 +0200)] 
libmount: add generic function to read table for context

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: allow to set parser callback to context
Karel Zak [Tue, 21 Jun 2011 12:58:37 +0000 (14:58 +0200)] 
libmount: allow to set parser callback to context

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomountpoint: add new command
Karel Zak [Tue, 21 Jun 2011 09:46:36 +0000 (11:46 +0200)] 
mountpoint: add new command

This is libmount based re-implementation of the mountpoint(1) command.
The original implementation is maintained in sysvinit suite.

The mountpoint(1) in util-linux is not enabled by default (for now) --
use --enable-mountpoint to enable the util.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO file
Karel Zak [Tue, 21 Jun 2011 07:56:22 +0000 (09:56 +0200)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'master', remote-tracking branch 'upstream/master'
Sami Kerola [Mon, 20 Jun 2011 17:54:39 +0000 (19:54 +0200)] 
Merge branch 'master', remote-tracking branch 'upstream/master'

14 years agoblkid: list all known filesystems/RAIDs (add -k option)
Karel Zak [Mon, 20 Jun 2011 14:42:03 +0000 (16:42 +0200)] 
blkid: list all known filesystems/RAIDs (add -k option)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add debug message
Karel Zak [Mon, 20 Jun 2011 14:11:04 +0000 (16:11 +0200)] 
libblkid: add debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO file
Karel Zak [Mon, 20 Jun 2011 14:10:36 +0000 (16:10 +0200)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [procutils.c] improve robustness
Karel Zak [Mon, 20 Jun 2011 11:58:41 +0000 (13:58 +0200)] 
lib: [procutils.c] improve robustness

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: move BUILD_SCHEDUTILS to top-level Makefile
Karel Zak [Mon, 20 Jun 2011 11:51:26 +0000 (13:51 +0200)] 
build-sys: move BUILD_SCHEDUTILS to top-level Makefile

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [linux_version.c] simplify version parsing
Karel Zak [Mon, 20 Jun 2011 11:48:40 +0000 (13:48 +0200)] 
lib: [linux_version.c] simplify version parsing

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: detect VMware hypervisor
Stephen Hemminger [Thu, 16 Jun 2011 20:54:07 +0000 (16:54 -0400)] 
lscpu: detect VMware hypervisor

Add detection of VMware.
Tested on VMware Workstation 7.1.4

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
14 years agomisc: hurd build fixes
Samuel Thibault [Mon, 20 Jun 2011 10:48:35 +0000 (12:48 +0200)] 
misc: hurd build fixes

* Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available.
* Make procutils.c include c.h to get a PATH_MAX replacement.
* Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM
  defaults for Hurd.
* Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are
  available.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'master', remote-tracking branch 'upstream/master'
Sami Kerola [Thu, 16 Jun 2011 19:44:49 +0000 (21:44 +0200)] 
Merge branch 'master', remote-tracking branch 'upstream/master'

14 years agoMerge branch 'master', remote-tracking branch 'upstream/master' into sfdisk
Sami Kerola [Thu, 16 Jun 2011 19:44:24 +0000 (21:44 +0200)] 
Merge branch 'master', remote-tracking branch 'upstream/master' into sfdisk

14 years agomount: add ufstype=ufs2 to mount.8
Karel Zak [Tue, 14 Jun 2011 21:30:29 +0000 (23:30 +0200)] 
mount: add ufstype=ufs2 to mount.8

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=691338
Signed-off-by: Karel Zak <kzak@redhat.com>