-l, -c/-h/-s or DIOCGPDINFO) should be enough for anyone.
-/* $OpenBSD: cmd.c,v 1.146 2021/09/10 15:26:36 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.147 2021/10/21 13:16:49 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
return CMD_DIRTY;
}
-int
-Xdisk(char *args, struct mbr *mbr)
-{
- int maxcyl = 1024;
- int maxhead = 256;
- int maxsec = 63;
-
- DISK_printgeometry(args);
-
-#if defined (__powerpc__) || defined (__mips__)
- maxcyl = 9999999;
- maxhead = 9999999;
- maxsec = 9999999;
-#endif
-
- if (ask_yn("Change disk geometry?")) {
- disk.dk_cylinders = ask_num("BIOS Cylinders",
- disk.dk_cylinders, 1, maxcyl);
- disk.dk_heads = ask_num("BIOS Heads",
- disk.dk_heads, 1, maxhead);
- disk.dk_sectors = ask_num("BIOS Sectors",
- disk.dk_sectors, 1, maxsec);
-
- disk.dk_size = disk.dk_cylinders * disk.dk_heads * disk.dk_sectors;
- }
-
- return CMD_CONT;
-}
-
int
Xswap(char *args, struct mbr *mbr)
{
-.\" $OpenBSD: fdisk.8,v 1.106 2021/09/13 11:44:40 krw Exp $
+.\" $OpenBSD: fdisk.8,v 1.107 2021/10/21 13:16:49 krw Exp $
.\"
.\"
.\" Copyright (c) 1997 Tobias Weingartner
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 13 2021 $
+.Dd $Mdocdate: October 21 2021 $
.Dt FDISK 8
.Os
.Sh NAME
If
.Cm gpt
is specified a protective MBR and a GPT are initialized.
-.It Cm disk Op Ar unit
-Display the current drive geometry that
-.Nm
-probed using kernel provided information and various heuristics.
-A
-.Ar unit
-.Sq b ,
-.Sq k ,
-.Sq m ,
-.Sq g ,
-or
-.Sq t
-may be appended to request that the size of
-.Ar disk
-be shown as bytes, kilobytes, megabytes, gigabytes,
-or terabytes instead of sectors.
-The disk geometry may be changed at this point.
-Not available when editing a GPT.
.It Cm edit Ar #
Edit a given table entry in the memory copy of
the current boot block.
-/* $OpenBSD: user.c,v 1.78 2021/09/10 15:26:36 krw Exp $ */
+/* $OpenBSD: user.c,v 1.79 2021/10/21 13:16:49 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
{"manual", 1, Xmanual, "Show entire OpenBSD man page for fdisk"},
{"reinit", 1, Xreinit, "Re-initialize loaded MBR (to defaults)"},
{"setpid", 1, Xsetpid, "Set the identifier of a given table entry"},
- {"disk", 0, Xdisk, "Edit current drive stats"},
{"edit", 1, Xedit, "Edit given table entry"},
{"flag", 1, Xflag, "Flag given table entry as bootable"},
{"update", 0, Xupdate, "Update machine code in loaded MBR"},