From: krw Date: Sun, 25 Oct 2015 16:35:40 +0000 (+0000) Subject: Nuke union of d_packname with un_d_boot0 & un_d_boot1, keeping X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b103820286a27873da3907527a9c24d112f0849d;p=openbsd Nuke union of d_packname with un_d_boot0 & un_d_boot1, keeping d_packname as a simple field. Also nuke the access #defines, and support for b0 and b1 capabilities in disktab. ok deraadt@ miod@ --- diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c index 117fce6cb63..cacde610389 100644 --- a/lib/libc/gen/disklabel.c +++ b/lib/libc/gen/disklabel.c @@ -70,11 +70,6 @@ getdiskbyname(const char *name) (*cq = *cp) && *cq != '|' && *cq != ':') cq++, cp++; *cq = '\0'; - /* - * boot name (optional) xxboot, bootxx - */ - cgetstr(buf, "b0", &dp->d_boot0); - cgetstr(buf, "b1", &dp->d_boot1); if (cgetcap(buf, "sf", ':') != NULL) dp->d_flags |= D_BADSECT; diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 8ad21a3fb1c..145331138b8 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.72 2015/09/24 19:28:33 krw Exp $ */ +/* $OpenBSD: disklabel.h,v 1.73 2015/10/25 16:35:40 krw Exp $ */ /* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */ /* @@ -82,25 +82,7 @@ struct disklabel { u_int16_t d_type; /* drive type */ u_int16_t d_subtype; /* controller/d_type specific */ char d_typename[16]; /* type name, e.g. "eagle" */ - - /* - * d_packname contains the pack identifier and is returned when - * the disklabel is read off the disk or in-core copy. - * d_boot0 and d_boot1 are the (optional) names of the - * primary (block 0) and secondary (block 1-15) bootstraps - * as found in /usr/mdec. These are returned when using - * getdiskbyname(3) to retrieve the values from /etc/disktab. - */ - union { - char un_d_packname[16]; /* pack identifier */ - struct { - char *un_d_boot0; /* primary bootstrap name */ - char *un_d_boot1; /* secondary bootstrap name */ - } un_b; - } d_un; -#define d_packname d_un.un_d_packname -#define d_boot0 d_un.un_b.un_d_boot0 -#define d_boot1 d_un.un_b.un_d_boot1 + char d_packname[16]; /* pack identifier */ /* disk geometry: */ u_int32_t d_secsize; /* # of bytes per sector */