mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
geom: Allow BSD type '!0' partitions
Allow the creation of '!0' partition types. Fix it by not considering "0" an invalid partition type. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47652 (cherry picked from commit accf71534c612b76ee2701f2dfcaa464748e527a)
This commit is contained in:
parent
859e098fd1
commit
a7d56527c2
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ bsd_parse_type(const char *type, uint8_t *fstype)
|
|||
|
||||
if (type[0] == '!') {
|
||||
lt = strtol(type + 1, &endp, 0);
|
||||
if (type[1] == '\0' || *endp != '\0' || lt <= 0 || lt >= 256)
|
||||
if (type[1] == '\0' || *endp != '\0' || lt < 0 || lt >= 256)
|
||||
return (EINVAL);
|
||||
*fstype = (u_int)lt;
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue