Corentin Chary [Mon, 24 Aug 2009 11:11:54 +0000 (13:11 +0200)]
libblkid: add UBI volume support
Probe UBI volume under /dev (or /devfs, /devices).
ubi_ctrl skip is hardcoded, maybe we should find a
cleaner way to do that. Also change probe.c to handle
char devices.
[kzak@redhat.com: - rebase the patch to the current HEAD]
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 18 Aug 2009 11:33:27 +0000 (13:33 +0200)]
fallocate: new command
The fallocate(1) utility is used to preallocate blocks to a file.
This can be useful for virtual images, database files, testing, etc.
Normally we'd hope that various tools will start using preallocation
internally, but until then such a utility may be useful, and could be
scripted as well.
The original Eric's version is available at:
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2490
This version:
- checks for fallocate glibc function and kernel syscall
- does not provide a fallback and does not call posix_fallocate()
- adds long options
- uses err.h for errro messages
- adds NLS support
- cleanups man page
Co-Author: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
mount: document changed semantics of tmpfs size option in mount.8
Linux kernel commit 818db35992c249dc32c1d86daf7d533fb0952f5d fixed a
problem where invoking mount -t tmpfs with a size argument smaler than the
size of one page caused the limits on the size of a tmpfs to not operate.
The commit also caused the number supplied by the size option to be
rounded up to the nearest page size instead of down. This alters the man
page to match the behavior of the kernel in this instance.
Signed-off-by: Kevin Granade <kevin.granade@gmail.com>
Eric Sandeen [Thu, 17 Sep 2009 21:56:00 +0000 (16:56 -0500)]
libblkid: fix topology information values
Looks like the topology values returned are being
inflated by x 512, but the kernel reports them in bytes;
no need for the multiplication, just return the value as-is.
Karel Zak [Wed, 16 Sep 2009 14:17:41 +0000 (16:17 +0200)]
lib: add a generic crc32()
This is public domain implementation, based on static crc32_table[].
This implementation is used on may places (libparted, FreeBSD kernel,
PostgreSQL, ...). The Linux kernel uses on-the-fly generated and
allocated tables. That's useless in shared libraries.
Karel Zak [Tue, 15 Sep 2009 18:51:30 +0000 (20:51 +0200)]
libblkid: move filter macros to header file
* move blkid_bmp_* macros to blkidP.h
* add blkid_bmp_nbytes() -- returns size of bitmap in bytes
* add blkid_bmp_nwords() -- returns size of bitmap in words
(rename from blkid_bmp_size())
Karel Zak [Fri, 11 Sep 2009 12:00:50 +0000 (14:00 +0200)]
sfdisk: dump has to be $LANG insensitive
This stupid bug has been introduced by:
commit add5133f4ad5136aac3ce7627e615d14893d0aeb
Author: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Date: Fri Oct 3 08:52:35 2008 +0200
fdisk: several strings without gettext calls
... so it shows that we need to improve our review process... :-(
Address-Red-Hat-Bug: #522718 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 18 Aug 2009 13:48:34 +0000 (15:48 +0200)]
rtcwake: add S5 support
Based on patch from
Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
at
https://bugzilla.redhat.com/show_bug.cgi?id=449115
Piergiorgio's note about S5:
> According to the ACPI specifications, chapter 4.7.2.4 "Real Time
> Clock Alarm", the wakeup from RTC, when supported, should work from
> *sleep* state S1-S3 and, optionally, from S4.
>
> Note 3 (same chapter) says that S5 is *not* a sleep state and should
> not be supported. Actually it also says that: "The OS will disable
> the RTC_EN bit prior to entering the G2/S5 or G3 states regardless."
>
> Nevertheless, on all PC supporting the RTC wakeup I tested, all were
> able to wake from S5.
In the check_blocks() loop, current_page is not incremented. Because of this
bug, the loop does not end when the end of the device is reached. Instead it
tries to continue reading, which of course fails, and eventually mkswap aborts
("too many bad pages").
Note that this can only be tested with swap partitions, mkswap ignores the -c
option for swap files.
Signed-off-by: Peter De Wachter <pdewacht@gmail.com>
Karel Zak [Thu, 20 Aug 2009 13:46:10 +0000 (15:46 +0200)]
hwclocks: use time limit for KDGHWCLK busy wait
Currently the busy wait in synchronize_to_clock_tick_kd() is
restricted by number of loops. It's better to use time limit
(1.5s). We already use this method for RTC.
Peter Volkov [Tue, 18 Aug 2009 12:21:33 +0000 (14:21 +0200)]
mount: mention mtab for single mount point mount in mount.8
Karel Zak wrote: "This is very old (10+years) feature. The mount(8) is
trying to found mountpoint/device in fstab and then in mtab.
I guess the original purpose for this feature is user-friendly 'mount
/node -o remount'. Unfortunately, the code does not check for
MS_REMOUNT flag and consults mtab in all cases. (The code is
consulting fstab/mtab before mount options parsing.)"
Zdenek Behan [Mon, 3 Aug 2009 01:46:27 +0000 (03:46 +0200)]
tests: fdisk doslabel test also checks changing partition type
* Changed apostrophes around test commands to quotes, this makes vim
syntax highlighting more happy, and makes the newlines stand out.
* Added check for changing partition type. After the change is done and
checked, the partition is deleted and re-created to not mess with the
other md5's already in place...