Re: fdisk(8) -l -c -h -s manpage bits

2015-11-17 Thread Jason McIntyre
On Tue, Nov 17, 2015 at 06:38:06PM +0100, Jan Stary wrote:
> On Nov 17 17:21:42, j...@kerhand.co.uk wrote:
> > On Tue, Nov 17, 2015 at 09:36:26AM +0100, Jan Stary wrote:
> > > On Nov 14 14:17:08, k...@openbsd.org wrote:
> > > > Modified files:
> > > > sbin/fdisk : disk.c fdisk.c 
> > > > 
> > > > Log message:
> > > > Since -l is ignored if -c/-h/-s are specified, make that combination
> > > > invalid and mention the constraint in usage().
> > > 
> > > Mention it in the manpage too.
> > > 
> > >   Jan
> > > 
> > > 
> > 
> > i agree it makes sense to document it. but there is already similar text
> > there for -u and -i, and this makes it a little consistent.
> > 

note i actually meant to say "inconsistent", not "consistent"

> > i propose using the same text. are you happy with this?
> 
> I agree that this is better.
> 

fine, i'll fix in a sec. thanks for the mail.
jmc

> 
> > 
> > Index: fdisk.8
> > ===
> > RCS file: /cvs/src/sbin/fdisk/fdisk.8,v
> > retrieving revision 1.87
> > diff -u -r1.87 fdisk.8
> > --- fdisk.8 26 Oct 2015 18:05:25 -  1.87
> > +++ fdisk.8 17 Nov 2015 17:19:53 -
> > @@ -79,6 +79,12 @@
> >  or values that
> >  .Em /boot
> >  has passed to the kernel.
> > +.Pp
> > +Only one of
> > +.Fl chs
> > +or
> > +.Fl l
> > +can be specified.
> >  .It Fl e
> >  Use the
> >  .Nm
> > @@ -127,6 +133,12 @@
> >  .It Fl l Ar blocks
> >  Specify the number of blocks in the disk, and force the MBR to be in LBA
> >  mode only.
> > +.Pp
> > +Only one of
> > +.Fl chs
> > +or
> > +.Fl l
> > +can be specified.
> >  .It Fl u
> >  Update MBR bootcode, preserving existing MBR partition table.
> >  The MBR bootcode extends from offset 0x000 to the start of the MBR 
> > partition
> 



Re: fdisk(8) -l -c -h -s manpage bits

2015-11-17 Thread Jan Stary
On Nov 17 17:21:42, j...@kerhand.co.uk wrote:
> On Tue, Nov 17, 2015 at 09:36:26AM +0100, Jan Stary wrote:
> > On Nov 14 14:17:08, k...@openbsd.org wrote:
> > > Modified files:
> > >   sbin/fdisk : disk.c fdisk.c 
> > > 
> > > Log message:
> > > Since -l is ignored if -c/-h/-s are specified, make that combination
> > > invalid and mention the constraint in usage().
> > 
> > Mention it in the manpage too.
> > 
> > Jan
> > 
> > 
> 
> i agree it makes sense to document it. but there is already similar text
> there for -u and -i, and this makes it a little consistent.
> 
> i propose using the same text. are you happy with this?

I agree that this is better.


> 
> Index: fdisk.8
> ===
> RCS file: /cvs/src/sbin/fdisk/fdisk.8,v
> retrieving revision 1.87
> diff -u -r1.87 fdisk.8
> --- fdisk.8   26 Oct 2015 18:05:25 -  1.87
> +++ fdisk.8   17 Nov 2015 17:19:53 -
> @@ -79,6 +79,12 @@
>  or values that
>  .Em /boot
>  has passed to the kernel.
> +.Pp
> +Only one of
> +.Fl chs
> +or
> +.Fl l
> +can be specified.
>  .It Fl e
>  Use the
>  .Nm
> @@ -127,6 +133,12 @@
>  .It Fl l Ar blocks
>  Specify the number of blocks in the disk, and force the MBR to be in LBA
>  mode only.
> +.Pp
> +Only one of
> +.Fl chs
> +or
> +.Fl l
> +can be specified.
>  .It Fl u
>  Update MBR bootcode, preserving existing MBR partition table.
>  The MBR bootcode extends from offset 0x000 to the start of the MBR partition



Re: fdisk(8) -l -c -h -s manpage bits

2015-11-17 Thread Jason McIntyre
On Tue, Nov 17, 2015 at 09:36:26AM +0100, Jan Stary wrote:
> On Nov 14 14:17:08, k...@openbsd.org wrote:
> > Modified files:
> > sbin/fdisk : disk.c fdisk.c 
> > 
> > Log message:
> > Since -l is ignored if -c/-h/-s are specified, make that combination
> > invalid and mention the constraint in usage().
> 
> Mention it in the manpage too.
> 
>   Jan
> 
> 

i agree it makes sense to document it. but there is already similar text
there for -u and -i, and this makes it a little consistent.

i propose using the same text. are you happy with this?
jmc

Index: fdisk.8
===
RCS file: /cvs/src/sbin/fdisk/fdisk.8,v
retrieving revision 1.87
diff -u -r1.87 fdisk.8
--- fdisk.8 26 Oct 2015 18:05:25 -  1.87
+++ fdisk.8 17 Nov 2015 17:19:53 -
@@ -79,6 +79,12 @@
 or values that
 .Em /boot
 has passed to the kernel.
+.Pp
+Only one of
+.Fl chs
+or
+.Fl l
+can be specified.
 .It Fl e
 Use the
 .Nm
@@ -127,6 +133,12 @@
 .It Fl l Ar blocks
 Specify the number of blocks in the disk, and force the MBR to be in LBA
 mode only.
+.Pp
+Only one of
+.Fl chs
+or
+.Fl l
+can be specified.
 .It Fl u
 Update MBR bootcode, preserving existing MBR partition table.
 The MBR bootcode extends from offset 0x000 to the start of the MBR partition



Re: fdisk(8) -l -c -h -s manpage bits

2015-11-17 Thread Jan Stary
On Nov 14 14:17:08, k...@openbsd.org wrote:
> Modified files:
>   sbin/fdisk : disk.c fdisk.c 
> 
> Log message:
> Since -l is ignored if -c/-h/-s are specified, make that combination
> invalid and mention the constraint in usage().

Mention it in the manpage too.

Jan


Index: fdisk.8
===
RCS file: /cvs/src/sbin/fdisk/fdisk.8,v
retrieving revision 1.87
diff -u -p -r1.87 fdisk.8
--- fdisk.8 26 Oct 2015 18:05:25 -  1.87
+++ fdisk.8 17 Nov 2015 08:34:38 -
@@ -79,6 +79,8 @@ These figures are taken from the in-core
 or values that
 .Em /boot
 has passed to the kernel.
+These options are mutually exclusive with
+.Fl l .
 .It Fl e
 Use the
 .Nm
@@ -127,6 +129,8 @@ can be specified.
 .It Fl l Ar blocks
 Specify the number of blocks in the disk, and force the MBR to be in LBA
 mode only.
+This option is mutually exclusive with
+.Fl c h s .
 .It Fl u
 Update MBR bootcode, preserving existing MBR partition table.
 The MBR bootcode extends from offset 0x000 to the start of the MBR partition