summaryrefslogtreecommitdiff
path: root/sbin/fdisk
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2004-06-22 23:01:56 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2004-06-22 23:01:56 +0000
commite61cfa8f07f05f24b0af51e5a13176809b7250ae (patch)
tree5c42a32afe18816e26c89bde3b9bde69bd891e5a /sbin/fdisk
parentac41f72cfb5fcff54aefd94138a2ac29e19d060b (diff)
Make the interactive "update" command match the command-line "-u"
option by updatng/setting the 0xAA55 signature at the end of the sector. ok nick@ weingart@
Diffstat (limited to 'sbin/fdisk')
-rw-r--r--sbin/fdisk/cmd.c3
-rw-r--r--sbin/fdisk/fdisk.86
2 files changed, 5 insertions, 4 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index db55b7e1a8e..3e217e09cc2 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.33 2003/06/11 06:22:12 deraadt Exp $ */
+/* $OpenBSD: cmd.c,v 1.34 2004/06/22 23:01:55 tom Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -325,6 +325,7 @@ Xupdate(cmd_t *cmd, disk_t *disk, mbr_t *mbr, mbr_t *tt, int offset)
/* Update code */
memcpy(mbr->code, tt->code, MBR_CODE_SIZE);
+ mbr->signature = DOSMBR_SIGNATURE;
printf("Machine code updated.\n");
return (CMD_DIRTY);
}
diff --git a/sbin/fdisk/fdisk.8 b/sbin/fdisk/fdisk.8
index a0a0ae90466..1d923897148 100644
--- a/sbin/fdisk/fdisk.8
+++ b/sbin/fdisk/fdisk.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fdisk.8,v 1.41 2003/06/03 13:16:08 jmc Exp $
+.\" $OpenBSD: fdisk.8,v 1.42 2004/06/22 23:01:55 tom Exp $
.\"
.\" Copyright (c) 1997 Tobias Weingartner
.\" All rights reserved.
@@ -229,8 +229,8 @@ If you wish to boot from an extended
partition, you will need to mark the partition table entry for the
extended partition as bootable.
.It Em update
-Update the machine code in the memory copy of the currently selected
-boot block.
+Update the machine code and 0xAA55 signature in the memory copy
+of the currently selected boot block.
Note that this option will overwrite the NT disk
signature, if present.
.It Em select