Frédéric Bothamy [Sun, 13 Jan 2008 05:35:51 +0000 (22:35 -0700)]
sys-utils: correct setarch.8 manpage link creation
At least on Debian, .so commands are relative to the man directory
(e.g., /usr/share/man), not to the subdirectory:
% man i386
man: can't open /usr/share/man/setarch.8: No such file or directory
No manual entry for i386
See also http://bugs.debian.org/453245
Addresses-Debian-Bug: #453245 Signed-off-by: Frédéric Bothamy <frederic.bothamy@free.fr> Signed-off-by: LaMont Jones <lamont@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Matthias Koenig [Mon, 17 Dec 2007 10:33:20 +0000 (11:33 +0100)]
mount: "nofail" mount option
It would be nice to have a mount option "nofail" indicating that mount
should not return an error if the device does not exit. This is useful
for hotpluggable devices which are configured in fstab and __might__
not exist at boot time.
Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
David Woodhouse [Tue, 4 Dec 2007 13:44:05 +0000 (14:44 +0100)]
hwclock: check for ENODEV
/sbin/hwclock is supposed to fall back to using /dev/rtc0 if /dev/rtc isn't
working (which it isn't, because mkinitrd creates it with the old device
numbers, and we're switching to the new RTC_CLASS driver).
Unfortunately, it'll only cope if the error it gets is ENOENT (i.e. the device
node doesn't exist). It doesn't fall back to the next device in the list if the
error is ENODEV, which is what happens when the device node exists, but there's
no driver.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Karel Zak <kzak@redhat.com>
David Brownell [Fri, 30 Nov 2007 21:42:41 +0000 (13:42 -0800)]
rtcwake: misc cleanups
Cleanups for rtcwake:
- Minor doc updates: highlight the framebuffer problem,
give correct history of this code
- Improve debug output
- Fix some linelength bugs
Note that this code predated the sysfs "wakealarm" mechanism, and
works around several now-fixed bugs in the kernel RTC framework.
Nowadays it would make sense to make this program use only the sysfs
interface to the RTC, using "since_epoch" instead of RTC_RD_TIME and
"wakealarm" instead of the four other ioctls. That could simplify
the mess involved in timezone handling.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Karel Zak <kzak@redhat.com>
There is absolutely no reason why cfdisk should not display
cylinders beyond 1024. The number of cylinders needs to be
truncated only for the CHS field.
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Matthias Koenig [Tue, 13 Nov 2007 15:28:38 +0000 (16:28 +0100)]
mkfs.minix: add sectorsize check
Minix filesystem until version 2 has a fixed blocksize of 1024 bytes.
If you try to create a filsystem on a device with a physical sectorsize
larger than 1024 bytes, this resulting minix fs cannot be mounted,
because the physical sectorsize must be smaller than the filesystem
blocksize.
This patch adds a check for this and will refuse to create a filesystem
if the sectorsize is bigger than the blocksize.
Randy Dunlap [Tue, 16 Oct 2007 00:38:57 +0000 (17:38 -0700)]
sfdisk: cleanup 83 gcc warnings
Fix strict gcc warnings that come from using:
("-Wall -Wp,-D_FORTIFY_SOURCE=2")
83 warnings fixed:
sfdisk.c:249: warning: pointer targets in initialization differ in signedness
sfdisk.c:376: warning: pointer targets in passing argument 1 of 'chars_to_ulong' differ in signedness
sfdisk.c:702: warning: pointer targets in passing argument 1 of 'copy_to_int' differ in signedness
sfdisk.c:703: warning: pointer targets in passing argument 1 of 'copy_to_int' differ in signedness
sfdisk.c:1709: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness
sfdisk.c:1709: warning: pointer targets in assignment differ in signedness
sfdisk.c:1714: warning: pointer targets in passing argument 1 of 'index' differ in signedness
sfdisk.c:1714: warning: pointer targets in assignment differ in signedness
sfdisk.c:1719: warning: pointer targets in passing argument 1 of 'index' differ in signedness
sfdisk.c:1719: warning: pointer targets in assignment differ in signedness
sfdisk.c:1723: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:1723: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1723: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:1723: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1723: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1723: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1729: warning: pointer targets in passing argument 1 of 'index' differ in signedness
sfdisk.c:1729: warning: pointer targets in assignment differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:1739: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness
sfdisk.c:2021: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2021: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2021: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2021: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2021: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2021: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2059: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2059: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2059: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2059: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2059: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2059: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2061: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2061: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2061: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2061: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2061: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2061: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2063: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2063: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2063: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2063: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2063: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2063: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2065: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2065: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2065: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2065: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2065: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2065: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2067: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2083: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2096: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2130: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2130: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2130: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2130: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2130: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2130: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2132: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
sfdisk.c:2154: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2155: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2156: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2167: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2168: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
sfdisk.c:2169: warning: pointer targets in passing argument 1 of 'get_ul' differ in signedness
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Randy Dunlap [Tue, 16 Oct 2007 00:38:40 +0000 (17:38 -0700)]
script: cleanup gcc warnings
Fix strict gcc warnings that come from using:
("-Wall -Wp,-D_FORTIFY_SOURCE=2")
script.c:239: warning: ignoring return value of 'write', declared with attribute warn_unused_result
script.c:330: warning: ignoring return value of 'write', declared with attribute warn_unused_result
script.c:331: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Randy Dunlap [Tue, 16 Oct 2007 00:38:22 +0000 (17:38 -0700)]
more: cleanup gcc warnings
Fix strict gcc warnings that come from using:
("-Wall -Wp,-D_FORTIFY_SOURCE=2")
more.c:185: warning: passing argument 1 of 'setupterm' discards qualifiers from pointer target type
more.c:205: warning: passing argument 1 of 'tparm' discards qualifiers from pointer target type
more.c:812: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness
more.c:931: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness
more.c:1285: warning: pointer targets in passing argument 1 of 'ttyin' differ in signedness
more.c:1486: warning: pointer targets in passing argument 1 of 'ttyin' differ in signedness
more.c:1879: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in signedness
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Add a missing period, a missing space, a comma and a word for clarity,
plus a period and an uppercase letter to match surrounding messages.
Further add a missing call to gettext, and undo an unneeded linewrap.
When hwclock --hctosys is started very early during the system startup,
with / still mounted read-only, and there was no /etc/adjtime file,
hwclock fails creating a default adjfile full of zeroes, and prints an
error message. I believe that such zero adjfile is not necessary,
because it means exactly the same as no adjfile at all.
The attached patch prevents creation of a zero adjfile, of course unless
something gets changed (this never happens during a --hctosys).
Karel Zak [Tue, 11 Sep 2007 12:35:34 +0000 (14:35 +0200)]
mount: prevent loop mounting the same file twice
The mount syscall prevents mounting the same device twice
to the same mountpoint. When loop mounting a file, for each
file a new loop device gets allocated, which prevents the detection
of loop mounting the same file to the same mountpoint twice.
The patch adds a check to prevent double mounts, if the same loopfile
is going to be mounted with the same offset to the same mountpoint.
Karel Zak [Thu, 25 Oct 2007 10:29:51 +0000 (12:29 +0200)]
losetup: canonicalize loopfile name
When setting up a loop device, canonicalize the loop file
name. This simplifies a later identification of loop file names
when querying the loop devices.