summaryrefslogtreecommitdiff
path: root/sbin/pdisk
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pdisk')
-rw-r--r--sbin/pdisk/convert.c4
-rw-r--r--sbin/pdisk/dpme.h23
2 files changed, 13 insertions, 14 deletions
diff --git a/sbin/pdisk/convert.c b/sbin/pdisk/convert.c
index 3f9f19b7c2e..4881c97399d 100644
--- a/sbin/pdisk/convert.c
+++ b/sbin/pdisk/convert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: convert.c,v 1.13 2016/01/17 18:23:30 krw Exp $ */
+/* $OpenBSD: convert.c,v 1.14 2016/01/17 18:26:51 krw Exp $ */
//
// convert.c - Little-endian conversion
@@ -96,7 +96,7 @@ convert_block0(struct block0 *data, int to_cpu_form)
{
#if BYTE_ORDER == LITTLE_ENDIAN
struct ddmap *m;
- u16 count;
+ uint16_t count;
int i;
// Since this data is optional we do not want to convert willy-nilly.
diff --git a/sbin/pdisk/dpme.h b/sbin/pdisk/dpme.h
index f62e0cfdf6a..9ae049dc54b 100644
--- a/sbin/pdisk/dpme.h
+++ b/sbin/pdisk/dpme.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpme.h,v 1.11 2016/01/17 18:23:30 krw Exp $ */
+/* $OpenBSD: dpme.h,v 1.12 2016/01/17 18:26:51 krw Exp $ */
//
// dpme.h - Disk Partition Map Entry (dpme)
@@ -53,35 +53,34 @@
//
// Types
//
-typedef unsigned short u16;
typedef unsigned long u32;
// Physical block zero of the disk has this format
struct block0 {
- u16 sbSig; /* unique value for SCSI block 0 */
- u16 sbBlkSize; /* block size of device */
+ uint16_t sbSig; /* unique value for SCSI block 0 */
+ uint16_t sbBlkSize; /* block size of device */
u32 sbBlkCount; /* number of blocks on device */
- u16 sbDevType; /* device type */
- u16 sbDevId; /* device id */
+ uint16_t sbDevType; /* device type */
+ uint16_t sbDevId; /* device id */
u32 sbData; /* not used */
- u16 sbDrvrCount; /* driver descriptor count */
- u16 sbMap[247]; /* descriptor map */
+ uint16_t sbDrvrCount; /* driver descriptor count */
+ uint16_t sbMap[247]; /* descriptor map */
};
// Where &sbMap[0] is actually an array struct ddmap[sbDrvrCount]
// kludge to get around alignment junk
struct ddmap {
u32 ddBlock; /* 1st driver's starting block (in sbBlkSize blocks!) */
- u16 ddSize; /* size of 1st driver (512-byte blks) */
- u16 ddType; /* system type (1 for Mac+) */
+ uint16_t ddSize; /* size of 1st driver (512-byte blks) */
+ uint16_t ddType; /* system type (1 for Mac+) */
};
// Each partition map entry (blocks 1 through n) has this format
struct dpme {
- u16 dpme_signature ;
- u16 dpme_reserved_1 ;
+ uint16_t dpme_signature ;
+ uint16_t dpme_reserved_1 ;
u32 dpme_map_entries ;
u32 dpme_pblock_start ;
u32 dpme_pblocks ;