diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-29 01:12:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-29 01:12:22 +0000 |
commit | 34fa754d3ed747cdda822208ebd5e45432353638 (patch) | |
tree | cb8d3f4102c66eef93780dc61ef159565de32dc7 /sys/arch/i386/include/disklabel.h | |
parent | 190b9bd93e9e482b76c39160dfc0cae2ff450568 (diff) |
ignore partitions larger than device, as an attempt to ignore floppies without MBR
Diffstat (limited to 'sys/arch/i386/include/disklabel.h')
-rw-r--r-- | sys/arch/i386/include/disklabel.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/i386/include/disklabel.h b/sys/arch/i386/include/disklabel.h index baaac17bf17..fe2a53c5118 100644 --- a/sys/arch/i386/include/disklabel.h +++ b/sys/arch/i386/include/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.14 1997/08/29 19:44:10 mickey Exp $ */ +/* $OpenBSD: disklabel.h,v 1.15 1997/09/29 01:12:19 deraadt Exp $ */ /* $NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp $ */ /* @@ -93,4 +93,19 @@ struct cpu_disklabel { #define DPSECT(s) ((s) & 0x3f) #define DPCYL(c, s) ((c) + (((s) & 0xc0) << 2)) +static __inline u_int32_t get_le __P((void *)); + +static __inline u_int32_t +get_le(p) + void *p; +{ + u_int8_t *_p = (u_int8_t *)p; + u_int32_t x; + x = _p[0]; + x |= _p[1] << 8; + x |= _p[2] << 16; + x |= _p[3] << 24; + return x; +} + #endif /* _MACHINE_DISKLABEL_H_ */ |