util-linux-ng/util-linux-ng-2.14-fdisk-4k-III.patch
kzak 24912fbd9d - fix #489672 - flock segfaults when file name is not given (upstream)
- fix #476964 - Mount /var/tmp with tmpfs creates denials
- fix #487227 - fdisk 4KiB hw sectors support (upstream)
- fix #477303 - renice doesn't support -n option (upstream)
2009-03-19 10:11:58 +00:00

44 lines
1.4 KiB
Diff

From 8905beda2abb59b48ba00c5d521c934ead4df80b Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 9 Mar 2009 09:52:08 +0100
Subject: [PATCH] fdisk: support "-b 4096" option
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>
---
fdisk/fdisk.8 | 2 +-
fdisk/fdisk.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fdisk/fdisk.8 b/fdisk/fdisk.8
index aea8820..30ee9d4 100644
--- a/fdisk/fdisk.8
+++ b/fdisk/fdisk.8
@@ -166,7 +166,7 @@ program and Linux partitions with the Linux fdisk or Linux cfdisk program.
.SH OPTIONS
.TP
.BI "\-b " sectorsize
-Specify the sector size of the disk. Valid values are 512, 1024, or 2048.
+Specify the sector size of the disk. Valid values are 512, 1024, 2048 or 4096.
(Recent kernels know the sector size. Use this only on old kernels or
to override the kernel's ideas.)
.TP
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index b7e517a..5593503 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2612,7 +2612,7 @@ main(int argc, char **argv) {
*/
sector_size = atoi(optarg);
if (sector_size != 512 && sector_size != 1024 &&
- sector_size != 2048)
+ sector_size != 2048 && sector_size != 4096)
fatal(usage);
sector_offset = 2;
user_set_sector_size = 1;
--
1.6.0.6