]> err.no Git - util-linux/log
util-linux
14 years agoupdate TODO file
Karel Zak [Fri, 8 Jan 2010 13:15:13 +0000 (14:15 +0100)]
update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: release++ (v2.17)
Karel Zak [Thu, 7 Jan 2010 21:41:05 +0000 (22:41 +0100)]
build-sys: release++ (v2.17)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update v2.17 ReleaseNotes
Karel Zak [Thu, 7 Jan 2010 21:31:31 +0000 (22:31 +0100)]
docs: update v2.17 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update AUTHORS file
Karel Zak [Thu, 7 Jan 2010 21:01:16 +0000 (22:01 +0100)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: merge changes
Karel Zak [Thu, 7 Jan 2010 20:59:56 +0000 (21:59 +0100)]
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: update zh_CN.po (from translationproject.org)
Ray Wang [Thu, 7 Jan 2010 20:54:22 +0000 (21:54 +0100)]
po: update zh_CN.po (from translationproject.org)

14 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Thu, 7 Jan 2010 20:54:22 +0000 (21:54 +0100)]
po: update pl.po (from translationproject.org)

14 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Thu, 7 Jan 2010 20:54:22 +0000 (21:54 +0100)]
po: update fi.po (from translationproject.org)

14 years agopo: update eu.po (from translationproject.org)
Mikel Olasagasti [Thu, 7 Jan 2010 20:54:22 +0000 (21:54 +0100)]
po: update eu.po (from translationproject.org)

14 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Thu, 7 Jan 2010 20:54:21 +0000 (21:54 +0100)]
po: update cs.po (from translationproject.org)

14 years agotests: refresh lscpu tests
Karel Zak [Thu, 7 Jan 2010 20:49:40 +0000 (21:49 +0100)]
tests: refresh lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: add {32,64}-bit CPU modes detection
Karel Zak [Thu, 7 Jan 2010 16:34:03 +0000 (17:34 +0100)]
lscpu: add {32,64}-bit CPU modes detection

This patch add "CPU op-mode(s):" field that prints all supported CPU
operation modes. The field is based on CPU flags:

rm (real mode)          16-bit
tm (transparent mode)   32-bit
lm (long mode)          64-bit

Example:

$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                2
Thread(s) per core:    1
Core(s) per socket:    2
CPU socket(s):         1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 15
Stepping:              11
CPU MHz:               1600.000
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofdisk: sleep-after-sync and fsync usage
Karel Zak [Wed, 6 Jan 2010 10:12:43 +0000 (11:12 +0100)]
fdisk: sleep-after-sync and fsync usage

It seems that sleep() after sync() is unnecessary legacy. It's very
probably unnecessary since kernel 1.3.20. For example the libparted
does not to use sleep() at all.

It seems that more important is fsync() usage in fdisks. For more
details see

  http://marc.theaimsgroup.com/?l=linux-kernel&m=105545785306867&w=3
  http://marc.theaimsgroup.com/?l=linux-kernel&m=105545848607353&w=3
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276369

Currently we use fsync() in fdisk only. This patch also add fsync() to
sfdisk and cfdisk.

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276369
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=502639
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: fix typo in mount.8
Karel Zak [Mon, 4 Jan 2010 13:27:52 +0000 (14:27 +0100)]
mount: fix typo in mount.8

Reported-by: Joe Peterson <joe@skyrush.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: DRBD support for blkid
Bastian Friedrich [Mon, 4 Jan 2010 13:13:13 +0000 (14:13 +0100)]
libblkid: DRBD support for blkid

DRBD is the Distributed Replicated Block Device, a replication service for low
level block devices.

The attached patch provides libblkid detection for v08 type drbd devices
(v08 is the current one).

[kzak@redhat.com: - port to libblkid 2.17
                  - use BLKID_USAGE_RAID flag
                  - remove BLKID_IDINFO_TOLERANT flag
                  - note that DRBD is supported since kernel v2.6.33-rc1]

Signed-off-by: Bastian Friedrich <bastian.friedrich@collax.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agosfdisk: confused about disk size
Karel Zak [Mon, 4 Jan 2010 10:34:13 +0000 (11:34 +0100)]
sfdisk: confused about disk size

The size of disk in the sfdisk command is based on number of cylinders
(this is probably legacy from CHS epoch). That's wrong because
partitions are addressed in sectors (LBA), so cylinders don't provide
necessary resolution (granularity).

On Sat, Jan 02, 2010 at 01:01:16PM +0100, Giulio wrote:
> $ cat /sys/block/sda/size
184549376
>
> $ sfdisk  -d /dev/sda > part.dump
> $ cat part.dump
> # partition table of /dev/sda
> unit: sectors
>
> /dev/sda1 : start=     2048, size=  2097152, Id=83
> /dev/sda2 : start=  2099200, size= 12582912, Id=83
> /dev/sda3 : start= 14682112, size= 84934656, Id=83
> /dev/sda4 : start= 99616768, size= 84932608, Id=83
>
>
> $ sfdisk  -L  /dev/sda < part.dump
> Checking that no-one is using this disk right now ...
> OK
>
> Disk /dev/sda: 11487 cylinders, 255 heads, 63 sectors/track
> Old situation:
> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
>
>    Device Boot Start     End   #cyls    #blocks   Id  System
> /dev/sda1          0+    130-    131-   1048576   83  Linux
> /dev/sda2        130+    913-    784-   6291456   83  Linux
> /dev/sda3        913+   6200-   5287-  42467328   83  Linux
> /dev/sda4       6200+  11487-   5287-  42466304   83  Linux
> Warning: given size (84932608) exceeds max allowable size (84921887)

 disk size:

 based on number of cylinders:   11487 * 8225280 = 94483791360 bytes
 based on number of sectors:     184549376 * 512 = 94489280512 bytes

 end of 4th partition (LBA in bytes):
                     (99616768 + 84932608) * 512 = 94489280512

Reported-by: Giulio <giulioo@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopg: command enters infinite loop
Mike Frysinger [Sat, 26 Dec 2009 19:56:54 +0000 (14:56 -0500)]
pg: command enters infinite loop

In a multibyte locale such as en_GB.UTF-8, the pg command cannot handle files
containing a form feed character (ASCII 0x0c) at the start of a line. The
program enters an infinite loop.

I've traced the problem to the function endline_for_mb in file pg.c. The code
assumes that the libc function wcwidth will return a nonnegative value, which
is not true for a form feed character. wcwidth returns -1 and the unsigned
variable "pos" goes into underflow.

I'll attach a patch which tests whether the character is printable before
calling wcwidth. If not, it uses instead the width of the constant L'?' which
is later used to replace nonprintable characters. I trust that we can assume
printability of this constant :-)

Steps to Reproduce:
1. Select a multibyte locale (tested with en_GB.UTF-8)
2. Create a file with a form feed character (0x0c) at the start of a line.
3. Try to display this file using the pg command.

Reported-by: Mark Calderbank <m.calderbank@iname.com>
Reported-by: Mike Frysinger <vapier@gentoo.org>
Addresses: https://bugs.gentoo.org/297717
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoumount: add --no-canonicalize
Karel Zak [Thu, 17 Dec 2009 11:33:21 +0000 (12:33 +0100)]
umount: add --no-canonicalize

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: disable --no-canonicalize for non-root users
Karel Zak [Thu, 17 Dec 2009 11:27:16 +0000 (12:27 +0100)]
mount: disable --no-canonicalize for non-root users

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add silicon RAID test
Karel Zak [Tue, 15 Dec 2009 13:08:14 +0000 (14:08 +0100)]
tests: add silicon RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add promise RAID test
Karel Zak [Tue, 15 Dec 2009 13:07:53 +0000 (14:07 +0100)]
tests: add promise RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add nvidia RAID test
Karel Zak [Tue, 15 Dec 2009 13:07:10 +0000 (14:07 +0100)]
tests: add nvidia RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add lsi RAID test
Karel Zak [Tue, 15 Dec 2009 13:06:18 +0000 (14:06 +0100)]
tests: add lsi RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add jmicron RAID test
Karel Zak [Tue, 15 Dec 2009 13:05:54 +0000 (14:05 +0100)]
tests: add jmicron RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add isw RAID test
Karel Zak [Tue, 15 Dec 2009 13:04:44 +0000 (14:04 +0100)]
tests: add isw RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add hpt45x RAID test
Karel Zak [Tue, 15 Dec 2009 13:04:02 +0000 (14:04 +0100)]
tests: add hpt45x RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add hpt37x RAID test
Karel Zak [Tue, 15 Dec 2009 13:01:40 +0000 (14:01 +0100)]
tests: add hpt37x RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add adaptec RAID test
Karel Zak [Tue, 15 Dec 2009 13:01:03 +0000 (14:01 +0100)]
tests: add adaptec RAID test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: rename highpoint RAIDs to hpt{37,45}x_raid_member
Karel Zak [Tue, 15 Dec 2009 11:30:02 +0000 (12:30 +0100)]
libblkid: rename highpoint RAIDs to hpt{37,45}x_raid_member

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix highpoint37x detection
Karel Zak [Tue, 15 Dec 2009 10:55:27 +0000 (11:55 +0100)]
libblkid: fix highpoint37x detection

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix Adaptec RAID detection
Karel Zak [Tue, 15 Dec 2009 01:17:28 +0000 (02:17 +0100)]
libblkid: fix Adaptec RAID detection

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: add LGPLv2+ to list of licenses
Karel Zak [Mon, 14 Dec 2009 11:47:56 +0000 (12:47 +0100)]
docs: add LGPLv2+ to list of licenses

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: release++ (v2.17-rc3)
Karel Zak [Thu, 10 Dec 2009 21:05:07 +0000 (22:05 +0100)]
build-sys: release++ (v2.17-rc3)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update v2.17 ReleaseNotes
Karel Zak [Thu, 10 Dec 2009 21:01:13 +0000 (22:01 +0100)]
docs: update v2.17 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: merge changes
Karel Zak [Thu, 10 Dec 2009 20:55:38 +0000 (21:55 +0100)]
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: update eu.po (from translationproject.org)
Mikel Olasagasti Uranga [Thu, 10 Dec 2009 20:50:46 +0000 (21:50 +0100)]
po: update eu.po (from translationproject.org)

14 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Thu, 10 Dec 2009 20:50:46 +0000 (21:50 +0100)]
po: update cs.po (from translationproject.org)

14 years agodocs: add ngettext() into TODO file
Karel Zak [Thu, 10 Dec 2009 12:14:55 +0000 (13:14 +0100)]
docs: add ngettext() into TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: fix msgid bugs
Karel Zak [Thu, 10 Dec 2009 12:04:41 +0000 (13:04 +0100)]
po: fix msgid bugs

Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: bug (typo) in function MD5Final()
Karel Zak [Thu, 10 Dec 2009 10:59:46 +0000 (11:59 +0100)]
lib: bug (typo) in function MD5Final()

On Wed, Dec 09, 2009 at 10:08:38PM +0000, Jochen Voss wrote:
> while experimenting with coccinelle, I accidentally found what I
> believe is a bug in util-linux-ng release 2.17-rc2 (downloaded
> today). The problem is the following code in lib/md5.c (around line
> 153):
>
>     void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
>     {
>   [...]
>   memset(ctx, 0, sizeof(ctx));        /* In case it's sensitive */
>     }
>
> The third argument of memset should probably be the size of 'struct
> MD5Context' instead of the size of the pointer.  So my guess is
> that the memset line should be
>
>   memset(ctx, 0, sizeof(*ctx));       /* In case it's sensitive */
>
> instead.  I don't know whether this actually causes a problem,
> but the comment makes it seem possible that it does.

Note, this typo does not have any impact on the utils in the
util-linux-ng project, because we don't use MD5 for any security
sensitive data or cryptographic stuff. The typo also does not have any
impact to the final MD5 hashes.

Reported-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: release++ (v2.17-rc2)
Karel Zak [Wed, 9 Dec 2009 11:02:58 +0000 (12:02 +0100)]
build-sys: release++ (v2.17-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update v2.17 ReleaseNotes
Karel Zak [Wed, 9 Dec 2009 10:44:38 +0000 (11:44 +0100)]
docs: update v2.17 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update AUTHORS file
Karel Zak [Wed, 9 Dec 2009 10:39:33 +0000 (11:39 +0100)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: merge changes
Karel Zak [Wed, 9 Dec 2009 10:37:57 +0000 (11:37 +0100)]
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Wed, 9 Dec 2009 10:31:37 +0000 (11:31 +0100)]
po: update pl.po (from translationproject.org)

14 years agodocs: update TODO list
Karel Zak [Tue, 8 Dec 2009 19:39:52 +0000 (20:39 +0100)]
docs: update TODO list

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoflock: fix hang when parent ignores SIGCHLD
Mike Frysinger [Mon, 7 Dec 2009 14:18:17 +0000 (15:18 +0100)]
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>
14 years agodocs: update TODO file
Karel Zak [Fri, 4 Dec 2009 19:58:19 +0000 (20:58 +0100)]
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: remove vol_id from tests
Karel Zak [Fri, 4 Dec 2009 19:30:16 +0000 (20:30 +0100)]
tests: remove vol_id from tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: check for pkg-config before gtk-doc
Karel Zak [Fri, 4 Dec 2009 19:01:37 +0000 (20:01 +0100)]
build-sys: check for pkg-config before gtk-doc

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix blkid_fstatat() code
Karel Zak [Fri, 4 Dec 2009 17:44:57 +0000 (18:44 +0100)]
libblkid: fix blkid_fstatat() code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: rewrite TLS detection
Karel Zak [Fri, 4 Dec 2009 14:45:19 +0000 (15:45 +0100)]
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>
14 years agomount: add squashfs to mount.8
Karel Zak [Thu, 3 Dec 2009 14:49:15 +0000 (15:49 +0100)]
mount: add squashfs to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: add --no-canonicalize option
Karel Zak [Thu, 3 Dec 2009 14:30:53 +0000 (15:30 +0100)]
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>
14 years agomount: move info about devices to the top of mount.8
Karel Zak [Wed, 2 Dec 2009 12:35:18 +0000 (13:35 +0100)]
mount: move info about devices to the top of mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: add a note about /dev/disk/by-* to mount.8
Karel Zak [Wed, 2 Dec 2009 12:30:03 +0000 (13:30 +0100)]
mount: add a note about /dev/disk/by-* to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add UFS test image for libblkid
Karel Zak [Wed, 2 Dec 2009 11:24:23 +0000 (12:24 +0100)]
tests: add UFS test image for libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add VIA RAID test image for libblkid
Karel Zak [Wed, 2 Dec 2009 11:03:18 +0000 (12:03 +0100)]
tests: add VIA RAID test image for libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agohexdump: bug in hexdump when offset == file length
Américo Wang [Thu, 26 Nov 2009 14:19:37 +0000 (22:19 +0800)]
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>
14 years agofsck: document fsck behavior wrt nofail option and fstype 'auto'
Ludwig Nussel [Fri, 27 Nov 2009 10:51:42 +0000 (11:51 +0100)]
fsck: document fsck behavior wrt nofail option and fstype 'auto'

14 years agomount: add ubifs to the mount.8 man page
Sebastian Andrzej Siewior [Sun, 29 Nov 2009 19:16:03 +0000 (20:16 +0100)]
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>
14 years agofsck: honor nofail option in fsck
Ludwig Nussel [Fri, 27 Nov 2009 09:15:53 +0000 (10:15 +0100)]
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>
14 years agomount: better --move description
Karel Zak [Tue, 1 Dec 2009 09:33:33 +0000 (10:33 +0100)]
mount: better --move description

Reported-by: Paul Johnson <pauljohn@ku.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix UFS detection
Karel Zak [Thu, 26 Nov 2009 22:59:47 +0000 (23:59 +0100)]
libblkid: fix UFS detection

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotailf: fix printf format
Mike Frysinger [Sat, 21 Nov 2009 02:41:14 +0000 (21:41 -0500)]
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>
14 years agobuild-sys: release++ (v2.17-rc1)
Karel Zak [Fri, 20 Nov 2009 15:54:22 +0000 (16:54 +0100)]
build-sys: release++ (v2.17-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: add v2.17 ReleaseNotes
Karel Zak [Fri, 20 Nov 2009 15:49:03 +0000 (16:49 +0100)]
docs: add v2.17 ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agodocs: update AUTHORS file
Karel Zak [Fri, 20 Nov 2009 14:53:03 +0000 (15:53 +0100)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: merge changes
Karel Zak [Fri, 20 Nov 2009 14:51:26 +0000 (15:51 +0100)]
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agobuild-sys: fix blkid CFLAGS in fdisk/Makefile.am
Karel Zak [Fri, 20 Nov 2009 14:51:15 +0000 (15:51 +0100)]
build-sys: fix blkid CFLAGS in fdisk/Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoswitch_root: add note about subroots to switch_root.8
Karel Zak [Fri, 20 Nov 2009 14:18:51 +0000 (15:18 +0100)]
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>
14 years agoRevert "switch_root: add subroot support"
Karel Zak [Fri, 20 Nov 2009 14:11:59 +0000 (15:11 +0100)]
Revert "switch_root: add subroot support"

This reverts commit a692a8745941a192528c5e2a05de97155ba586f9.

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

14 years agolast: fix utmp.ut_time usage
Karel Zak [Fri, 20 Nov 2009 13:46:32 +0000 (14:46 +0100)]
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>
14 years agoline: remove deprecated #ident directive
Karel Zak [Fri, 20 Nov 2009 13:19:03 +0000 (14:19 +0100)]
line: remove deprecated #ident directive

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Fri, 20 Nov 2009 12:48:26 +0000 (13:48 +0100)]
po: update pl.po (from translationproject.org)

14 years agomount: check for unsuccessful read-only bind mounts
Karel Zak [Thu, 19 Nov 2009 14:56:12 +0000 (15:56 +0100)]
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>
15 years agoionice: add a note about none class and CFQ
Karel Zak [Wed, 18 Nov 2009 16:13:35 +0000 (17:13 +0100)]
ionice: add a note about none class and CFQ

Reported-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: add a note about bind-dir remounts
Karel Zak [Wed, 18 Nov 2009 15:11:01 +0000 (16:11 +0100)]
mount: add a note about bind-dir remounts

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: offer aligned first sector
Karel Zak [Wed, 4 Nov 2009 14:14:04 +0000 (15:14 +0100)]
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>
15 years agofdisk: align end of partition when defined by +size{K,M,G}
Karel Zak [Wed, 4 Nov 2009 13:30:31 +0000 (14:30 +0100)]
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>
15 years agofdisk: check for partition boundary
Karel Zak [Tue, 3 Nov 2009 11:09:36 +0000 (12:09 +0100)]
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>
15 years agofdisk: print info and recommendations about alignment
Karel Zak [Tue, 3 Nov 2009 11:00:23 +0000 (12:00 +0100)]
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>
15 years agofdisk: use minimal_io_size for the first partition
Karel Zak [Tue, 3 Nov 2009 10:28:55 +0000 (11:28 +0100)]
fdisk: use minimal_io_size for the first partition

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: add basic routines for LBA alignment
Karel Zak [Wed, 4 Nov 2009 15:15:48 +0000 (16:15 +0100)]
fdisk: add basic routines for LBA alignment

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: read topology info from libblkid
Karel Zak [Thu, 29 Oct 2009 10:25:59 +0000 (11:25 +0100)]
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>
15 years agomore: limited line buffer length results in corrupted UTF-8 text
Karel Zak [Mon, 16 Nov 2009 14:52:45 +0000 (15:52 +0100)]
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>
15 years agotests: add NTFS blkid test
Karel Zak [Mon, 16 Nov 2009 13:36:29 +0000 (14:36 +0100)]
tests: add NTFS blkid test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix NTFS non-ASCII labels
Karel Zak [Thu, 12 Nov 2009 23:10:48 +0000 (00:10 +0100)]
libblkid: fix NTFS non-ASCII labels

Addresses-Red-Hat-Bug: #536797
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblkid: add ID_FS_AMBIVALENT for udev output
Karel Zak [Wed, 11 Nov 2009 16:21:36 +0000 (17:21 +0100)]
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>
15 years agolibblkid: remove duplicate debug message
Karel Zak [Wed, 11 Nov 2009 14:34:54 +0000 (15:34 +0100)]
libblkid: remove duplicate debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: properly reset position in probing chains
Karel Zak [Wed, 11 Nov 2009 14:26:49 +0000 (15:26 +0100)]
libblkid: properly reset position in probing chains

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 10 Nov 2009 21:08:25 +0000 (22:08 +0100)]
po: update pl.po (from translationproject.org)

15 years agolibblkid: don't return empty LABELs
Karel Zak [Tue, 10 Nov 2009 13:00:13 +0000 (14:00 +0100)]
libblkid: don't return empty LABELs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoRevert "libblkid: fix buffer usage in FAT prober"
Karel Zak [Tue, 10 Nov 2009 11:48:34 +0000 (12:48 +0100)]
Revert "libblkid: fix buffer usage in FAT prober"

This patch is unnecessary, the library uses two buffers and the VFAT
superblock is always stored in the probe->sbbuf buffer which is never
overwritten. It seems that FAT fsinfo is also in the superblock
buffer. I was too paranoid :-) Sorry.

This reverts commit 041a4ff1db7c3004644211377ac828e8a536da02.

15 years agobuild-sys: cleanup AM_CFLAGS usage
Karel Zak [Mon, 9 Nov 2009 15:45:50 +0000 (16:45 +0100)]
build-sys: cleanup AM_CFLAGS usage

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: update list of pseudo filesystems
Karel Zak [Mon, 9 Nov 2009 14:46:54 +0000 (15:46 +0100)]
mount: update list of pseudo filesystems

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agodocs: update TODO
Karel Zak [Fri, 6 Nov 2009 23:20:55 +0000 (00:20 +0100)]
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: remove gtkdocize from autogen.sh
Karel Zak [Fri, 6 Nov 2009 23:06:53 +0000 (00:06 +0100)]
build-sys: remove gtkdocize from autogen.sh

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoRevert "build-sys: check for gtk-doc by default"
Karel Zak [Fri, 6 Nov 2009 22:59:54 +0000 (23:59 +0100)]
Revert "build-sys: check for gtk-doc by default"

The gtt-doc.make is not required for "make dist" now. So
gtk-doc is completely optional now.

Let's keep gtk-doc disabled by default.

This reverts commit 57facddbc561f86f26cb70e9c5a4391bcf42ff11.

15 years agobuild-sys: clean up gtk-doc stuff
Karel Zak [Fri, 6 Nov 2009 22:43:46 +0000 (23:43 +0100)]
build-sys: clean up gtk-doc stuff

* gtk-doc.make does not care about difference between $srcdir and $builddir
  and many things are generated into $srcdir. It's pretty difficult to support
  out-of-source build...

* gtk-doc expects that many generated files are stored in repository
  (we don't use XML templates, all documentation in source code only).

* we don't want to distribute generated html files, the docs is
  attractive for very small group of people...

Frankly, it would be nice to found something more robust and better
than gtk-doc.

Signed-off-by: Karel Zak <kzak@redhat.com>