Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fdisk Also ignore out of space conditions for -I so we ...
details: https://anonhg.NetBSD.org/src/rev/11450ade5d14
branches: trunk
changeset: 771750:11450ade5d14
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 02 15:21:15 2011 +0000
description:
Also ignore out of space conditions for -I so we can create overlapping
partitions on a full disk. Document and add it to the options.
diffstat:
sbin/fdisk/fdisk.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r b8c6763561eb -r 11450ade5d14 sbin/fdisk/fdisk.c
--- a/sbin/fdisk/fdisk.c Fri Dec 02 14:38:51 2011 +0000
+++ b/sbin/fdisk/fdisk.c Fri Dec 02 15:21:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdisk.c,v 1.137 2011/12/02 04:05:20 enami Exp $ */
+/* $NetBSD: fdisk.c,v 1.138 2011/12/02 15:21:15 christos Exp $ */
/*
* Mach Operating System
@@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fdisk.c,v 1.137 2011/12/02 04:05:20 enami Exp $");
+__RCSID("$NetBSD: fdisk.c,v 1.138 2011/12/02 15:21:15 christos Exp $");
#endif /* not lint */
#define MBRPTYPENAMES
@@ -155,7 +155,7 @@
#define BOOTSEL_OPTIONS
#define change_part(e, p, id, st, sz, bm) change__part(e, p, id, st, sz)
#endif
-#define OPTIONS BOOTSEL_OPTIONS "0123FSafiluvA:b:c:E:r:s:w:"
+#define OPTIONS BOOTSEL_OPTIONS "0123FSafiIluvA:b:c:E:r:s:w:"
/*
* Disk geometry and partition alignment.
@@ -615,6 +615,7 @@
"\t-a change active partition\n"
"\t-f force - not interactive\n"
"\t-i initialise MBR code\n"
+ "\t-I ignore errors about no space or overlapping partitions\n"
"\t-l list partition types\n"
"\t-u update partition data\n"
"\t-v verbose output, -v -v more verbose still\n"
@@ -2065,7 +2066,7 @@
p = -1;
}
}
- if (start >= disksectors) {
+ if (start >= disksectors && !I_flag) {
printf("No free space\n");
return 0;
}
Home |
Main Index |
Thread Index |
Old Index