Commit Graph

1720 Commits

Author SHA1 Message Date
Karel Zak 9a39edc1ab build-sys: release++ (v2.17-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-09 12:02:58 +01:00
Karel Zak eb7c8ae88c docs: update v2.17 ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-09 11:44:38 +01:00
Karel Zak ccf2f2b84b docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-09 11:39:33 +01:00
Karel Zak 11f69289bb po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-09 11:37:57 +01:00
Jakub Bogusz 4de7d35649 po: update pl.po (from translationproject.org) 2009-12-09 11:31:37 +01:00
Karel Zak ef5d1feb93 docs: update TODO list
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-08 20:39:52 +01:00
Mike Frysinger 60cd48bd14 flock: fix hang when parent ignores SIGCHLD
If flock is executed from a process which has set SIGCHLD to SIG_IGN, then
flock will eat cpu and hang indefinitely if given a command to execute.
So before we fork(), make sure to set SIGCHLD handling back to the default
so that the later waitpid() doesn't freak out on us.

[kzak@redhat.com: - add a check for waitpid() return value]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-07 15:23:40 +01:00
Karel Zak 8179a658a4 docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 20:58:19 +01:00
Karel Zak 283a8c1598 tests: remove vol_id from tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 20:30:16 +01:00
Karel Zak 22aa51661b build-sys: check for pkg-config before gtk-doc
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 20:01:37 +01:00
Karel Zak fc31c7e5b2 libblkid: fix blkid_fstatat() code
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 18:44:57 +01:00
Karel Zak d7a0158242 build-sys: rewrite TLS detection
* use more robust tls.m4 from gcc project

   The old version (from util-linux-ng) used AC_TRY_COMPILE. That's
   wrong. We need to use AC_RUN_IFELSE to check that the result is
   link-able and executable.

   The new version also test it TLS really works in multi-thread
   applications.

 * we need to detect TLS usability for cross-compiling

 * this new version supports __thread keyword only, it seems that we
   needn't to care about anything other

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 15:45:19 +01:00
Karel Zak eb351926e2 mount: add squashfs to mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-03 15:49:15 +01:00
Karel Zak 45fc569a75 mount: add --no-canonicalize option
For example the /sbin/mount.fuse command calls

	mount -i -f /dev/foo /absolut/path

and it does not make sense to canonicalize already absolute paths. The
new --no-canonicalize option allows to avoid unwanted readlink()
calls.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-03 15:30:53 +01:00
Karel Zak be779d181d mount: move info about devices to the top of mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-02 13:35:18 +01:00
Karel Zak 8f43c4cce8 mount: add a note about /dev/disk/by-* to mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-02 13:30:03 +01:00
Karel Zak 25f4fd6060 tests: add UFS test image for libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-02 12:24:23 +01:00
Karel Zak 7af0caa726 tests: add VIA RAID test image for libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-02 12:03:18 +01:00
Américo Wang 2c9f0e8e7f hexdump: bug in hexdump when offset == file length
On Thu, Nov 26, 2009 at 03:42:21AM -0500, Mike Smith wrote:
>[mike@laptop ~]$ dd if=/dev/urandom of=testfile bs=1 count=42
>42+0 records in
>42+0 records out
>42 bytes (42 B) copied, 0.000216179 s, 194 kB/s
>[mike@laptop ~]$ hexdump -Cv testfile -s 42
>0000002a  bb b0 ba 50 fe 70 f8 d9  f7 96 36 49 e9 74 c7 bd  |...P.p....6I.t..|
>0000003a  82 cb 19 64 a6 30 53 29  d2 fa 08 e3 f4 26 7f de  |...d.0S).....&..|
>0000004a  bb 2c f2 df 7c a7 8c 6e  66 01                    |.,..|..nf.|
>00000054
>[mike@laptop ~]$ hexdump -Cv testfile -s 43
>0000002a

I think I got where the bug is, it's an off-by-one problem...

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
2009-12-01 13:23:05 +01:00
Ludwig Nussel 0779255c13 fsck: document fsck behavior wrt nofail option and fstype 'auto' 2009-12-01 12:21:10 +01:00
Sebastian Andrzej Siewior be5c9e1ed2 mount: add ubifs to the mount.8 man page
ubifs got merged into the linux kernel in v2.6.27. This patch adds its mount
options.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2009-12-01 12:20:51 +01:00
Ludwig Nussel 1bb516c34b fsck: honor nofail option in fsck
analog to mount gracefully ignoring non existing devices if the "nofail"
option is specified in fstab, also have fsck -A skip them. This way it's
possible to have devices optionally not available during boot but still
have them fsck'd if they are there.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
2009-12-01 12:15:10 +01:00
Karel Zak c2deb20f74 mount: better --move description
Reported-by: Paul Johnson <pauljohn@ku.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-01 10:33:33 +01:00
Karel Zak e7fee55205 libblkid: fix UFS detection
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-26 23:59:47 +01:00
Mike Frysinger c457971213 tailf: fix printf format
ssize_t types are shown with %zd, not %ld.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-23 10:14:56 +01:00
Karel Zak 3cb5555181 build-sys: release++ (v2.17-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 16:54:22 +01:00
Karel Zak 1a7a5af574 docs: add v2.17 ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 16:49:03 +01:00
Karel Zak fbecf1eb41 docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 15:53:03 +01:00
Karel Zak 6db1e85a71 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 15:51:26 +01:00
Karel Zak 4ae6b34193 build-sys: fix blkid CFLAGS in fdisk/Makefile.am
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 15:51:15 +01:00
Karel Zak 63cb4b0616 switch_root: add note about subroots to switch_root.8
Based on patch from Daniel Drake <dsd@laptop.org>

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 15:18:51 +01:00
Karel Zak 558417e8c8 Revert "switch_root: add subroot support"
This reverts commit a692a87459.

On Wed, Nov 18, 2009 at 03:33:12PM +0000, Daniel Drake wrote:
> Booting into a system this way just leads to problems because
> you cannot remount the root read-only at shutdown (leading to unclean
> shutdowns).

> Miklos Szeredi pointed out a trick to turn any directory into a
> mount point which avoids this problem. Therefore we can simplify
> switch_root again and simply document that its users should set
2009-11-20 15:11:59 +01:00
Karel Zak 8e5cf69f9e last: fix utmp.ut_time usage
The utmp.ut_time is timeval.tv_sec (time_t) or int32_t. It's more
robust not to use ctime() or time() directly.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 14:46:32 +01:00
Karel Zak 12adebcc40 line: remove deprecated #ident directive
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-20 14:19:03 +01:00
Jakub Bogusz 39c44512bf po: update pl.po (from translationproject.org) 2009-11-20 13:48:26 +01:00
Karel Zak b7ce600d3d mount: check for unsuccessful read-only bind mounts
Linux kernel allows to use MS_RDONLY together with MS_BIND,
unfortunately the MS_RDONLY is silently ignored and the target
mountpoint is still read-write. Then we have 'ro' in mtab and 'rw' in
/proc/mounts.

This patch checks for this situation by access(2) or futimens(2)
(change atime) and mtab is properly updated and user informed.

Reported-by: Terry Burton <tez@terryburton.co.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-19 15:56:12 +01:00
Karel Zak 75c1d2aee6 ionice: add a note about none class and CFQ
Reported-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 17:13:35 +01:00
Karel Zak 1f06c70d9c mount: add a note about bind-dir remounts
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 16:11:01 +01:00
Karel Zak 81dc64f8c0 fdisk: offer aligned first sector
Typical "new partition" dialog looks like:

     Partition number (1-4): 1
     First sector (4-818687, default 4):
                             ^^^^^^^^^

The range (e.g. 4-818687) depends on fdisk mode (DOS/non-DOS), but the
default value should be always aligned.

For example RAID5 device in the DOS mode:

   Disk /dev/md0: 419 MB, 419168256 bytes
   2 heads, 4 sectors/track, 102336 cylinders, total 818688 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 65536 bytes
   Disk identifier: 0x081479c3

   ....

   Command (m for help): n
   Command action
      e   extended
      p   primary partition (1-4)
   p
   Partition number (1-4): 1
   First sector (4-818687, default 128):    <---- !!!
   Using default value 128
   Last sector, +sectors or +size{K,M,G} (128-818687, default 818687): +10M

   Command (m for help): p

   ....

       Device Boot      Start         End      Blocks   Id  System
   /dev/md0p1             128       20607       10240   83  Linux

For non-DOS mode the range will be:

   First sector (128-818687, default 128):

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:10 +01:00
Karel Zak b7e76f8ef1 fdisk: align end of partition when defined by +size{K,M,G}
It's better to have disks without gaps between partitions, so it's
better to align ends of partitions.

Note, we don't care about end of partitions when the last sector has
been explicitly requested by user.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:10 +01:00
Karel Zak 8e23f2d20f fdisk: check for partition boundary
Disk /dev/md0: 419 MB, 419168256 bytes
2 heads, 4 sectors/track, 102336 cylinders, total 818688 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 65536 bytes
Disk identifier: 0x081479c3

    Device Boot      Start         End      Blocks   Id  System
/dev/md0p1             200      818687      409244   83  Linux
Partition 1 does not start on physical block boundary.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:10 +01:00
Karel Zak 8947b52ba0 fdisk: print info and recommendations about alignment
* inform user that phy.sector > log.sector
 * warn user when alignment_offset is not provided does, DOS-compatible
   mode is enabled and the default geo.sectors are not aligned
 * suggest to change display units to sectors (oh yes, fdisk
   default are cylinders...)

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:10 +01:00
Karel Zak edd7b95838 fdisk: use minimal_io_size for the first partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:09 +01:00
Karel Zak b39a46413f fdisk: add basic routines for LBA alignment
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:09 +01:00
Karel Zak 05dc9645f6 fdisk: read topology info from libblkid
and print ('p' command) info about logical and physical sectors and
alignment_offset.

minimum_io_size

  we don't use physical sector size directly, because on RAIDs is
  better to use minimum_io_size (aka stripe chunk size). For disk drives
  is minimum_io_size the same value as physical sector size.

alignment_offset

  For compatibility with legacy operating systems some vendors provide
  disks where logical and physical sectors are aligned at sector 63
  (= geometry.sectors). In other words the physical 4KB sectors
  start at LBA -1. Then the physical boundary is at:

                     alignment_offset + N * phy_sector_size

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-18 11:25:09 +01:00
Karel Zak 1ac300932d more: limited line buffer length results in corrupted UTF-8 text
Addresses-Debian-Bug: #552608
Reported-By: Roger Leigh <rleigh@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-16 15:52:45 +01:00
Karel Zak 9e407bd910 tests: add NTFS blkid test
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-16 14:36:29 +01:00
Karel Zak 832b3f2eb6 libblkid: fix NTFS non-ASCII labels
Addresses-Red-Hat-Bug: #536797
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-13 00:10:48 +01:00
Karel Zak c54670d564 blkid: add ID_FS_AMBIVALENT for udev output
UI tools that read information from udev need a way how inform users
about ambivalent probing result (more valid filesystems on the
device).

This patch add a new ID_FS_AMBIVALENT variable:

	ID_FS_AMBIVALENT=<info> <info> [ ...]

where <info> is:

	<usage>:<type>[:<version>]

all strings are encoded (white spaces and utf8 are replaced with \hex).

For example:

	# blkid -p -o udev /dev/sda1
	ID_FS_AMBIVALEN=filesystem:vfat:FAT12 other:swap:2

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-11 17:21:36 +01:00
Karel Zak 7a3531d481 libblkid: remove duplicate debug message
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-11 15:34:54 +01:00