Commit Graph

2651 Commits

Author SHA1 Message Date
Joe Hansen 973c4dd3be po: update da.po (from translationproject.org) 2011-02-10 09:14:50 +01:00
Petr Písař 9424806603 po: update cs.po (from translationproject.org) 2011-02-10 09:14:49 +01:00
Karel Zak c25dc28dff include: [c.h]: add unused attribute to ignore_result()
unfortunately, gcc 4.6

	void fn (void) {
		int foo;
		foo = bar ();
	}

evaluates that foo is never used. The __attribute__((unused)) is
necessary...

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-09 20:40:06 +01:00
Karel Zak cddd0999a2 tests: fix libmount test
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-09 15:02:41 +01:00
Petr Uzel d6c8d399b9 libuuid: do not check for EAGAIN after flock()
As per flock() manpage, flock() does not set errno=EAGAIN.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-09 14:23:49 +01:00
Petr Uzel 78d8c28f74 libmount: do not check for EAGAIN after flock()
As per flock() manpage, flock() does not set errno=EAGAIN.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-09 14:23:49 +01:00
Karel Zak 086f647108 mount: add rootcontext= for tmpfs on SELinux boxes
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=476964
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=676100
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-09 14:15:02 +01:00
Karel Zak 50a1e0cf8b include: [c.h]: fix __alloc_size__ test
Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-08 16:35:41 +01:00
Karel Zak 4b67533baa libmount: more robust flock() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-08 16:32:53 +01:00
Petr Uzel c190c6c2e9 libuuid: fix locking of clock state counter file
fcntl(2) does not work for synchronization of threads belonging
to the same process. Use flock(2) instead.

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

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 16:27:17 +01:00
Davidlohr Bueso f2f0dcaf11 schedutils: remove unneeded header files
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-02-08 16:23:28 +01:00
Benno Schulenberg 9b20779394 lscpu: add description of --sysroot option to man page, plus grammar touches
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-02-08 16:13:59 +01:00
Benno Schulenberg 8d7f2904cd lsblk: small grammar touches to the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-02-08 16:13:51 +01:00
Benno Schulenberg 3ec49e9e93 partx: normalize the punctuation of man page, and improve grammar here and there
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-02-08 16:13:41 +01:00
Eric Sandeen ea51c09c11 blkid: dynamically allocate devicename array
If more than 128 devices are specified on the blkid cmdline,
the devices[] array will overflow.

We can dynamically allocate the devices[] array based on number
of arguments to avoid this problem.

[kzak@redhat.com: - add "if (optind < argc)" check]

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-08 15:55:59 +01:00
Petr Uzel 0239ac01b0 wipefs: use write_all from include/writeall.h
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:43:38 +01:00
Davidlohr Bueso 8fdf2bf7b1 swapon: use EXIT_SUCCESS constants
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-02-08 15:40:51 +01:00
Davidlohr Bueso 15673c1598 dmesg: use strtol_or_err instead of atoi
We shouldn't be accepting things like 'dmesg -n 2crapinput'
This patch also changes the exit's value to use EXIT_* constants.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-02-08 15:40:48 +01:00
Karel Zak 39561c706a lscpu: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-08 15:36:28 +01:00
Petr Uzel 0ee03a2867 uuidd: correctly report number of generated subsequent UUIDs
Before this change, "uuidd -t -n 1" reported
"6fd0672e-2f9b-11e0-b9c8-000feae00cb0 and subsequent 1 UUIDs".
That is two subsequent UUIDs, which is not correct.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:22:07 +01:00
Petr Uzel 38cf50010f uuidd: fix -n usage
It does not make sense to request zero UUIDs - report error.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:21:53 +01:00
Petr Uzel 2307a2b9ea uuidd: increase connection backlog size to SOMAXCONN
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:21:51 +01:00
Petr Uzel 386749317e uuidd: use write_all from include/writeall.h
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:21:50 +01:00
Petr Uzel 2d16924217 uuidd: use die() where possible
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:21:49 +01:00
Petr Uzel 83a4498d77 uuidd: use daemon(3) library function
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:21:46 +01:00
Petr Uzel a8f131986c uuidd: use UUID_STR_LEN and UUID_LEN
Use named constants for lentgh of UUID's binary and textual
representation, instead of magic numbers.

[kzak@redhat.com: - use sizeof(uuid_t) rather than hardcoded size]

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-08 15:03:13 +01:00
Petr Uzel 783140784a uuidd: use UUIDD_OP_BULK_*_UUID named constants
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:01:30 +01:00
Petr Uzel faab2be3f4 uuidd: fix uuidd -r -n 2
uuidd -r -n 2 failed with "Unexpected reply length from server 36".
Fixed by this patch.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-08 15:01:26 +01:00
Marek Polacek b45fa8b2f1 include: [xalloc.h] include string.h
xalloc.h needs string.h for declaration of strdup().  Otherwise we
can get implicit declaration warning.  This patch prevents it.

Signed-off-by: Marek Polacek <mpolacek@redhat.com>
2011-02-07 17:46:15 +01:00
Karel Zak 40084d0d5c include: [c.h] add fallback for alloc_size attributes
Reported-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-07 17:29:47 +01:00
Karel Zak 93bd18bc84 fsck: include c.h, fallback for PATH_MAX
Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-07 16:20:04 +01:00
Karel Zak 2dd570ec85 include: [c.h] move ignore_result() to gcc-only block
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-07 15:52:21 +01:00
Karel Zak 309139c7dc libmount: add and copy FS internal flags
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-07 15:17:07 +01:00
Karel Zak 92b7c04d01 libmount: don't prepare update if syscall failed
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-07 15:15:30 +01:00
Karel Zak 260d3cf7f3 docs: update ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 13:14:27 +01:00
Karel Zak 68c88d942f blkid: add new return code 8 for ambivalent low-level probing result
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 12:59:58 +01:00
Karel Zak c38b4ebb0e blkid: add note about PART_ENTRY_ tags to blkid.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 12:34:34 +01:00
Karel Zak 53a4d69ddf blkid: don't return PART_ENTRY_* if partition is empty
The PART_ENTRY_* has nothing to do with the _contents_ of the block
device. So if the device is empty these values should not be printed
and blkid(8) has to return 2.

The PART_ENTRY_* for empty devices should be printed for "-o udev"
output only.

Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 12:12:37 +01:00
Karel Zak dbcafb870f blkid: don't print devname if nothing detected
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 12:01:45 +01:00
Karel Zak b70785bca6 libmount: cleanup helper initialization API
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-02 22:32:52 +01:00
Karel Zak 9376009202 libmount: add low-level API for umount
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-02 21:30:17 +01:00
Karel Zak cfb9db3095 libmount: cleanup high-level mount API
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-02 21:19:14 +01:00
Karel Zak 8fb81f73cf libmount: copy mount attrs from utab to context
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-02 14:10:42 +01:00
Karel Zak 69b3afc0b5 libblkid: check for swap or DM cow on small devices
The 1MiB limit for swap and COW is useless for Fedora LiveDVD where is
938KiB COW device.

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-01 09:38:33 +01:00
Fabian Groffen 9f55bf3794 libblkid: conditionalise parts from blkid/topology for Linux
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-31 17:53:25 +01:00
Sami Kerola aada54e028 build-sys: shell syntax fix in autogen.sh
Use of == as synonym of single = sign backfires on systems where
/bin/sh is dash, like with Ubuntu.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-01-31 17:22:30 +01:00
Petr Uzel 7897c815ba mount: fix parsing offset= followed by more options
mount does not parse parse offset= option if it is followed by other
options.  In umount, the parsing is done with the get_value() function.
This patch moves get_value to fstab.c (with new name get_option_value())
and fixes mount to use the function.

[kzak@redhat.com: - rename to get_option_value()
		  - use fstab.c rather than sundries.c]

Novell bugzilla: #666150

Reported-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-31 17:12:49 +01:00
Fabian Groffen 10a1c5ddf0 build-sys: provide missing strnlen from strutils
Solaris lacks strnlen, provide it from strutils.c.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-31 16:49:50 +01:00
Tobias Klauser 16ff981363 swapon: make needlessly global variables static
Also constify the option array.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2011-01-31 16:13:16 +01:00
Fabian Groffen a804f444eb provide a workaround if program_invocation_short_name is missing
Try some replacements, such as getexecname() on Solaris and __progname
on BSDs and Darwin.  When not found, base program_invocation_short_name
on the source filename it is used in, as not to require argv[0] to be
passed along.  This latter approach is not dynamic, but doesn't require
code changes for all places where program_invocation_short_name is used
now.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-31 15:51:06 +01:00