From nobody Wed Nov 20 22:34:12 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 4Xtx445FPgz5dqmV; Wed, 20 Nov 2024 22:34:12 +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 4Xtx444T0Xz4487; Wed, 20 Nov 2024 22:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142052; 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=NagTyYGwMUrfkbYZfzvm+hGV1sczkff6r551jCzPIYE=; b=j1+ArlNpo8bXTfltmk6zOmwy/9asWExfhACy9u5jSKyVG0jaFk5AFLkIjfDVGvCUlLhnDw CqxjoxQ8fnMNjk/0HAcxLUAcur04Uj2IRuNcdgmJRv5I0fzmLv3Uhn7aSsv+02DNq542lP 7HPmiO54bXKLsz0OF9uzVps9lTV8uQnvE2qBElP7ss0GRzHWIMK1Ou5MeDi6TDcuiW/nD4 JyZTLO3OfPcffLuSkvHPGi/0NK9dvmAmTqpC65yYd+h5eBKJQkxo8BzyACIi1s6vYPbqBQ FNQrZh0OMC3fruFWf9o9SSZ2eC59AQ3g3Yd3A4Q4aDn1D0q6FFqrChRiSuW87Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142052; 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=NagTyYGwMUrfkbYZfzvm+hGV1sczkff6r551jCzPIYE=; b=kmoWMFJsvuXXEFDh+ZO0wrr1dw7l4JJ/rZRhd07GwAYtkBHx71AIoE/qKub1+Y2BNQgMV3 Zbz8MpGvJDF7H3n7OObMD+Hrw9tN9cihLIottJpHH4J1rxjPmpPCEgilVLap6kI6yHrbsv 6oARkDs5TtttF97dQQU99rySzwFYiTSfpzJci42pzxnABEWPr9OuQJf69xA6p4OHxg8alz 9vNth9VLxXKRrDGp4UyKQ3Z6nr/7sgUFeAUMvKm6YFGIDA+TRRQVeNNxcDgwSuy1FFHzYP tsHvtab17M59m8GurHHd5fy2IR7RzhsFtRtkRv5XB6RIkBT9FCU/8YugkMnNZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732142052; a=rsa-sha256; cv=none; b=jccR63I7YDvYcTFY+2gMOrrLxFYuU+rv6LD9/y67RiA3N+z+suyc9v22kK1lnpd5nzEZAw zKkLitH0VhDb3oV4meyiveBjkzZtpFsQL5Rf/0+wuC8fxNCG0wv4FwMNgDw3+T3Ya35O75 AZPzx46UqZldBIcIWxTL60GVrTg9Ffm1JpAo2NH/rVbp181iEV6JV1wn4EmSjQlNppZGkG OPApDUC5fCgCdt/Pj8Sgl3PltVu/tQj1QzRPjn/6PiVdvdEtILlibKbvjBgTxa2kgNNBIS 7f1kGrwWExX0XBpr/Z4GO+cqeHd+jj8ylGn/qS8+vF9O+9S31c7442dsh7m3Fw== 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 4Xtx4443SJz1C9Q; Wed, 20 Nov 2024 22:34:12 +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 4AKMYCfJ021401; Wed, 20 Nov 2024 22:34:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKMYCxA021398; Wed, 20 Nov 2024 22:34:12 GMT (envelope-from git) Date: Wed, 20 Nov 2024 22:34:12 GMT Message-Id: <202411202234.4AKMYCxA021398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: accf71534c61 - main - 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/main X-Git-Reftype: branch X-Git-Commit: accf71534c612b76ee2701f2dfcaa464748e527a Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=accf71534c612b76ee2701f2dfcaa464748e527a commit accf71534c612b76ee2701f2dfcaa464748e527a Author: Jose Luis Duran AuthorDate: 2024-11-17 23:55:14 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-20 22:28:57 +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 --- 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 d6d1b7346d9b..51912bedbdc2 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);