summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* blkid: encode PART_ENTRY_TYPEKarel Zak2010-02-182-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add PART_ENTRY_{SCHEME,NUMBER}Karel Zak2010-02-182-1/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add support for partition flags/attributesKarel Zak2010-02-1810-1/+42
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add blkid_partition_set_type()Karel Zak2010-02-1811-24/+60
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: make sure writes make it to disk in write_partitions()Bryn M. Reeves2010-02-181-0/+5
| | | | | | Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=565946 Signed-off-by: Bryn M. Reeves <bmr@errorists.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: export ID_PART_ENTRY_* variables for udevKarel Zak2010-02-181-5/+43
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add support for PART_ENTRY_* valuesKarel Zak2010-02-183-7/+131
| | | | | | | | | | | | blkid(8) will be replacement for devkit-disks-part-id, so we have to be able to found entry in partition table for requested partition. This functionality is enabled by BLKID_PARTS_ENTRY_DETAILS flag (see blkid_probe_set_partitions_flags() for more details). This patch also add a new public function blkid_partlist_devno_to_partition(). Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: don't probe for nested PT on tiny disks (<=1.44MiB)Karel Zak2010-02-181-14/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add generic functions for sysfs attributesKarel Zak2010-02-183-33/+55
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix ZSF detectionAndreas Dilger2010-02-172-9/+19
| | | | | | | | | | | | | | | Fix the ZFS device detection by looking at multiple uberblocks to see if any are present, rather than looking for the ZFS boot block which is not always present. There may be up to 128 uberblocks, but the first 4 are not written to disk on a newly-formatted filesystem so check several of them at different offsets within the uberblock array. [kzak@redhat.com: - port e2fsprogs patch to util-linux-ng] Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: fix swapsize calculationKarel Zak2010-02-161-1/+1
| | | | | Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: report open() errors in low-level probingKarel Zak2010-02-161-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: don't use 1MiB grain on small devicesKarel Zak2010-02-151-3/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk testsKarel Zak2010-02-154-65/+65
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use 1MiB offset and grain always when possibleKarel Zak2010-02-151-5/+14
| | | | | | | | | | It would be nice to minimize dependence between the disk layout and disk topology. We have to follow disk topology for alignment_offset and huge (> 1MiB) I/O sizes only. For all others disks we can use 1MiB grain and 1MiB offset. Reported-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add -c option (switch off DOS mode)Karel Zak2010-02-152-3/+15
| | | | | | | | * add -c to allows to switch off DOS mode from command line * recommend sectors (command 'u' or option -u) Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix ALIGN_UPKarel Zak2010-02-151-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fallback for topology valuesKarel Zak2010-02-151-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: cleanup help, add -h optionKarel Zak2010-02-153-34/+28Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update fdisk testsKarel Zak2010-02-121-13/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use more elegant way to count and check alignmentKarel Zak2010-02-121-33/+34
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add min/max macrosKarel Zak2010-02-121-0/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: advise users to use "modprobe", not "insmod"Karel Zak2010-02-121-1/+1
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=562394 Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: set '[New]' as default item on menu for non allocated space instead ↵Francesco Cosoleto2010-02-121-1/+1
| | | | | | of '[Help]'. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* build-sys: add missing tests for libuuid and libblkidKarel Zak2010-02-122-1/+18
| | | | | | | | | | | | | | $ make checkconfig misc-utils/blkid.c : HAVE_TERMIO_H misc-utils/blkid.c : HAVE_TERMIOS_H shlibs/blkid/src/getsize.c : HAVE_FSTAT64 shlibs/blkid/src/llseek.c : HAVE_LLSEEK_PROTOTYPE shlibs/blkid/src/llseek.c : HAVE_LSEEK64_PROTOTYPE shlibs/uuid/src/gen_uuid.c : HAVE_SA_LEN*/ shlibs/uuid/src/gen_uuid.c : HAVE_SYS_SOCKET_H shlibs/uuid/src/gen_uuid.c : HAVE_SYS_SYSCALL_H Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: fix #ifdef HAVE_TERMIO[S]_HKarel Zak2010-02-121-5/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove duplicate #includesKarel Zak2010-02-125-5/+0Star
| | | | | | | | | | | $ make checkincludes fsck/fsck.c: errno.h is included more than once. lib/canonicalize.c: string.h is included more than once. shlibs/blkid/src/blkidP.h: stdio.h is included more than once. shlibs/blkid/src/devname.c: string.h is included more than once. shlibs/blkid/src/devno.c: string.h is included more than once. Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update TODO fileKarel Zak2010-02-111-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: fix first day of the week calculation on BE systemsKarel Zak2010-02-111-1/+5
| | | | | | | | | | | | | | | | | | This reverts commit dcb54fafb128ab41772ae217afc6a7612e2cc446, "cal: remove gcc-ism from nl_langinfo() call". The code: int wfd = (int)(intptr_t) nl_langinfo(_NL_TIME_WEEK_1STDAY); does not work on big-endian machines. The original solution based on union is better. Note that the "type punning" is not gcc-ism any more, it's allowed by C99 (6.5.2.3). Reported-by: Joseph Jezak <josejx@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: set '[Quit]' as default menu item on first run instead of '[Bootable]'.Francesco Cosoleto2010-02-111-1/+3
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* mount: warn users that mtab is read-onlyKarel Zak2010-02-113-1/+11
| | | | | | | | In repair mode the root filesystem is read-only and mtab file is not up to date. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=427183 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix and update old fdisk testsKarel Zak2010-02-094-21/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add fdisk alignment testsKarel Zak2010-02-0912-1/+923
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: cleanup warningsKarel Zak2010-02-091-37/+23Star
| | | | | | | | | | | | | | | | | | | | | | | * don't print: The number of cylinders for this disk is set to 12161. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) we really don't care about MS-DOS or extremely old LILO. * inform users that DOS-compatible mode is bad and deprecated thing (It's difficult to use 2048 sectors grain or 4KiB sectors or alignment_offset in DOS mode where all is based on cylinders...) * don't check for cylinders boundary in non-DOS mode * inform about sector and I/O sizes Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix default first sectorKarel Zak2010-02-091-5/+4Star
| | | | | | | | The previous release 2.17 introduces aligned defaults for the first and last sectors on the partition. Unfortunately, there is endless loop when the code looks for first unused aligned sector. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: cleanup alignment, default to 1MiB offsetKarel Zak2010-02-091-21/+66
| | | | | | | | | | | | | | | | | | | | * add heuristic to detect that the device does not provide topology information. We can use topology if: - alignment_offset is not 0 - or optimal_io_size is not 0 - or minimal_io_size is not power of 2 * default to 1MiB offset for the start of the first partition if topology is unknown. This (2048 512-byte sectors) is Windows Vista default. * use optimal_io_size, minimal_io_size or 1MiB as a grain for partitions alignment Note that this all is used when DOS-compatible mode is disabled. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix check_alignment()Karel Zak2010-02-091-5/+5
| | | | | | | The old version of check_alignment() does not work with extended partitions. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: don't check alignment_offset against geometryKarel Zak2010-02-091-12/+3Star
| | | | | | | | | | The alignment_offset is compensation for DOS compatible partitioning. It usually matches with disk geometry (e.g. 63 sectors), but the offset is also exported from phy.disks to RAIDs there the geometry don't match with the offset. So.. don't print unnecessary warning. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: don't return error on empty filesKarel Zak2010-02-043-5/+10
| | | | | | | | | | | | | | Currently, the library does not allow to initialize blkid_probe if the file (or block device) is empty. The empty file is reported as an error. That's wrong. The empty file should be interpreted as a file without any FS or PT. It means that blkid_do_{probe,safeprobe,fullprobe}() have to return 1 ("nothing"). Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update TODO fileKarel Zak2010-02-041-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: ignore devices with partition tableKarel Zak2010-02-041-1/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: add --reset-on-forkKarel Zak2010-02-022-2/+30
| | | | | | | | | | | | | | | This new option allows to set SCHED_RESET_ON_FORK flag for FIFO and RR policies. Example: $ chrt --fifo --reset-on-fork 1 /bin/bash $ schedutils/chrt --pid $$ pid 31579's current scheduling policy: SCHED_FIFO|SCHED_RESET_ON_FORK pid 31579's current scheduling priority: 1 Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: add support for SCHED_RESET_ON_FORKAdrian Knoth2010-02-021-0/+11
| | | | | | | | | | | | | | | | From 9262c9832134f8a33ac2ea2854dc6d20acc712d1 Mon Sep 17 00:00:00 2001 From: Adrian Knoth <adi@drcomp.erfurt.thur.de> Date: Tue, 2 Feb 2010 16:57:23 +0100 Subject: [PATCH] Add support for SCHED_RESET_ON_FORK to chrt SCHED_RESET_ON_FORK has been added in 2.6.31. If a thread has this flag set, chrt reports "unknown" policy, which is confusing. The patch adds support for this new flag. It will (can) only be applied to SCHED_FIFO or SCHED_RR, so there's no need to catch the other scheduling policies. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
* libblkid: minor fixes in befs.cKarel Zak2010-02-021-8/+16
| | | | | | | | | The library does not reset the probing result (e.g. LABEL, VERSION) when the probing function failed (return value != 0). We have to be absolutely sure that the FS has been properly detected before we set LABEL or VERSION or so. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add BeFS test imageKarel Zak2010-02-022-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: Add probing function for BeFSJeroen Oortwijn2010-02-021-1/+182
| | | | | | | | | | | | Add probing function for the Be File System to libblkid. It sets LABEL, VERSION and UUID. But UUID is only set if the be:volume_id attribute is found in the small_data area of the i-node of the root directory. [kzak@redhat.com: - add .minsz = 1024*1440 to avoid BeFS probing on very small devices] Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: Add initial support for BeFS detectionJeroen Oortwijn2010-02-024-2/+23
| | | | | | | Add initial support for detection of the Be File System <http://en.wikipedia.org/wiki/Be_File_System> to libblkid. Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
* fsck/mkfs/mount: unify default search paths for helpersMike Frysinger2010-02-024-69/+112
| | | | | | | | | | | | Rather than each fs util having its own search policy, unify the paths in configure and allow them to be tweaked by downstream. In the process, drop the /etc paths as no one has ever really used these. [kzak@redhat.com: - backport to autoconf < 2.64 (remove AS_{SET,IF,CASE,APPEND} macros)] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add blkid_probe_all_removable()Karel Zak2010-02-016-8/+116
| | | | | | | | | | | | | | The libblkid probing is based on devices from /proc/partitions by default. This file usually does not contain removable devices (e.g. CDROMs) and this kind of devices are invisible for libblkid. The blkid_probe_all_removable() function adds removable block devices to blkid cache. The probing is based on information from the /sys directory. The devices which were detected by this function won't be written to blkid.tab cache file. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=533874 Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add blkid_openat(), cleanup blkid_fstatat()Karel Zak2010-02-012-4/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>