| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses-Debian-Bug: #511161
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The fdisk code is more ready for 4kB sectors and it makes sense to
support such sectr size for "-b" option.
Address-Red-Hat-Bugzilla: #218915
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
This odd ioctl is unsupported in the current 2.4 and 2.6 mainline.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
4KiB-sector disk:
Note: sector size is 4096 (not 512)
Disk /dev/sdb: 8 MB, 8388608 bytes
8 heads, 32 sectors/track, 8 cylinders, total 2048 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Disk identifier: 0x6aad54da
Device Boot Start End Blocks Id System
/dev/sdb1 32 2047 8064 83 Linux
old version (mix 512 and real sectors):
Command (m for help): v
14367 unallocated sectors
new version:
Command (m for help): v
31 unallocated 4096-byte sectors
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
fdisk (at least with the -u option) does not handle sector sizes other
than 512.
Address-Red-Hat-Bugzilla: #487227
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Accept "yes" or "no" as fallback in case the question
has not been translated.
[kzak@redhat.com: note that rpmatch(3) looks at only the first
character of response, but we need have to
check the full yes/no string.]
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently these missing includes prevent that HDIO_GETGEO
is defined, so is_probably_full_disk always uses the
"silly heuristic" method.
[kzak@redhat.com: add also unistd.h]
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Currently fdisk does not support +cylinder notation and reports
"Unsupported suffix: ''".
Reported-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
fdisk(8) uses "unsigned long long" for all internal calculations --
let use it for start of partition too.
Address-Red-Hat-Bugzilla: #471369
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
This patch fixes a compilation error in the latest tree.
Signed-off-by: CAI Qian <caiqian@cclom.cn>
|
|
|
|
|
|
| |
Signed-off-by: Vincent Deffontaines <vincent@gryzor.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Exmaples (-old, +new):
- Disk /dev/mapper/bar: 266.6 GB, 266666666496 bytes
+ Disk /dev/mapper/bar: 266.7 GB, 266666666496 bytes
- WARNING: The size of this disk is 2.1 TB (2199023255552 bytes).
+ WARNING: The size of this disk is 2.2 TB (2199023255552 bytes).
Reported-by: Stepan Kasal <skasal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Denis ChengRq <crquan@gmail.com>
|
|
|
|
|
|
| |
partitiontype.c:57: warning: incompatible implicit declaration of built-in function ‘exit’
Signed-off-by: maximilian attems <max@stro.at>
|
|
|
|
|
|
|
|
|
|
| |
BLK* and HDIO_* are not available on all platform. Work around this
in a few places.
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The get_linux_version() function is Linux-specific.
Work around it in a few places.
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The fdisk programs do not recognize the partition types used by VMware
ESX. They show up as "unknown".
Addresses-Red-Hat-Bugzilla: #447023
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Detect ncursesw and use it in place of ncurses when possible
(default). Allow people to use classic (non-wide) version by
--with-ncurses or disable all ncurses/ncursesw support by
--without-ncurses.
Co-Author: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Add support for static versions of mount, umount, losetup, fdisk,
and sfdisk.
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Although GPT is defined in EFI spec, it is widely used without EFI, as it
reserves space for the MBR and works fine on PC/BIOS systems provided the
bootloader supports it.
This is in fact the way everyone seems to be following to overcome the 2 TiB
limitation with MSDOS partition table.
Signed-off-by: Robert Millan <rmh@aybabtu.com>
|
|
|
|
|
|
|
|
| |
When /dev/urandom is not available, we have to use some kind of a hack
to generate a random MBR identifier. Use a better fallback that
incorporates the clock down to microsecond granularity.
Signed-off-by: H. Peter Anvin" <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fdisk(8) does not calculate partition size (+sizeM or +sizeG)
in MiB or GiB correctly. It uses 10^N instead 2^N.
This patch cleanups +sizeX to:
+sizeK -- KiB (2^10)
+sizeKB -- KB (10^3)
+sizeM -- MiB (2^20)
+sizeMB -- MB (10^6)
+sizeG -- GB (10^9)
+sizeGB -- GiB (2^30)
This patch also fixes the "Last cylinder..." hint message. The "+number"
without any suffix is not a size at all. It's number of cylinders/sectors.
Note, the 10^N suffixes are not proposed to end-uses in the hint message.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Set DEFAULT_DEVICE and ALTERNATE_DEVICE for GNU/Hurd and FreeBSD
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The following simple patch fixes fdisk compilation for the AVR32 and CRIS architectures.
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
sfdisk would incorrectly complain that there was no room when partitioning
a drive over 2^31 sectors in size.
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
|
|
|
|
|
|
|
|
| |
- #include <linux/types.h> is turned into #include <stdint.h>, much more
portable, and __uxy were turned into uintxy_t.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The utils like fdisk or login are usable on non-linux systems.
This patch allows to compile on systems without linux/major.h.
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|