Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Dec 2024 17:06:28 GMT
From:      Jose Luis Duran <jlduran@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 494120df401b - stable/13 - geom: Allow BSD type '!0' partitions
Message-ID:  <202412211706.4BLH6SSj071476@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jlduran:

URL: https://cgit.FreeBSD.org/src/commit/?id=494120df401b9b6fdca1378f6e1e0da1722b9849

commit 494120df401b9b6fdca1378f6e1e0da1722b9849
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2024-11-17 23:55:14 +0000
Commit:     Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2024-12-21 17:05:08 +0000

    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)
---
 sys/geom/part/g_part_bsd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/geom/part/g_part_bsd.c b/sys/geom/part/g_part_bsd.c
index bb1aed0cf59d..625cdb4c727e 100644
--- a/sys/geom/part/g_part_bsd.c
+++ b/sys/geom/part/g_part_bsd.c
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412211706.4BLH6SSj071476>