mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
This commit is contained in:
parent
eb1f7f43ca
commit
fa4b817970
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346984
|
@ -286,9 +286,9 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize, u_int sectorsize)
|
|||
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 *devspec, const char **path)
|
|||
/* 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
|
||||
|
|
Loading…
Reference in a new issue