Module Name: src Committed By: kre Date: Mon Jun 10 09:17:29 UTC 2024
Modified Files: src/sbin/gpt: gpt.8 gpt.c Log Message: Revert unintended commit. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sbin/gpt/gpt.8 cvs rdiff -u -r1.88 -r1.89 src/sbin/gpt/gpt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.81 src/sbin/gpt/gpt.8:1.82 --- src/sbin/gpt/gpt.8:1.81 Mon Jun 10 08:04:44 2024 +++ src/sbin/gpt/gpt.8 Mon Jun 10 09:17:29 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpt.8,v 1.81 2024/06/10 08:04:44 kre Exp $ +.\" $NetBSD: gpt.8,v 1.82 2024/06/10 09:17:29 kre Exp $ .\" .\" Copyright (c) 2002 Marcel Moolenaar .\" All rights reserved. @@ -629,15 +629,6 @@ and are not currently used by They may be used by .Nx in the future. -In addition, the notation -.Ar bit Ns NN , -where NN is an integer in the range 48..63 (inclusive) -allows any of the file-system type specific attribute bits -to be set. -This is a hack, and is likely to be changed in a later -revision, when the ability to set (and decode) attributes -that are specific to a specific owning partition type is -added. .\" ==== show ==== .It Nm Ic show Oo Fl aglu Oc Oo Fl i Ar index Oc Oo Fl b Ar startsec Oc The Index: src/sbin/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.88 src/sbin/gpt/gpt.c:1.89 --- src/sbin/gpt/gpt.c:1.88 Mon Jun 10 08:04:44 2024 +++ src/sbin/gpt/gpt.c Mon Jun 10 09:17:29 2024 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: gpt.c,v 1.88 2024/06/10 08:04:44 kre Exp $"); +__RCSID("$NetBSD: gpt.c,v 1.89 2024/06/10 09:17:29 kre Exp $"); #endif #include <sys/param.h> @@ -1221,30 +1221,8 @@ gpt_attr_get(gpt_t gpt, uint64_t *attrib if (strcmp(gpt_attr[i].name, ptr) == 0) break; if (i == __arraycount(gpt_attr)) { - long bit; - char *ep; - - /* - * XXX - * Allow bitNN for 48 <= NN <= 63 - * so the partition type specific bits - * can be accessed (set/cleared) - * - * This should be fixed so the partition type - * specific bits can be given names, which apply - * only for the appropriate partition type. - */ - if (strncasecmp(ptr, "bit", 3) == 0 && - isdigit((int)(unsigned char)ptr[3]) && - (bit = strtol(ptr + 3, &ep, 10)) >= 48 && - bit <= 63 && - *ep == '\0') { - *attributes |= 1ULL << (unsigned)bit; - } else { - gpt_warnx(gpt, - "Unrecognized attribute `%s'", ptr); - rv = -1; - } + gpt_warnx(gpt, "Unrecognized attribute `%s'", ptr); + rv = -1; } else *attributes |= gpt_attr[i].mask; } @@ -1296,7 +1274,7 @@ gpt_attr_list(char *buf, size_t len, uin * (it does build however). */ if (gpt_attr[i].mask & (gpt_attr[i].mask - 1)) { - /* This only happens in bits 48..63 */ + /* This only happens in bits 46..63 */ /* * xbuf is big enough for "=65535\0"