Commit Graph

2285 Commits

Author SHA1 Message Date
Karel Zak 772a37940c po: fix note about license
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:56:03 +01:00
Karel Zak 43bc1a1ba4 build-sys: add missing header
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:52:10 +01:00
Karel Zak 4ded9dfb2a po: update after rename
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:48:14 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak 5a16af58c5 libblkid: add LINHIB0001 signature to swap prober
The new swsuspend signature has been added by commit
3624eb04c24861ab296842414f9752a393e68372 to kernel 2.6.37-rc1.

Reported-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/682176
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 10:12:00 +01:00
Karel Zak c59773420c fdisk: fix freespace boundaries calculation on SGI disklabel
Thanks to Aurelien Jarno <aurelien@aurel32.net>

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510130
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-29 14:02:56 +01:00
Karel Zak e3d61a4579 fstrim: fix typo
Reported-by: Jeroen Oortwijn <oortwijn@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-29 13:09:16 +01:00
Mike Frysinger 2a7f8a8b7b libblkid: remove unnecessary __UCLIBC__ check
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-29 13:03:23 +01:00
Karel Zak 07b336c92e rtcwake: use err.h routines
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26 17:43:54 +01:00
Marek Otahal fcf6729430 rtcwake: add 'show' mode for rtc alarm
The 'show' mode prints information on current alarm setting.

[kzak@redhat.com: - code clean up
                  - don't setup alarm on 'disable' mode]

Signed-off-by: Marek Otahal <markotahal@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26 16:47:38 +01:00
Lukas Czerner d9e2d0dd14 fstrim: add new command
fstrim is used on a mounted filesystem to discard (or "trim") blocks
which are not in use by the filesystem.  This is useful for
solid-state drives (SSDs) and thinly-provisioned storage

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26 14:59:01 +01:00
Karel Zak 6d830ab641 libblkid: 256MiB is min size of btrfs
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-26 14:39:32 +01:00
Karel Zak 042154d764 fallocate: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 23:16:01 +01:00
Karel Zak f77fa578e3 build-sys: fix lsblk building
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 18:16:44 +01:00
Milan Broz 2a4c734bee lsblk: add new utility
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 17:08:32 +01:00
Karel Zak ce877f2d16 lib: [strutils] move strmode() from namei.c to strutils.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 17:08:32 +01:00
Karel Zak ecc264bc39 lib: [xalloc] add xstrdup()
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 17:08:32 +01:00
Karel Zak 9ead000613 findmnt: apply new changes from tt.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 17:08:32 +01:00
Karel Zak 3e451589d5 lib: [tt] add TT_FL_RIGHT, add columns list parser
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 17:08:31 +01:00
Karel Zak 8c9e72ce2b lib: [ismounted] don't wast time with mtab is /proc/mounts used
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-24 17:08:26 +01:00
Karel Zak b79bd89b05 libblkid: remove unused variable
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23 21:14:48 +01:00
Karel Zak 779d6a1bfb docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23 21:10:48 +01:00
Davidlohr Bueso 8abcf29002 lib: [strutils] general purpose string handling functions
This patch replaces a few functions used throughout the source:
* Renames getnum (from schedutils) to strtol_or_err
* Moves strtosize (from lib/strtosize.c)
* Moves xstrncpy (from include/xstrncpy.h)
* Adds strnlen, strnchr and strndup if not available (remove it from libmount utils)

A few Makefile.am files were modified to compile accordingly along with trivial renaming
in schedutils source code.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-23 21:06:49 +01:00
Karel Zak e8fc977aba libblkid: cache is incorrectly revalidated
for example:

	# echo "password" | cryptsetup luksFormat /dev/loop7
	# blkid /dev/loop7
	/dev/loop7: UUID="09240a80-1cf1-456d-9a6e-a35b39dc1f2b" TYPE="crypto_LUKS"

	# pvcreate -ff /dev/loop7
	# blkid /dev/loop7
	#

the second blkid call has to return info about LVM.

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23 19:56:57 +01:00
Karel Zak cf59b09c1e mount: mark die() as nonreturn
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-23 19:42:33 +01:00
Karel Zak 81a12d11ef mount: ignore *context= options on remount
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=563267
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-19 13:37:25 +01:00
Karel Zak d50da32777 mount: update relatime description in mount.8
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=653705
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-16 10:17:02 +01:00
Karel Zak efcf9a9d1e agetty: use nl_langinfo()
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 16:48:27 +01:00
Karel Zak 2a6fd10e02 cal: follow HAVE_LANGINFO
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 16:48:03 +01:00
Karel Zak f7a29259ee findmnt: follow HAVE_LANGINFO
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 16:47:13 +01:00
Karel Zak dc61d398ba lib: add fallback for nl_langinfo()
The fallback ignores locales and returns hardcoded static strings. It
should be enough to include "nls.h" to work with nl_langinfo() on all
systems.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 16:42:45 +01:00
Davidlohr Bueso 97be4a37e3 lib/tt: fix langinfo build break
When HAVE_LANGINFO_H is not defined we break the compilation in tt.c:

  CC     tt.o
tt.c: In function ‘tt_new_table’:
tt.c:142: warning: implicit declaration of function ‘nl_langinfo’
tt.c:142: error: ‘CODESET’ undeclared (first use in this function)
tt.c:142: error: (Each undeclared identifier is reported only once
tt.c:142: error: for each function it appears in.)
make: *** [tt.o] Error 1

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-15 13:37:27 +01:00
Davidlohr Bueso e8ae49476e libblkid: add blkid_probe_get_sectors()
This function allows users to obtain the device's 512-byte sector count.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 10:02:24 +01:00
Thorsten Glaser a4a27b06e8 hwclock: [m68k] unbreak FTBFS with recent (>= 2.4.18?) kernels
The old KDGHWCLK ioctl was removed from the Linux kernel quite some
time ago. The kd.c source file of hwclock contains fallback code to
handle this, but the fallback code never could have compiled or was
not fixed along other code changes. The Linux kernel nowadays igno-
res the ioctl entirely so removing it unless provided by the kernel
headers, to keep it working on very old kernels, seems the sensible
thing to do, as the comments say m68k only and deprecated (which is
correct AFAICT).

According to pickaxe on gitweb, it was removed in 2002:
http://git.kernel.org/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=a915e414af5fc541ff62ef0bfec847457ae650bc

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578168
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-15 09:55:12 +01:00
Karel Zak 37f243ed57 swapon: better text for "discard", note about swapon in fstab.5
Suggested by Hugh Dickins. Thanks.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-10 11:48:30 +01:00
Karel Zak 688e75f3f0 docs: remove ipc.texi (info with IPC API docs)
The IPC API documentation is maintained in the standard man-pages. It does
not make sense to maintain this docs in util-linux-ng.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-09 12:40:56 +01:00
Jeroen Oortwijn 24d1e474a2 libblkid: add magic to vfat
Add the "FAT     " magic to vfat. There are devices that use this magic
in their FAT filesystem.

Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/491476
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
2010-11-08 13:18:19 +01:00
Karel Zak 3f7fc4d43b column: segfault on empty input
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=579955
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-04 22:22:49 +01:00
Davidlohr Bueso 2ab428f6a8 sys-utils: make use xalloc wrappers
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 16:43:23 +01:00
Jeroen Oortwijn 01802c2e6d libblkid: add signature to FAT32 fsinfo block
Add 0x41645252 to the list of valid signatures of the FAT32 fsinfo
block. It isn't a valid signature, but there are devices that use this
signature in their FAT32 filesystem.

Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/589369
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
2010-11-01 16:43:08 +01:00
Hugh Dickins c2301380b4 swapon: add "discard" support
In kernel 2.6.36 (and in stable kernel 2.6.35.5) I made a tiny change
to the swapon(const char *path, int swapflags) system call interface:
kernel commit 3399446632739fcd05fd8b272b476a69c6e6d14a
swap: discard while swapping only if SWAP_FLAG_DISCARD

As things stand at present, we could just remove the swap discard
support; but since several filesystems (including ext4 and btrfs and
fat) are offering a "discard" mount option, I thought swap should take
the same course, and offer a "--discard" or "-d" option to swapon(8).

[kzak@redhat.com: - update swapon.8 man page
                  - use for -d the same logic as for -p]

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-01 16:35:31 +01:00
Davidlohr Bueso 3924d0f169 rev: use xalloc for memory allocation
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 15:17:11 +01:00
Davidlohr Bueso f0961db21f ul: use xalloc for memory allocation
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 15:17:10 +01:00
Karel Zak 2ebef8704d col: use err.h and EXIT_* macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-01 14:51:08 +01:00
Davidlohr Bueso 04faca4a13 col: use xalloc for memory allocation
Differentiate between malloc and realloc (not done so far) and get rid of local warn()

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 14:32:48 +01:00
Davidlohr Bueso b7159bd5c9 tailf: use xalloc for memory allocation
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 14:31:34 +01:00
Davidlohr Bueso 0d4e5f8e0d more: use xalloc for memory allocation
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 14:31:32 +01:00
Davidlohr Bueso f3a342a429 pg: use xalloc for memory allocation
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2010-11-01 14:03:08 +01:00
Karel Zak a21640baec mount: use utimensat(AT_FDCWD) rather than open()+futimens()
Thanks to Kay Sievers.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-29 20:04:00 +02:00
Karel Zak 29e6ed5e8f docs: add note about agetty to TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-29 17:51:35 +02:00