From nobody Sat Dec 21 17:06:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YFrK70RDDz5hPgV; Sat, 21 Dec 2024 17:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFrK66txCz4PM8; Sat, 21 Dec 2024 17:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734800763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvpezruvHW3Kcf2HkC5evs3YFdNDMG0Tt4HMPYYM4L8=; b=QWx6xUoZT8NeAiKnQmxkF9e9CGiFE1w0FJnAdtgnaA7GQgRULBKrGKYCfRPgnEDkv7Ik9L sHtl8vZHxm2nIbyWbZbNMqUKoTSAY4I8xB4ixq271FXr+6O6O65HhL784glJ+CVEgj8XGV 6N/iLbkH4ABBTMtgh5wPKKVwlU1TDvddK83dGzBH3LSl6o69yxbrkrmZ1W1zlMytCOIyY8 LXQIxKPyJbLQ9hEfd1TKV8xi2Jdfdl9QvaZA4S31cHWhZF6lLgodm3WI/yAvqy9CDf9wm1 bp9fQYOVcSDiEnMlS61oiQHLpe7FAeaXfdN46bAE7qpl19rmj9D9Qapxvdb9mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734800763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvpezruvHW3Kcf2HkC5evs3YFdNDMG0Tt4HMPYYM4L8=; b=veCBaWa27Nk+Lq2l/W11vFRdt5MZCzUSesw4GQfcU6t+06V8j8EZdUYpdCybdOvj34A4md DdyvFMQoRt8hZNvW30CcaPKPMAXaSzcjewoTFgYWHpiUR8gU70dfG2z8IPeiXi7IL/Am2i JgiWFrCEPB6PA4crmdRKMYGzY7kZiKtq5qIl/W8FQTaO0mU+muSFNNU3HltNkJL8fGw52L oMn+RQ//yYid3vR6vyhsGqeM2sVG4pwKI9Z6h2STtWVOT8JGJJKf5vy8198Xt7RXhp+HmG 34sP7j0+4rSDHd0tzHqZhABsdDeXVQEbni8f3FrFNfdtHhcki+P1zf1D8iNDGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734800763; a=rsa-sha256; cv=none; b=grcWFxPzLOAQ7T365UZY3rT/ns12ueoZe44WMTE6OD/BFLQhDDz4JJG9zc2Gp7dXJPPh7m 71hjQtBfAm+unvc2C2bV4WmC8dnO4clFuvx7VuxpPqYPrriWc6WX47dp4GTlSr/Rv3wOtb wLm6IfVI/lyRn6hMcX9BL04C4e++mbZkfWTpUQkdBXI7p5pkxjhUkmRTqbkzcMtTKxBxTB hghdtGVPhRWRwc6E6ac1fqSa4O6GuV6AzEK5EfxKwWJVTIiPFD5UrJ3Cd7+24GPMavFeaF njnL+x/KmjBW68zHfEP+Q3BkuDksG1sKhmkTKRe21qSm98/A2Rtv2dHA5vOenw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YFrK66B0FzYHh; Sat, 21 Dec 2024 17:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BLH62vC071150; Sat, 21 Dec 2024 17:06:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BLH621Q071147; Sat, 21 Dec 2024 17:06:02 GMT (envelope-from git) Date: Sat, 21 Dec 2024 17:06:02 GMT Message-Id: <202412211706.4BLH621Q071147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: a7d56527c2fd - stable/14 - geom: Allow BSD type '!0' partitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a7d56527c2fd0730eea2551087c3b785691603b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a7d56527c2fd0730eea2551087c3b785691603b2 commit a7d56527c2fd0730eea2551087c3b785691603b2 Author: Jose Luis Duran AuthorDate: 2024-11-17 23:55:14 +0000 Commit: Jose Luis Duran CommitDate: 2024-12-21 17:04:07 +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);