Module Name: src Committed By: jnemeth Date: Fri Nov 22 03:50:05 UTC 2013
Modified Files: src/sbin/gpt: add.c gpt.8 label.c remove.c resize.c Log Message: In the manpage: - s/-b number/-b blocknr/ - s/-s count/-s sectors/ - s/-p count/-p partitions/ In the program: - s/-b lba/-b blocknr/ - s/-s lba/-s sectors/ This makes the documentation in the manpage and the program consistent and makes it more clear what the parameters are. Also, "-s lba" was just plain wrong since LBA stands for Logical Block Address[ing], and the -s option didn't represent any kind of address, but rather a size. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sbin/gpt/add.c cvs rdiff -u -r1.18 -r1.19 src/sbin/gpt/gpt.8 cvs rdiff -u -r1.10 -r1.11 src/sbin/gpt/label.c cvs rdiff -u -r1.8 -r1.9 src/sbin/gpt/remove.c cvs rdiff -u -r1.1 -r1.2 src/sbin/gpt/resize.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/add.c diff -u src/sbin/gpt/add.c:1.17 src/sbin/gpt/add.c:1.18 --- src/sbin/gpt/add.c:1.17 Tue Nov 19 22:41:43 2013 +++ src/sbin/gpt/add.c Fri Nov 22 03:50:05 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: add.c,v 1.17 2013/11/19 22:41:43 jnemeth Exp $"); +__RCSID("$NetBSD: add.c,v 1.18 2013/11/22 03:50:05 jnemeth Exp $"); #endif #include <sys/types.h> @@ -50,8 +50,8 @@ static off_t alignment, block, size; static unsigned int entry; static uint8_t *name; -const char addmsg1[] = "add [-a alignment] [-b lba] [-i index] [-l label]"; -const char addmsg2[] = " [-s lba] [-t type] device ..."; +const char addmsg1[] = "add [-a alignment] [-b blocknr] [-i index] [-l label]"; +const char addmsg2[] = " [-s sectors] [-t type] device ..."; __dead static void usage_add(void) Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.18 src/sbin/gpt/gpt.8:1.19 --- src/sbin/gpt/gpt.8:1.18 Wed Nov 20 08:11:36 2013 +++ src/sbin/gpt/gpt.8 Fri Nov 22 03:50:05 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpt.8,v 1.18 2013/11/20 08:11:36 wiz Exp $ +.\" $NetBSD: gpt.8,v 1.19 2013/11/22 03:50:05 jnemeth Exp $ .\" .\" Copyright (c) 2002 Marcel Moolenaar .\" All rights reserved. @@ -68,7 +68,7 @@ Not all commands use all default setting have an effect on all commands. .Pp The -.Fl p Ar count +.Fl p Ar partitions option allows the user to change the number of partitions the GPT can accommodate. This is used whenever a new GPT is created. @@ -94,8 +94,8 @@ There is no formalized definition of the .Ss Commands .Bl -tag -width indent .\" ==== add ==== -.It Nm Ic add Oo Fl a Ar alignment Oc Oo Fl b Ar number Oc \ -Oo Fl i Ar index Oc Oo Fl l Ar label Oc Oo Fl s Ar count Oc \ +.It Nm Ic add Oo Fl a Ar alignment Oc Oo Fl b Ar blocknr Oc \ +Oo Fl i Ar index Oc Oo Fl l Ar label Oc Oo Fl s Ar sectors Oc \ Oo Fl t Ar type Oc Ar device ... The .Ic add @@ -113,7 +113,7 @@ will attempt to align the partition. If it can not, then it will attempt to create an unaligned partition. .Pp The -.Fl b Ar number +.Fl b Ar blocknr option allows the user to specify the starting (beginning) sector number of the partition. The minimum sector number is 1, but has to fall inside an unused region of @@ -130,7 +130,7 @@ The option allows the user to specify a label for the partition. .Pp The -.Fl s Ar count +.Fl s Ar sectors option allows the user to specify the size of the partition in sectors. The minimum size is 1. .Pp @@ -200,8 +200,8 @@ option instructs to destroy the table in a way that it can be recovered. .\" ==== label ==== .It Nm Ic label Oo Fl a Oc Ao Fl f Ar file | Fl l Ar label Ac Ar device ... -.It Nm Ic label Oo Fl b Ar number Oc Oo Fl i Ar index Oc \ -Oo Fl s Ar count Oc Oo Fl t Ar type Oc \ +.It Nm Ic label Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \ +Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \ Ao Fl f Ar file | Fl l Ar label Ac Ar device ... The .Ic label @@ -214,7 +214,7 @@ option specifies that all partitions sho It is mutually exclusive with all other selection options. .Pp The -.Fl b Ar number +.Fl b Ar blocknr option selects the partition that starts at the given block number. .Pp The @@ -222,7 +222,7 @@ The option selects the partition with the given partition number. .Pp The -.Fl s Ar count +.Fl s Ar sectors option selects all partitions that have the given size. This can cause multiple partitions to be labeled. .Pp @@ -304,8 +304,8 @@ near the end of the disk. It is very useful in case the primary label was deleted. .\" ==== remove ==== .It Nm Ic remove Oo Fl a Oc Ar device ... -.It Nm Ic remove Oo Fl b Ar number Oc Oo Fl i Ar index Oc \ -Oo Fl s Ar count Oc Oo Fl t Ar type Oc Ar device ... +.It Nm Ic remove Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \ +Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc Ar device ... The .Ic remove command allows the user to remove any and all partitions that match the @@ -318,7 +318,7 @@ Partitions are removed by clearing the p No other information is changed. .\" ==== resize ==== .It Nm Ic resize Fl i Ar index Oo Fl a Ar alignment Oc \ -Oo Fl s Ar count Oc Ar device ... +Oo Fl s Ar sectors Oc Ar device ... The .Ic resize command allows the user to resize a partition. @@ -423,7 +423,7 @@ It is expected that the basic usage mode possible that future versions will not be compatible in the strictest sense of the word. For example, the -.Fl p Ar count +.Fl p Ar partitions option may be changed to a command option rather than a generic option. There are only two commands that use it so there is a chance that the natural tendency for people is to use it as a command option. Index: src/sbin/gpt/label.c diff -u src/sbin/gpt/label.c:1.10 src/sbin/gpt/label.c:1.11 --- src/sbin/gpt/label.c:1.10 Sat Apr 13 18:04:33 2013 +++ src/sbin/gpt/label.c Fri Nov 22 03:50:05 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/label.c,v 1.3 2006/10/04 18:20:25 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: label.c,v 1.10 2013/04/13 18:04:33 jakllsch Exp $"); +__RCSID("$NetBSD: label.c,v 1.11 2013/11/22 03:50:05 jnemeth Exp $"); #endif #include <sys/types.h> @@ -51,7 +51,7 @@ static unsigned int entry; static uint8_t *name; const char labelmsg1[] = "label -a <-l label | -f file> device ..."; -const char labelmsg2[] = "label [-b lba] [-i index] [-s lba]"; +const char labelmsg2[] = "label [-b blocknr] [-i index] [-s sectors]"; const char labelmsg3[] = " [-t uuid] <-l label | -f file> device ..."; __dead static void Index: src/sbin/gpt/remove.c diff -u src/sbin/gpt/remove.c:1.8 src/sbin/gpt/remove.c:1.9 --- src/sbin/gpt/remove.c:1.8 Sat Apr 13 18:04:33 2013 +++ src/sbin/gpt/remove.c Fri Nov 22 03:50:05 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: remove.c,v 1.8 2013/04/13 18:04:33 jakllsch Exp $"); +__RCSID("$NetBSD: remove.c,v 1.9 2013/11/22 03:50:05 jnemeth Exp $"); #endif #include <sys/types.h> @@ -50,7 +50,7 @@ static off_t block, size; static unsigned int entry; const char removemsg1[] = "remove -a device ..."; -const char removemsg2[] = "remove [-b lba] [-i index] [-s lba] " +const char removemsg2[] = "remove [-b blocknr] [-i index] [-s sectors] " "[-t type] device ..."; __dead static void Index: src/sbin/gpt/resize.c diff -u src/sbin/gpt/resize.c:1.1 src/sbin/gpt/resize.c:1.2 --- src/sbin/gpt/resize.c:1.1 Wed Nov 20 08:08:47 2013 +++ src/sbin/gpt/resize.c Fri Nov 22 03:50:05 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: resize.c,v 1.1 2013/11/20 08:08:47 jnemeth Exp $"); +__RCSID("$NetBSD: resize.c,v 1.2 2013/11/22 03:50:05 jnemeth Exp $"); #endif #include <sys/types.h> @@ -48,7 +48,8 @@ __RCSID("$NetBSD: resize.c,v 1.1 2013/11 static off_t alignment, size; static unsigned int entry; -const char resizemsg[] = "resize -i index [-a alignment] [-s lba] device ..."; +const char resizemsg[] = "resize -i index [-a alignment] [-s sectors] " + "device ..."; __dead static void usage_resize(void)