]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
14 years agominix: fix warning
Davidlohr Bueso [Mon, 6 Jun 2011 13:52:30 +0000 (09:52 -0400)] 
minix: fix warning

This patch fixes an unused variable warning.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agofstrim, setarch: replace error() with err()
Francesco Cosoleto [Thu, 2 Jun 2011 19:17:57 +0000 (21:17 +0200)] 
fstrim, setarch: replace error() with err()

This should improve a bit the portability as error() is a GNU extension and
util-linux provides fallbacks for err.h functions.

Fix compilation with icc, broken due to a reference to `__builtin_va_arg_pack'
in error.h using the -gcc default option.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agotests: add lscpu dumps from three Dell's & a Xen
Sami Kerola [Tue, 31 May 2011 18:31:25 +0000 (20:31 +0200)] 
tests: add lscpu dumps from three Dell's & a Xen

x86_64-dell_poweredgeR610
Ubuntu 11.04 kernel 2.6.38-8

x86_64-dell_poweredge1950
Red Hat EL 4.5 kernel 2.6.9-55.ELsmp

x86_64-dell_e4310
Red Hat EL 5.3 kernel 2.6.18-194.17.4.el5

x86_64-el5xen
Red Hat EL 5.6 kernel 2.6.18-238.el5xen

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
14 years agocfdisk: fix gcc warning (unused variable)
Karel Zak [Wed, 8 Jun 2011 10:50:27 +0000 (12:50 +0200)] 
cfdisk: fix gcc warning (unused variable)

cfdisk.c: In function ‘fp_printf’:
cfdisk.c:1760:12: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofstrim: cast from __u64 to standard C types
Karel Zak [Wed, 8 Jun 2011 10:44:14 +0000 (12:44 +0200)] 
fstrim: cast from __u64 to standard C types

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agohwclock: remove unused variables
Karel Zak [Wed, 8 Jun 2011 10:27:03 +0000 (12:27 +0200)] 
hwclock: remove unused variables

hwclock.c: In function ‘set_hardware_clock’:
hwclock.c:467:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
hwclock.c: In function ‘main’:
hwclock.c:1461:7: warning: variable ‘ARCconsole’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agocytune: remove unused variable
Karel Zak [Wed, 8 Jun 2011 10:22:21 +0000 (12:22 +0200)] 
cytune: remove unused variable

cytune.c: In function ‘summary’:
cytune.c:105:9: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agonamei: remove unused variable
Karel Zak [Wed, 8 Jun 2011 10:18:49 +0000 (12:18 +0200)] 
namei: remove unused variable

namei.c: In function ‘print_namei’:
namei.c:368:16: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: don't free() uninitialized variable
Karel Zak [Wed, 8 Jun 2011 10:16:08 +0000 (12:16 +0200)] 
blkid: don't free() uninitialized variable

blkid.c: In function ‘main’:
blkid.c:656:6: warning: ‘res’ may be used uninitialized in this function [-Wuninitialized]
blkid.c:623:9: note: ‘res’ was declared here

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agologin: cleanup unused variables
Karel Zak [Wed, 8 Jun 2011 09:32:53 +0000 (11:32 +0200)] 
login: cleanup unused variables

login.c: In function ‘main’:
login.c:389:40: warning: variable ‘errsv’ set but not used [-Wunused-but-set-variable]
login.c:389:9: warning: variable ‘ask’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: fix uninitialized variable in sample
Karel Zak [Wed, 8 Jun 2011 09:22:25 +0000 (11:22 +0200)] 
libmount: fix uninitialized variable in sample

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agocolrm: manual update
Sami Kerola [Mon, 23 May 2011 20:50:07 +0000 (22:50 +0200)] 
colrm: manual update

Inform about long, help & version and options.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolrm: gotos, long options and argument checking
Sami Kerola [Mon, 23 May 2011 20:42:15 +0000 (22:42 +0200)] 
colrm: gotos, long options and argument checking

Unnecessary goto jumps where replaced by a simple function, and
two loops. Long options support help and version, and the two
arguments this command has are now validated with strtoul_or_err.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocol: check with strtol_or_err option argument
Sami Kerola [Mon, 23 May 2011 19:14:16 +0000 (21:14 +0200)] 
col: check with strtol_or_err option argument

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolib: [linux_version.c] accommodate two-component linux version (e.g. 3.0)
Karel Zak [Mon, 6 Jun 2011 10:35:26 +0000 (12:35 +0200)] 
lib: [linux_version.c] accommodate two-component linux version (e.g. 3.0)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: canonicalize fstab mnt_dir
Karel Zak [Thu, 2 Jun 2011 12:53:42 +0000 (14:53 +0200)] 
mount: canonicalize fstab mnt_dir

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=709681
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopartx: remove unused headers
Davidlohr Bueso [Wed, 1 Jun 2011 23:27:14 +0000 (19:27 -0400)] 
partx: remove unused headers

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agofsck.minix: use common functionalitly
Davidlohr Bueso [Wed, 1 Jun 2011 22:33:07 +0000 (18:33 -0400)] 
fsck.minix: use common functionalitly

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agomkfs.minix: use common functionality
Davidlohr Bueso [Wed, 1 Jun 2011 22:33:02 +0000 (18:33 -0400)] 
mkfs.minix: use common functionality

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agominix: add common functionality
Davidlohr Bueso [Wed, 1 Jun 2011 22:32:56 +0000 (18:32 -0400)] 
minix: add common functionality

Unite common features and code present in mkfs.minix and fsck.minix into a
single minix.h header. This eases the reading and modification of both
programs.

Futhermore:
    - Replace version2 variable with fs_version (handy when v3 support
      comes along)
    - For superblock attributes and inode information, use small inline
      functions instead of ugly macros.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agolibmount: use mnt_table_get_fs_root() in utab code
Karel Zak [Thu, 2 Jun 2011 11:25:19 +0000 (13:25 +0200)] 
libmount: use mnt_table_get_fs_root() in utab code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: colcrt manual update
Sami Kerola [Tue, 24 May 2011 20:56:44 +0000 (22:56 +0200)] 
docs: colcrt manual update

Inform about long, help & version and options.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolctr: use long options and clean coding style
Sami Kerola [Tue, 24 May 2011 20:56:43 +0000 (22:56 +0200)] 
colctr: use long options and clean coding style

This commit introduces help & version options.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agotests: add colrm basic test
Sami Kerola [Tue, 24 May 2011 20:56:42 +0000 (22:56 +0200)] 
tests: add colrm basic test

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolib: add strtoul_or_err() function
Sami Kerola [Tue, 24 May 2011 20:56:38 +0000 (22:56 +0200)] 
lib: add strtoul_or_err() function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agocol: coding style changes
Sami Kerola [Tue, 24 May 2011 20:56:37 +0000 (22:56 +0200)] 
col: coding style changes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agodocs: col manual update
Sami Kerola [Tue, 24 May 2011 20:56:36 +0000 (22:56 +0200)] 
docs: col manual update

Long options, with help & version, added. The commint also has
previously undocumented switch `-h convert spaces to tabs' as a
part of col.1 man page.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocol: use long options
Sami Kerola [Tue, 24 May 2011 20:56:35 +0000 (22:56 +0200)] 
col: use long options

This commit introduces help & version options.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agopg: return value warning fix
Sami Kerola [Tue, 24 May 2011 20:56:34 +0000 (22:56 +0200)] 
pg: return value warning fix

void function 'makeprint' should not return void expression

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agorev: mark signo unused in sig_handler
Sami Kerola [Tue, 24 May 2011 20:56:33 +0000 (22:56 +0200)] 
rev: mark signo unused in sig_handler

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agopg: use size_t for wcstombs() return code
Sami Kerola [Tue, 24 May 2011 20:56:32 +0000 (22:56 +0200)] 
pg: use size_t for wcstombs() return code

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agomount: use libmount to detect already mounted bind mounts
Karel Zak [Tue, 31 May 2011 16:02:29 +0000 (18:02 +0200)] 
mount: use libmount to detect already mounted bind mounts

It's pretty tricky to detect that a bind mount from fstab is already
mounted on system without /etc/mtab. Let's use functionality from
libmount.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=701176
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mnt_table_is_mounted()
Karel Zak [Tue, 31 May 2011 16:01:36 +0000 (18:01 +0200)] 
libmount: add mnt_table_is_mounted()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: use sysfs_init() more carefully
Karel Zak [Mon, 30 May 2011 20:59:35 +0000 (22:59 +0200)] 
libblkid: use sysfs_init() more carefully

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update TODO file
Karel Zak [Mon, 30 May 2011 15:22:07 +0000 (17:22 +0200)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add some debug messages
Karel Zak [Mon, 30 May 2011 15:20:27 +0000 (17:20 +0200)] 
libblkid: add some debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [loopdev.c] add module for work loop devices
Karel Zak [Mon, 30 May 2011 14:37:31 +0000 (16:37 +0200)] 
lib: [loopdev.c] add module for work loop devices

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [sysfs.c] fix double free
Karel Zak [Fri, 27 May 2011 12:47:40 +0000 (14:47 +0200)] 
lib: [sysfs.c] fix double free

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoThis adds a second parameter to size_to_human_string() to return a
Francesco Cosoleto [Thu, 26 May 2011 13:17:25 +0000 (15:17 +0200)] 
This adds a second parameter to size_to_human_string() to return a
string with a different format based on the following flags:

        SIZE_SUFFIX_1LETTER  = "1K"
        SIZE_SUFFIX_3LETTER  = "1KiB",
        SIZE_SUFFIX_SPACE    = "1 KiB" or "1 K"

[kzak@redhat.com: - rename flags to SIZE_SUFFIX_* format,
                  - fix suffix[] buffer size
                  - add 3 letter version to the test]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: use AUTOMAKE_OPTIONS = gnu
Sami Kerola [Sat, 21 May 2011 13:02:10 +0000 (15:02 +0200)] 
build-sys: use AUTOMAKE_OPTIONS = gnu

The change will cause make dist to have INSTALL file from
automake release, which hopefully is more up to date than
manually maintained version.

The gnu option will also require ChangeLog to be present, and
without doubts no-one wants to maintain that manually. I added
file to reference link to internet git repository view.

At the time of make dist current tag is added to the ChangeLog
reference which will make release to point exactly to the point
where changes ended. Minor drawback is that untagged make dist
releases will contain a broken link in ChangeLog.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: stop building line(1) by default
Sami Kerola [Sat, 21 May 2011 13:02:09 +0000 (15:02 +0200)] 
build-sys: stop building line(1) by default

Align build system behaviour with DEPRECATED file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agobuild-sys: add required files to dist
Sami Kerola [Sat, 21 May 2011 10:25:54 +0000 (12:25 +0200)] 
build-sys: add required files to dist

Files mkfs.h procutils.h sysfs.h where missing from dist file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agotests: test column(1) with multiple input files
Karel Zak [Thu, 26 May 2011 08:30:23 +0000 (10:30 +0200)] 
tests: test column(1) with multiple input files

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agocolumn: fix problems with uninitialized variables
Karel Zak [Thu, 26 May 2011 08:23:50 +0000 (10:23 +0200)] 
column: fix problems with uninitialized variables

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge branch 'column' of git://github.com/kerolasa/lelux-utiliteetit into column
Karel Zak [Thu, 26 May 2011 07:54:13 +0000 (09:54 +0200)] 
Merge branch 'column' of git://github.com/kerolasa/lelux-utiliteetit into column

* 'column' of git://github.com/kerolasa/lelux-utiliteetit:
  tests: add column tests
  column.c: global variables removed
  column.c: validate numeric user inputs
  column.c: free memory before exit
  column.c: make table function clarification
  column.c: coding style fixes
  column.c: add version printing
  column.c: replace emalloc with xcalloc

14 years agobuild-sys: cleanup lib/ tests
Karel Zak [Wed, 25 May 2011 14:50:44 +0000 (16:50 +0200)] 
build-sys: cleanup lib/ tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: improve blkid__scan_dir
Karel Zak [Tue, 24 May 2011 11:30:48 +0000 (13:30 +0200)] 
libblkid: improve blkid__scan_dir

14 years agodocs: TODO update
Karel Zak [Mon, 23 May 2011 23:15:55 +0000 (01:15 +0200)] 
docs: TODO update

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add ID_PART_ENTRY_{OFFSET,SIZE,DISK}
Karel Zak [Mon, 23 May 2011 11:06:45 +0000 (13:06 +0200)] 
libblkid: add ID_PART_ENTRY_{OFFSET,SIZE,DISK}

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: use partno for partitions mapped by DM
Karel Zak [Mon, 23 May 2011 10:53:18 +0000 (12:53 +0200)] 
libblkid: use partno for partitions mapped by DM

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: found whole-disk for partitions mapped by kpartx
Karel Zak [Mon, 23 May 2011 10:09:08 +0000 (12:09 +0200)] 
libblkid: found whole-disk for partitions mapped by kpartx

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add column tests
Sami Kerola [Thu, 19 May 2011 20:35:05 +0000 (22:35 +0200)] 
tests: add column tests

Very basic regression tests for the column(1) command.

http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/4066

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolumn.c: global variables removed
Sami Kerola [Sun, 1 May 2011 17:26:49 +0000 (19:26 +0200)] 
column.c: global variables removed

Variables from global scope are moved to main, and passed as
function arguments where ever they are needed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolumn.c: validate numeric user inputs
Sami Kerola [Sun, 1 May 2011 17:24:47 +0000 (19:24 +0200)] 
column.c: validate numeric user inputs

Use strtol_or_err from strutils.h to check numeric user input is
sane.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolumn.c: free memory before exit
Sami Kerola [Sun, 1 May 2011 17:20:25 +0000 (19:20 +0200)] 
column.c: free memory before exit

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agocolumn.c: make table function clarification
Sami Kerola [Sun, 1 May 2011 17:16:29 +0000 (19:16 +0200)] 
column.c: make table function clarification

Readability enchancement, and few variable type changes to be
more proper.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agolib: [sysfs.c] add sysfs_readlink and name/path functions
Karel Zak [Wed, 18 May 2011 14:24:37 +0000 (16:24 +0200)] 
lib: [sysfs.c] add sysfs_readlink and name/path functions

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [at.c] add readlink_at(), fix semantic for absolute paths
Karel Zak [Wed, 18 May 2011 13:55:15 +0000 (15:55 +0200)] 
lib: [at.c] add readlink_at(), fix semantic for absolute paths

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: try next speed after CBREAK
Karel Zak [Wed, 18 May 2011 12:19:39 +0000 (14:19 +0200)] 
agetty: try next speed after CBREAK

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolsblk: use sysfs_read_u64() rather than sysfs_strdup() + atol()
Karel Zak [Wed, 18 May 2011 10:17:43 +0000 (12:17 +0200)] 
lsblk: use sysfs_read_u64() rather than sysfs_strdup() + atol()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: [sysfs.c] make sysfs_read_* function more robust
Karel Zak [Wed, 18 May 2011 09:57:17 +0000 (11:57 +0200)] 
lib: [sysfs.c] make sysfs_read_* function more robust

The functions does not modify result if the requested sysfs attribute
does not exist.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: disable lib/ at.c tests building
Karel Zak [Wed, 18 May 2011 09:14:32 +0000 (11:14 +0200)] 
build-sys: disable lib/ at.c tests building

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolsblk: improve discard support
Martin K. Petersen [Wed, 18 May 2011 04:43:14 +0000 (00:43 -0400)] 
lsblk: improve discard support

Use atol() instead of atoi() when extracting discard_max_bytes.

Only print discard_alignment and discard_zeroes_data if the device
supports discard. This prevents printing of undefined values with older
kernels.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
14 years agocramfs: remove cramfs_common.h
Davidlohr Bueso [Wed, 11 May 2011 17:16:00 +0000 (13:16 -0400)] 
cramfs: remove cramfs_common.h

We currently have cramfs.h and cramfs_common.h, this makes no sense, so remove
unite them and keep just cramfs.h

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agochrt: clarify use of -a option
Davidlohr Bueso [Tue, 10 May 2011 18:35:23 +0000 (14:35 -0400)] 
chrt: clarify use of -a option

With this option we can operate on all the thread group of a process not just
for changes, but also when obtaining information via sched_getscheduler().

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agoul.c: warn user when command chooses term type
Sami Kerola [Sat, 30 Apr 2011 11:06:27 +0000 (13:06 +0200)] 
ul.c: warn user when command chooses term type

Happens usually when user specifies garbage as -t argument.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoul.c: escape handling refactored
Sami Kerola [Sat, 30 Apr 2011 11:06:26 +0000 (13:06 +0200)] 
ul.c: escape handling refactored

Separate function for escape handling to make switch statement
more readable.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoul.c: close files and free memory after usage
Sami Kerola [Sat, 30 Apr 2011 11:06:25 +0000 (13:06 +0200)] 
ul.c: close files and free memory after usage

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoul.c: code style and comment fixes
Sami Kerola [Sat, 30 Apr 2011 11:06:24 +0000 (13:06 +0200)] 
ul.c: code style and comment fixes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoul.c: fix compier warnings
Sami Kerola [Sat, 30 Apr 2011 11:06:23 +0000 (13:06 +0200)] 
ul.c: fix compier warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoul.c: magic constant removal
Sami Kerola [Sat, 30 Apr 2011 11:06:22 +0000 (13:06 +0200)] 
ul.c: magic constant removal

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoul.c: use long options
Sami Kerola [Sat, 30 Apr 2011 11:06:21 +0000 (13:06 +0200)] 
ul.c: use long options

This commit introduces help & version options.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14 years agoul.c: convert definition to function
Sami Kerola [Sat, 30 Apr 2011 11:06:20 +0000 (13:06 +0200)] 
ul.c: convert definition to function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: don't use xalloc.h stuff
Karel Zak [Tue, 17 May 2011 12:02:57 +0000 (14:02 +0200)] 
agetty: don't use xalloc.h stuff

agetty logs errors and warnings to syslog, we shouldn't use err.h
stuff here.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: remove unnecessary options synonyms
Karel Zak [Tue, 17 May 2011 11:21:45 +0000 (13:21 +0200)] 
agetty: remove unnecessary options synonyms

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: use a generic function for strings concatenation
Karel Zak [Tue, 17 May 2011 11:03:52 +0000 (13:03 +0200)] 
agetty: use a generic function for strings concatenation

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoagetty: remove unnecessary space and "(void)" junk
Karel Zak [Tue, 17 May 2011 09:36:02 +0000 (11:36 +0200)] 
agetty: remove unnecessary space and "(void)" junk

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoaggety: further mingetty features
Dr. Werner Fink [Tue, 10 May 2011 15:35:23 +0000 (17:35 +0200)] 
aggety: further mingetty features

Allow the system adminstrator to provide options to the login
program.   Some changes for several layouts of the agetty
prompt like short host name or full qualified host name.
Four options enables the user to delay agetty after start,
to change the working directory, to change the root directory,
and to modified scheduling priority.

Signed-off-by: Werner Fink <werner@suse.de>
14 years agoagetty: add an autologin feature
Werner Fink [Mon, 9 May 2011 13:52:39 +0000 (15:52 +0200)] 
agetty: add an autologin feature

Add an autologin feature to agetty, that is that a user can be
automatically logged in.  For this the options of for the
login program has to used.  Make it possible to pass-through
options to the login program which requires a security check.

Signed-off-by: Werner Fink <werner@suse.de>
14 years agoagetty: better support of virtual console
Dr. Werner Fink [Tue, 10 May 2011 15:34:30 +0000 (17:34 +0200)] 
agetty: better support of virtual console

Better support of virtual console due support of UTF-8 login names
provided by e.g. LDAP.  Set default size 24/80 on serial modem lines
if not found by the kernel.

Signed-off-by: Werner Fink <werner@suse.de>
14 years agoagetty: check virtual console for UTF-8 support
Werner Fink [Mon, 9 May 2011 13:52:37 +0000 (15:52 +0200)] 
agetty: check virtual console for UTF-8 support

Check out a virtual console line for UTF-8 support, also skip
modem specific setups on a virtual console line.

Signed-off-by: Werner Fink <werner@suse.de>
14 years agoagetty: proper session on the terminal line
Werner Fink [Mon, 9 May 2011 13:52:36 +0000 (15:52 +0200)] 
agetty: proper session on the terminal line

Ensure a proper session on the terminal line, that is do a
vhangup() and become the controlling terminal.  After this
determine if the terminal line a virtual console by using
the ioctl TIOCMGET to get the status modem bits of a serial
line which is a invalid argument on a virtual console.

Signed-off-by: Werner Fink <werner@suse.de>
14 years agoagetty: cleanup argv parsing, utmp update, use writeall(), etc.
Werner Fink [Mon, 9 May 2011 13:52:35 +0000 (15:52 +0200)] 
agetty: cleanup argv parsing, utmp update, use writeall(), etc.

Next cleanup, that is split off special character parsing in do_prompt()
and parse_args(), handle name of line of virtual console and use it in
utmp update as well as the session id.  Also move the initial TERM
variable to open_tty() as we use this later in open_tty().  Use writeall()
but avoid repeat to often for EAGAIN (compare with info page of the
(g)libc, description of the macro EAGAIN).

Signed-off-by: Werner Fink <werner@suse.de>
14 years agoagetty: more code cleanup
Werner Fink [Mon, 9 May 2011 13:52:34 +0000 (15:52 +0200)] 
agetty: more code cleanup

More code cleanup, that is use bit mask for eight bit option, use
modern speed_t type, split local error() into local log_err(), log_warn(),
and dolog() for fine graduated logging with syslogger.

Signed-off-by: Werner Fink <werner@suse.de>
14 years agolibblkid: use stuff from sysfs.h and at.h
Karel Zak [Mon, 16 May 2011 15:20:55 +0000 (17:20 +0200)] 
libblkid: use stuff from sysfs.h and at.h

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolsblk: use generic sysfs functions
Karel Zak [Mon, 16 May 2011 13:24:26 +0000 (15:24 +0200)] 
lsblk: use generic sysfs functions

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: add generic sysfs utils
Karel Zak [Mon, 16 May 2011 12:08:50 +0000 (14:08 +0200)] 
lib: add generic sysfs utils

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: use cached buffers for nested PT probing
Karel Zak [Mon, 16 May 2011 08:31:50 +0000 (10:31 +0200)] 
libblkid: use cached buffers for nested PT probing

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: make whole disk probing more robust
Karel Zak [Fri, 13 May 2011 13:07:56 +0000 (15:07 +0200)] 
libblkid: make whole disk probing more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: update for recent fdisk changes
Karel Zak [Fri, 13 May 2011 13:05:45 +0000 (15:05 +0200)] 
tests: update for recent fdisk changes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: cleanup prober initialization
Karel Zak [Fri, 13 May 2011 10:48:57 +0000 (12:48 +0200)] 
libblkid: cleanup prober initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: cleanup flags
Karel Zak [Fri, 13 May 2011 10:28:12 +0000 (12:28 +0200)] 
libblkid: cleanup flags

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: remove note about obsolete volume_id library from man page
Karel Zak [Thu, 12 May 2011 16:32:08 +0000 (18:32 +0200)] 
mount: remove note about obsolete volume_id library from man page

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: don't read past end of FAT32 cluster chain
John Lindgren [Wed, 11 May 2011 18:32:18 +0000 (14:32 -0400)] 
blkid: don't read past end of FAT32 cluster chain

When looking for a volume label on a FAT32 filesystem, blkid does not
correctly handle special cluster values in the range 0x0FFFFFF8 to
0x0FFFFFFF, which mark the last cluster in a chain. As a result, it
begins to read [what it treats as] FAT entries from past the end of the
FAT. Depending on the data read, it may then try to parse random data
from the filesystem (including user files, free space, and other
directories) as though it were part of the root directory.

Because parsing stops early when a volume label is found, the problem
only occurs on filesystems without a volume label. When it occurs, it
may result in a long sequence of lseek and read calls; on an older IDE
drive with a 2 GB FAT32 partition, this amounted to around 3 seconds of
disk I/O.

After patching, blkid stop parsing as soon as it reaches a cluster value
greater than or equal to the number of entries in the FAT.

[kzak@redhat.com: - add le32_to_cpu()]

Signed-off-by: John Lindgren <john.lindgren@tds.net>
14 years agotests: add mount(8) test for fstab entries without options
Karel Zak [Wed, 11 May 2011 15:55:10 +0000 (17:55 +0200)] 
tests: add mount(8) test for fstab entries without options

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: -a segfaults when 4th field is omitted (mount options)
Karel Zak [Wed, 11 May 2011 14:57:27 +0000 (16:57 +0200)] 
mount: -a segfaults when 4th field is omitted (mount options)

 # echo 'tmpd /tmp/x tmpfs' >> /etc/fstab
 # mkdir /tmp/x
 # mount -a
 segfault

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: make threads aware
Davidlohr Bueso [Tue, 10 May 2011 22:03:09 +0000 (18:03 -0400)] 
taskset: make threads aware

Add a new '-a' option to view/modify the CPU affinity for an entire
group of threads belonging to a given PID.  We create two new
functions, print_affinity() and do_taskset() for code simplification.

Example:

zeus@jilguero:~/src/util-linux/schedutils$ ./taskset -a -p 01 3142
pid 3142's current affinity mask: 2
pid 3142's new affinity mask: 1
pid 3164's current affinity mask: 2
pid 3164's new affinity mask: 1
pid 854's current affinity mask: 2
pid 854's new affinity mask: 1

[kzak@redhat.com: - clean up
                  - move variables to struct taskset]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Tested-by: Jonathan Gonzalez <zeus@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: use xalloc lib
Davidlohr Bueso [Mon, 9 May 2011 15:18:32 +0000 (11:18 -0400)] 
taskset: use xalloc lib

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
14 years agofdisk: accept digits-space-suffix format
Francesco Cosoleto [Mon, 9 May 2011 14:00:36 +0000 (16:00 +0200)] 
fdisk: accept digits-space-suffix format

This is for users who are used to separate with a space numbers from units.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agochrt.1: fix grammar
Davidlohr Bueso [Fri, 6 May 2011 18:23:10 +0000 (15:23 -0300)] 
chrt.1: fix grammar

Corrent the English grammar for the new -a option.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>