Date: Wed, 1 May 2019 05:42:13 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346984 - head/stand/common Message-ID: <201905010542.x415gDJx065801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed May 1 05:42:13 2019 New Revision: 346984 URL: https://svnweb.freebsd.org/changeset/base/346984 Log: Use D_PARTISGPT rather than bare 255 These three cases dovetail with other places in the code where we use or set D_PARTISGPT when we mean that the partitioning scheme is GPT. Use this #define to make the code easier to undertand. Reviewed by: tsoome@ Differential Revision: https://reviews.freebsd.org/D20122 Modified: head/stand/common/disk.c Modified: head/stand/common/disk.c ============================================================================== --- head/stand/common/disk.c Wed May 1 01:53:19 2019 (r346983) +++ head/stand/common/disk.c Wed May 1 05:42:13 2019 (r346984) @@ -286,9 +286,9 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize od->entrysize = part.end - part.start + 1; slice = part.index; if (ptable_gettype(od->table) == PTABLE_GPT) { - partition = 255; + partition = D_PARTISGPT; goto out; /* Nothing more to do */ - } else if (partition == 255) { + } else if (partition == D_PARTISGPT) { /* * When we try to open GPT partition, but partition * table isn't GPT, reset d_partition value to -1 @@ -419,7 +419,7 @@ disk_parsedev(struct disk_devdesc *dev, const char *de /* we don't support nested partitions on GPT */ if (*cp != '\0' && *cp != ':') return (EINVAL); - partition = 255; + partition = D_PARTISGPT; } else #endif #ifdef LOADER_MBR_SUPPORT
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905010542.x415gDJx065801>