diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2004-06-22 23:01:56 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2004-06-22 23:01:56 +0000 |
commit | e61cfa8f07f05f24b0af51e5a13176809b7250ae (patch) | |
tree | 5c42a32afe18816e26c89bde3b9bde69bd891e5a /sbin/fdisk/cmd.c | |
parent | ac41f72cfb5fcff54aefd94138a2ac29e19d060b (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/cmd.c')
-rw-r--r-- | sbin/fdisk/cmd.c | 3 |
1 files changed, 2 insertions, 1 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); } |