summaryrefslogtreecommitdiff
path: root/sbin/fdisk/mbr.h
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-10-21 22:49:37 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-10-21 22:49:37 +0000
commite3ff5dce520d9c30a0911b45bc5608b8f022ef0c (patch)
tree90ea0884dbff111867c56d2738ab0e311cf3c5c3 /sbin/fdisk/mbr.h
parent64b85db7003ca4383c9eca901082c2eb5574604d (diff)
make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because: the starting sector of the first mbr entry in an extended partition is relative to the starting offset of the whole mbr itself. the starting offset of a new extended partition is relative to the offset of the very first extended partition.
Diffstat (limited to 'sbin/fdisk/mbr.h')
-rw-r--r--sbin/fdisk/mbr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/fdisk/mbr.h b/sbin/fdisk/mbr.h
index 0e138da9750..5a8efae6794 100644
--- a/sbin/fdisk/mbr.h
+++ b/sbin/fdisk/mbr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbr.h,v 1.2 1997/09/29 23:33:36 mickey Exp $ */
+/* $OpenBSD: mbr.h,v 1.3 1997/10/21 22:49:34 provos Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -46,6 +46,8 @@
/* MBR type */
typedef struct _mbr_t {
+ off_t reloffset;
+ off_t offset;
unsigned char code[MBR_CODE_SIZE];
unsigned long nt_serial;
unsigned short spare;
@@ -56,7 +58,7 @@ typedef struct _mbr_t {
/* Prototypes */
void MBR_print_disk __P((char *));
void MBR_print __P((mbr_t *));
-void MBR_parse __P((char *, mbr_t *));
+void MBR_parse __P((char *, off_t, off_t, mbr_t *));
void MBR_make __P((mbr_t *, char *));
int MBR_read __P((int, off_t, char *));
int MBR_write __P((int, off_t, char *));