From 6f012227d275893711279b51a984b96439466227 Mon Sep 17 00:00:00 2001 From: krw Date: Fri, 29 Jan 2016 22:51:43 +0000 Subject: Fold struct block0 into struct partition map. There can be only one and read/write_block0() can move the data from/to disk to/from appropriate fields anywhere. Removes a bunch of dereferencing, malloc'ing and pointer checking. --- sbin/pdisk/dpme.h | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'sbin/pdisk/dpme.h') diff --git a/sbin/pdisk/dpme.h b/sbin/pdisk/dpme.h index c314d0f84b6..e3cc84fd1e7 100644 --- a/sbin/pdisk/dpme.h +++ b/sbin/pdisk/dpme.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dpme.h,v 1.24 2016/01/28 13:01:33 krw Exp $ */ +/* $OpenBSD: dpme.h,v 1.25 2016/01/29 22:51:43 krw Exp $ */ /* * dpme.h - Disk Partition Map Entry (dpme) @@ -47,24 +47,6 @@ #define DPISTRLEN 32 -struct ddmap { - uint32_t ddBlock; /* 1st driver's starting sbBlkSize block */ - uint16_t ddSize; /* size of 1st driver (512-byte blks) */ - uint16_t ddType; /* system type (1 for Mac+) */ -}; - -struct block0 { - uint16_t sbSig; /* "ER" */ - uint16_t sbBlkSize; /* physical block size of device */ - uint32_t sbBlkCount; /* # of physical blocks on device */ - uint16_t sbDevType; /* device type */ - uint16_t sbDevId; /* device id */ - uint32_t sbData; /* not used */ - uint16_t sbDrvrCount; /* driver descriptor count */ - struct ddmap sbDDMap[8]; /* driver descriptor map*/ - uint8_t sbReserved[430]; -}; - /* * Each partition map entry (blocks 1 through n) has this format */ -- cgit v1.2.3-59-g8ed1b