]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
14 years agolibblkid: minor change in man page
Karel Zak [Tue, 26 Jul 2011 14:46:00 +0000 (16:46 +0200)] 
libblkid: minor change in man page

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: remove generated file
Karel Zak [Tue, 26 Jul 2011 13:53:56 +0000 (15:53 +0200)] 
tests: remove generated file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: fix gtk-doc build
Karel Zak [Tue, 26 Jul 2011 13:52:08 +0000 (15:52 +0200)] 
build-sys: fix gtk-doc build

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'cramfs' of https://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Tue, 26 Jul 2011 12:41:28 +0000 (14:41 +0200)] 
Merge branch 'cramfs' of https://github.com/kerolasa/lelux-utiliteetit

* 'cramfs' of https://github.com/kerolasa/lelux-utiliteetit:
  include: move fsck return values to exitcodes.h
  include: move disk-utils/mkfs.h -> include/exitcodes.h
  mkfs.cramfs: coding style
  mkfs.cramfs: include-what-you-use header check
  mkfs.cramfs: error printing fixes
  mkfs.cramfs: convert spaces to tabs
  mkfs.cramfs: validate numeric user inputs
  mkfs.cramfs: few symbolic exit codes where missing
  md5: use symbolical digest length
  mkfs.cramfs: use program_invocation_short_name
  mkfs.cramfs: use xalloc.h
  fsck.cramfs: add missed strings to translation
  fsck.cramfs: coding style
  fsck.cramfs: use xalloc.h
  fsck.cramfs: retire die function
  cramfs.h: coding style
  cramfs: use stdint.h instead of u{8,16,32}
  cramfs_common: coding style

Conflicts:
disk-utils/Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: vfat big endian fix
Jindrich Makovicka [Sun, 24 Jul 2011 12:13:07 +0000 (14:13 +0200)] 
libblkid: vfat big endian fix

when getting the next cluster id, clear the 4 most significant bits
after converting to machine endian

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
14 years agolibblkid: use 64bit offset in search_fat_label to avoid truncation
Jindrich Makovicka [Sun, 24 Jul 2011 12:12:06 +0000 (14:12 +0200)] 
libblkid: use 64bit offset in search_fat_label to avoid truncation

[kzak@redhat.com: - use %jd for the offset in debug message]

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoscriptreplay: fix buffer overflow
Sami Kerola [Tue, 26 Jul 2011 09:49:30 +0000 (11:49 +0200)] 
scriptreplay: fix buffer overflow

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agowhereis: update coding style
Davidlohr Bueso [Sun, 24 Jul 2011 15:11:19 +0000 (11:11 -0400)] 
whereis: update coding style

Like most 20th century Berkeley code, it's horrible:
- declare global variables in only one place
- add static attribute where it belongs
- move funcion declarations so that it doesn't require defining them

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agowhereis: remove find()
Davidlohr Bueso [Sun, 24 Jul 2011 14:59:25 +0000 (10:59 -0400)] 
whereis: remove find()

Because findv() can do the same job find() does, we can simply remove it and
call findv() with the size of each array.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agolscpu: use xalloc
Davidlohr Bueso [Sun, 24 Jul 2011 18:39:15 +0000 (14:39 -0400)] 
lscpu: use xalloc

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agopartx: use sysfs_deinit
Davidlohr Bueso [Sun, 24 Jul 2011 15:29:23 +0000 (11:29 -0400)] 
partx: use sysfs_deinit

Commit a88268b8cc124b6f721ba17ab01a3f6d5800c749 (get partition number with
sysfs lib) recently added the sysfs library to partx without freeing resources
once finished.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agosysfs: free used resources
Davidlohr Bueso [Sun, 24 Jul 2011 15:22:52 +0000 (11:22 -0400)] 
sysfs: free used resources

In the sysfs lib example, we should be using sysfs_deinit() to free used
resources and for correct usage.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agotests: add -o remount to libmount tests
Karel Zak [Mon, 25 Jul 2011 13:54:28 +0000 (15:54 +0200)] 
tests: add -o remount to libmount tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: remove 'seclabel' on remount, improve for 2.6.39
Karel Zak [Mon, 25 Jul 2011 13:44:16 +0000 (15:44 +0200)] 
libmount: remove 'seclabel' on remount, improve for 2.6.39

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: improve apply_fstab debugging
Karel Zak [Mon, 25 Jul 2011 13:36:44 +0000 (15:36 +0200)] 
libmount: improve apply_fstab debugging

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: use silent rules got gtkdoc, fix dependencies
Karel Zak [Mon, 25 Jul 2011 12:16:26 +0000 (14:16 +0200)] 
build-sys: use silent rules got gtkdoc, fix dependencies

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: remove 'seclabel' mount option on remount
Karel Zak [Mon, 25 Jul 2011 10:37:56 +0000 (12:37 +0200)] 
mount: remove 'seclabel' mount option on remount

Reported-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add MOUNT_2.20 version to the API
Karel Zak [Mon, 25 Jul 2011 10:16:15 +0000 (12:16 +0200)] 
libmount: add MOUNT_2.20 version to the API

The API is officially stable since 2.20.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: remove unnecessary includes, mask API as stable
Karel Zak [Mon, 25 Jul 2011 09:57:28 +0000 (11:57 +0200)] 
libmount: remove unnecessary includes, mask API as stable

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: clean up docs
Karel Zak [Mon, 25 Jul 2011 08:42:08 +0000 (10:42 +0200)] 
libmount: clean up docs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: cleanup docs
Karel Zak [Fri, 22 Jul 2011 23:27:39 +0000 (01:27 +0200)] 
libmount: cleanup docs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: update docs
Karel Zak [Fri, 22 Jul 2011 14:39:32 +0000 (16:39 +0200)] 
libblkid: update docs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: use gtkdoc without tmpl dir
Karel Zak [Fri, 22 Jul 2011 14:39:32 +0000 (16:39 +0200)] 
build-sys: use gtkdoc without tmpl dir

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: make -t more tolerant
Karel Zak [Fri, 22 Jul 2011 10:37:57 +0000 (12:37 +0200)] 
ionice: make -t more tolerant

* replace errx() with warnx() for unknown -c class

  The right place to check I/O scheduler features is in kernel. We should
  not try to be more smart than kernel.

* make the code ready (robust) for unknown sched.classes

* fix -t behavior

old version:
  $ ionice -c 4 -t bash
  ionice: bad prio class 4

new version:
  $ ionice -c 4 -t bash

Reported-by: Voelker, Bernhard" <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: allow to use names for -c <class>
Karel Zak [Fri, 22 Jul 2011 09:39:06 +0000 (11:39 +0200)] 
ionice: allow to use names for -c <class>

 for example:

   $ ionice -c best-effort bash

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: improve command line interpretation
Karel Zak [Fri, 22 Jul 2011 09:15:28 +0000 (11:15 +0200)] 
ionice: improve command line interpretation

 ionice                       : print the current I/O prio.
 ionice COMMAND               : exec command with default (best-effort) class
 ionice -p PID [...]          : return info about the PID(s)
 ionice -c CLASS COMMAND      : exec command with the class
 ionice -c CLASS -p PID [...] : modify PID(s) class

This should be backwardly compatible and also compatible with nice(1)
from coreutils.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoinclude: move fsck return values to exitcodes.h
Sami Kerola [Thu, 21 Jul 2011 22:34:12 +0000 (00:34 +0200)] 
include: move fsck return values to exitcodes.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoinclude: move disk-utils/mkfs.h -> include/exitcodes.h
Sami Kerola [Thu, 21 Jul 2011 22:22:14 +0000 (00:22 +0200)] 
include: move disk-utils/mkfs.h -> include/exitcodes.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: coding style
Sami Kerola [Thu, 21 Jul 2011 22:07:40 +0000 (00:07 +0200)] 
mkfs.cramfs: coding style

Clean up to two if clauses and fix to a version print out format.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: include-what-you-use header check
Sami Kerola [Wed, 20 Jul 2011 20:23:33 +0000 (22:23 +0200)] 
mkfs.cramfs: include-what-you-use header check

add these lines:
 #include <stddef.h> // for size_t
 #include <zconf.h> // for Bytef, uLongf

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: error printing fixes
Sami Kerola [Wed, 20 Jul 2011 20:21:09 +0000 (22:21 +0200)] 
mkfs.cramfs: error printing fixes

The patch will fix few starange looking errors such as:

$ mkfs.cramfs -N foo
invalid endianness given. Must be 'big', 'little', or 'host': Success

to be more sensible:
mkfs.cramfs: invalid endianness given. Must be 'big', 'little', or 'host'

And there are couple new return value checks to stop command if
out file cannot be opened, or an IO error occurs.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: convert spaces to tabs
Sami Kerola [Wed, 20 Jul 2011 20:19:49 +0000 (22:19 +0200)] 
mkfs.cramfs: convert spaces to tabs

The conversion is applied only to the line beginnings.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: validate numeric user inputs
Sami Kerola [Wed, 20 Jul 2011 20:17:02 +0000 (22:17 +0200)] 
mkfs.cramfs: validate numeric user inputs

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: few symbolic exit codes where missing
Sami Kerola [Wed, 20 Jul 2011 20:16:08 +0000 (22:16 +0200)] 
mkfs.cramfs: few symbolic exit codes where missing

This makes commit 89f56db1842e78bea0c6bc75028c3754489a9ad3 complete.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomd5: use symbolical digest length
Sami Kerola [Wed, 20 Jul 2011 20:13:32 +0000 (22:13 +0200)] 
md5: use symbolical digest length

Magic hash lenght number 16 is turned to a definition MD5LENGTH,
and put into use everywhere where md5 checksum is in use.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: use program_invocation_short_name
Sami Kerola [Wed, 20 Jul 2011 20:12:40 +0000 (22:12 +0200)] 
mkfs.cramfs: use program_invocation_short_name

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomkfs.cramfs: use xalloc.h
Sami Kerola [Wed, 20 Jul 2011 20:11:28 +0000 (22:11 +0200)] 
mkfs.cramfs: use xalloc.h

Before this commit two strdup calls, in line 366 and 374, where
able to fail silently and cause a rare bug.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agofsck.cramfs: add missed strings to translation
Sami Kerola [Wed, 20 Jul 2011 20:10:44 +0000 (22:10 +0200)] 
fsck.cramfs: add missed strings to translation

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agofsck.cramfs: coding style
Sami Kerola [Wed, 20 Jul 2011 20:08:48 +0000 (22:08 +0200)] 
fsck.cramfs: coding style

Lots of braces got to be removed, which can cause something to
break even everything is double checked.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agofsck.cramfs: use xalloc.h
Sami Kerola [Wed, 20 Jul 2011 20:03:47 +0000 (22:03 +0200)] 
fsck.cramfs: use xalloc.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agofsck.cramfs: retire die function
Sami Kerola [Wed, 20 Jul 2011 20:03:08 +0000 (22:03 +0200)] 
fsck.cramfs: retire die function

Replaced with err{,x} from libc.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocramfs.h: coding style
Sami Kerola [Wed, 20 Jul 2011 20:01:02 +0000 (22:01 +0200)] 
cramfs.h: coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolsblk: ignore device if disappear while processing
Milan Broz [Thu, 21 Jul 2011 20:56:20 +0000 (22:56 +0200)] 
lsblk: ignore device if disappear while processing

If lsblk runing on system where many devices appears and disappears
during lsblk run, lsblk should not fail or crash but just ignore
disappeared device.

Let's detect context initialization failures and skip device
instead of failing.

Also fix possible dereferencing of NULL parent pointer and
properly handle some error paths.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add 'none' source to libmount update tests
Karel Zak [Thu, 21 Jul 2011 20:29:26 +0000 (22:29 +0200)] 
tests: add 'none' source to libmount update tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoswapon: use xalloc lib
Davidlohr Bueso [Mon, 18 Jul 2011 04:33:20 +0000 (00:33 -0400)] 
swapon: use xalloc lib

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agopartx: get partition number with sysfs lib
Davidlohr Bueso [Sun, 17 Jul 2011 16:47:30 +0000 (12:47 -0400)] 
partx: get partition number with sysfs lib

Now that we have this feature, there's no need to manually parse sysfs in partx.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agodocs: update TODO file
Karel Zak [Thu, 21 Jul 2011 15:45:04 +0000 (17:45 +0200)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO file
Sami Kerola [Sun, 17 Jul 2011 18:22:15 +0000 (20:22 +0200)] 
docs: update TODO file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agochrt: add strings to use NLS
Sami Kerola [Sun, 17 Jul 2011 18:21:40 +0000 (20:21 +0200)] 
chrt: add strings to use NLS

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: coding style fixes
Sami Kerola [Sun, 17 Jul 2011 18:00:19 +0000 (20:00 +0200)] 
taskset: coding style fixes

Reindentation and deletion of few empty lines etc. There is no
actual code changes in this patch.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agotaskset: include-what-you-use header check
Sami Kerola [Sun, 17 Jul 2011 17:59:16 +0000 (19:59 +0200)] 
taskset: include-what-you-use header check

taskset.c should add these lines:
 #include <sched.h>   for sched_getaffinity, etc
 #include <stddef.h>  for size_t
 #include <string.h>  for memset

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: mention long options in ionice.1
Sami Kerola [Thu, 21 Jul 2011 15:28:32 +0000 (17:28 +0200)] 
docs: mention long options in ionice.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: coding style fixes
Sami Kerola [Thu, 21 Jul 2011 15:09:28 +0000 (17:09 +0200)] 
ionice: coding style fixes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: fix -V output
Sami Kerola [Sun, 17 Jul 2011 17:55:45 +0000 (19:55 +0200)] 
ionice: fix -V output

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoionice: fix -p
Karel Zak [Thu, 21 Jul 2011 14:44:55 +0000 (16:44 +0200)] 
ionice: fix -p

 $ ionice 123
 none: prio 4
 none: prio 4

It calls ioprio_get(0x1, 0) and ioprio_get(0x1, 123), because the
code does not check it the "-p" options was specified.

The proper command line syntax is:

  $ ionice -p 123

and the ioprio_get() should be called only once.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: IOPRIO_PRIO_* macros
Karel Zak [Thu, 21 Jul 2011 14:33:20 +0000 (16:33 +0200)] 
ionice: IOPRIO_PRIO_* macros

 * make the code more robust
 * follow kernel conventions for variable names
   (data = classdata, ioprio = classdata | class)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: add long options
Sami Kerola [Sun, 17 Jul 2011 17:54:08 +0000 (19:54 +0200)] 
ionice: add long options

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agochrt: coding style fix
Sami Kerola [Sun, 17 Jul 2011 17:52:37 +0000 (19:52 +0200)] 
chrt: coding style fix

Make horizontal list vertical and few other enhancements to
readability.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agochrt: data type compiler warning fixed
Sami Kerola [Sun, 17 Jul 2011 17:51:46 +0000 (19:51 +0200)] 
chrt: data type compiler warning fixed

chrt.c:158:16: warning: comparison of integers of different
signs: 'int' and 'unsigned long' [-Wsign-compare]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agofsck.minix: fix "array subscript is above array bounds"
Karel Zak [Thu, 21 Jul 2011 11:00:40 +0000 (13:00 +0200)] 
fsck.minix: fix "array subscript is above array bounds"

fsck.minix.c: In function ‘map_block2’:
fsck.minix.c:486:9: warning: array subscript is above array bounds [-Warray-bounds]

The 'blknr' has to be bigger than 7 + 256 + (256 * 256) for i_zone[9].

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agominix: remove unnecessary initializations
Karel Zak [Thu, 21 Jul 2011 10:41:25 +0000 (12:41 +0200)] 
minix: remove unnecessary initializations

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agominix: add MINIX_ prefix to some global macros
Karel Zak [Thu, 21 Jul 2011 10:22:46 +0000 (12:22 +0200)] 
minix: add MINIX_ prefix to some global macros

 ... and remove some tailing whitespaces.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agominix: cleanup global variables and macros
Karel Zak [Thu, 21 Jul 2011 10:13:33 +0000 (12:13 +0200)] 
minix: cleanup global variables and macros

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'minix' of https://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Thu, 21 Jul 2011 09:26:42 +0000 (11:26 +0200)] 
Merge branch 'minix' of https://github.com/kerolasa/lelux-utiliteetit

* 'minix' of https://github.com/kerolasa/lelux-utiliteetit:
  libblkid: move MINIX_MAXPARTITIONS to minix.h
  minix: move globals and inline functions to minix_programs.h
  libblkid: use MINIX_BLOCK_SIZE from minix.h
  libblkid: use superblock structure from minix.h
  include: move minix.h to include directory
  include: remove kernel headers from minix.h
  include: minix.h: use data types from stdint.h

Conflicts:
disk-utils/Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agocramfs: use stdint.h instead of u{8,16,32}
Sami Kerola [Wed, 20 Jul 2011 20:00:02 +0000 (22:00 +0200)] 
cramfs: use stdint.h instead of u{8,16,32}

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocramfs_common: coding style
Sami Kerola [Wed, 20 Jul 2011 19:57:11 +0000 (21:57 +0200)] 
cramfs_common: coding style

Fix line lengths and white spaces.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolibmount: fix mtab update for "none" source
Karel Zak [Wed, 20 Jul 2011 19:24:20 +0000 (21:24 +0200)] 
libmount: fix mtab update for "none" source

tab_parse.c:mnt_parse_mountinfo_line parses "none" in src as NULL,

tab_update.c:fprintf_mtab_fs sets m1 to NULL instead of "none" and
returns -ENOMEM
tab_update.c:update_table says "write entry failed: Success", as errno
hasn't been set, and gotos to leave, leaving mtab not updated.

Addresses-debian-bug: 634871
Reported-by: Tomas Janousek <tomi@nomi.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: cleanup code for "none" source and fstype, fix mem leak
Karel Zak [Wed, 20 Jul 2011 19:15:43 +0000 (21:15 +0200)] 
libmount: cleanup code for "none" source and fstype, fix mem leak

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: move MINIX_MAXPARTITIONS to minix.h
Sami Kerola [Wed, 20 Jul 2011 18:39:01 +0000 (20:39 +0200)] 
libblkid: move MINIX_MAXPARTITIONS to minix.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agominix: move globals and inline functions to minix_programs.h
Sami Kerola [Wed, 20 Jul 2011 18:28:55 +0000 (20:28 +0200)] 
minix: move globals and inline functions to minix_programs.h

Global variables and inline functions are moved from minix.h to
minix_programs.h which is included in mkfs.minix and fsck.minix.
The minix.h will have only struct definitions etc generic
contents which is reasonable to share with utilities and
libraries.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolibblkid: use MINIX_BLOCK_SIZE from minix.h
Sami Kerola [Wed, 20 Jul 2011 18:13:08 +0000 (20:13 +0200)] 
libblkid: use MINIX_BLOCK_SIZE from minix.h

In the minix.h two definitions where renamed, so that the single
definition is reusable in fsck.minix, mkfs.minix and libblkid.

BLOCK_SIZE_BITS -> MINIX_BLOCK_SIZE_BITS
BLOCK_SIZE      -> MINIX_BLOCK_SIZE

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolibblkid: use superblock structure from minix.h
Sami Kerola [Thu, 14 Jul 2011 15:27:33 +0000 (17:27 +0200)] 
libblkid: use superblock structure from minix.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoinclude: move minix.h to include directory
Sami Kerola [Thu, 14 Jul 2011 15:26:16 +0000 (17:26 +0200)] 
include: move minix.h to include directory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoinclude: remove kernel headers from minix.h
Sami Kerola [Thu, 14 Jul 2011 15:25:07 +0000 (17:25 +0200)] 
include: remove kernel headers from minix.h

This clean up is purely cosmetic. Perprocessor could never use
the includes as KERNEL_INCLUDES_ARE_CLEAN variable does not get
set anywhere.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoinclude: minix.h: use data types from stdint.h
Sami Kerola [Thu, 14 Jul 2011 15:24:10 +0000 (17:24 +0200)] 
include: minix.h: use data types from stdint.h

The kernel types (e.g. u32, s64) are unexpected in util-linux.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodmesg: allow to print time delta without timestamp
Karel Zak [Wed, 20 Jul 2011 15:03:24 +0000 (17:03 +0200)] 
dmesg: allow to print time delta without timestamp

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: mark some options mutually exclusive
Karel Zak [Wed, 20 Jul 2011 13:50:34 +0000 (15:50 +0200)] 
dmesg: mark some options mutually exclusive

Reported-by: "Voelker, Bernhard" <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add --ctime to print human readable timestamps
Karel Zak [Wed, 20 Jul 2011 12:26:45 +0000 (14:26 +0200)] 
dmesg: add --ctime to print human readable timestamps

Based on patch from "corentin.labbe" <corentin.labbe@geomatys.fr>.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add --show-delta option
Karel Zak [Wed, 20 Jul 2011 10:52:15 +0000 (12:52 +0200)] 
dmesg: add --show-delta option

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: print_buffer() refactoring
Karel Zak [Tue, 19 Jul 2011 19:37:34 +0000 (21:37 +0200)] 
dmesg: print_buffer() refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: variables refactoring
Karel Zak [Tue, 19 Jul 2011 18:00:54 +0000 (20:00 +0200)] 
dmesg: variables refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO
Karel Zak [Mon, 18 Jul 2011 22:30:42 +0000 (00:30 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: fix segfault
Marc-Antoine Perennou [Mon, 18 Jul 2011 17:37:22 +0000 (19:37 +0200)] 
dmesg: fix segfault

An element declared as size_t cannot be detected as negative (len < 0)
is always false.
This can lead to an infinite loop causing a segmentation fault.
Check if len is equal to -1 or -2 instead

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
14 years agomkfs.bfs: cleanu p --version output
Karel Zak [Mon, 18 Jul 2011 15:15:00 +0000 (17:15 +0200)] 
mkfs.bfs: cleanu p --version output

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomkfs.bfs: use err() instead of errx()
Karel Zak [Mon, 18 Jul 2011 15:08:45 +0000 (17:08 +0200)] 
mkfs.bfs: use err() instead of errx()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge remote-tracking branch 'sami/mkfs.bfs'
Karel Zak [Mon, 18 Jul 2011 15:00:52 +0000 (17:00 +0200)] 
Merge remote-tracking branch 'sami/mkfs.bfs'

* sami/mkfs.bfs:
  docs: add long options to mkfs.bfs.8
  mkfs.bfs: coding style fix
  mkfs.bfs: include-what-you-use header check
  mkfs.bfs: validate numeric user inputs
  mkfs.bfs: use xstrdup from xalloc.h
  mkfs.bfs: add long options
  mkfs.bfs: use libc error facilities

14 years agofdformat: cleanup error messages
Karel Zak [Mon, 18 Jul 2011 14:57:55 +0000 (16:57 +0200)] 
fdformat: cleanup error messages

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge remote-tracking branch 'sami/fdformat'
Karel Zak [Mon, 18 Jul 2011 14:48:22 +0000 (16:48 +0200)] 
Merge remote-tracking branch 'sami/fdformat'

* sami/fdformat:
  docs: add long options to fdformat.8
  fdformat: coding style
  fdformat: include-what-you-use header check
  fdformat: use xalloc.h
  fdformat: integer comparisons & unused parameter
  fdformat: use long options
  fdformat: use libc error printing facilities

14 years agoMerge remote-tracking branch 'sami/isosize'
Karel Zak [Mon, 18 Jul 2011 14:43:51 +0000 (16:43 +0200)] 
Merge remote-tracking branch 'sami/isosize'

* sami/isosize:
  docs: isosize.8 add long options
  isosize: fix coding style
  isosize: include-what-you-use header check
  isosize: check user input to be numeric
  isosize: use long options
  isosize: remove global variables

14 years agodmesg: add -t option to suppress timestamps
Karel Zak [Mon, 18 Jul 2011 09:48:41 +0000 (11:48 +0200)] 
dmesg: add -t option to suppress timestamps

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add -u and -k options
Karel Zak [Mon, 18 Jul 2011 09:28:15 +0000 (11:28 +0200)] 
dmesg: add -u and -k options

 -u  : print kernel messages
 -k  : print userspace message

The options could be mixed together or with --facility option too.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: add support for books
Heiko Carstens [Wed, 13 Jul 2011 03:46:18 +0000 (09:16 +0530)] 
lscpu: add support for books

This patch adds support for books in cpu topology output. Books are
currently only present on the s390 architecture, however it looks like
others will follow to use the extra scheduling domain of the kernel.

Books are logically between sockets and nodes. In order to not break
any existing tools that might parse the output of lscpu the output
is changed so that books will follow nodes:
CPU,Core,Socket,Node,Book

In addition the readable output is changed from
"CPU socket(s):" to "Socket(s) per book:" or simply "Socket(s):" in the
absence of books.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
14 years agolsblk: add queue request size attribute
Milan Broz [Sat, 9 Jul 2011 13:24:04 +0000 (15:24 +0200)] 
lsblk: add queue request size attribute

Add queue request size parameter.

Very useful for tuning multipath performance.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoinclude: [tt.c] always truncate if TT_FL_TRUNC
Karel Zak [Fri, 15 Jul 2011 13:35:48 +0000 (15:35 +0200)] 
include: [tt.c] always truncate if TT_FL_TRUNC

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolsblk: add state attribute
Milan Broz [Tue, 5 Jul 2011 21:29:30 +0000 (23:29 +0200)] 
lsblk: add state attribute

Add device state column. For normal disk it could be running or offline,
for device-mapper devices running or suspended.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: fix typo in usage()
Karel Zak [Thu, 14 Jul 2011 11:46:13 +0000 (13:46 +0200)] 
dmesg: fix typo in usage()

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

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: reorder options, add comments
Karel Zak [Thu, 14 Jul 2011 11:31:53 +0000 (13:31 +0200)] 
dmesg: reorder options, add comments

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add --facility option
Karel Zak [Thu, 14 Jul 2011 10:48:07 +0000 (12:48 +0200)] 
dmesg: add --facility option

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodmesg: add --decode to print readable facility and level
Karel Zak [Thu, 14 Jul 2011 10:19:00 +0000 (12:19 +0200)] 
dmesg: add --decode to print readable facility and level

 # dmesg --decode
 ...
 kern  :info  : [53335.743185] PM: resume of devices complete after 2496.795 msecs
 kern  :debug : [53335.743593] PM: Finishing wakeup.
 kern  :warn  : [53335.743595] Restarting tasks ... done.
 kern  :info  : [53335.790452] video LNXVIDEO:00: Restoring backlight state
 kern  :debug : [53336.418576] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X

Signed-off-by: Karel Zak <kzak@redhat.com>