Fri Dec 2 04:05:20 2011 UTC ()
Add missing -F flag and -I flag in usage.  Sort the order to match
manpage.


(enami)
diff -r1.136 -r1.137 src/sbin/fdisk/fdisk.c

cvs diff -r1.136 -r1.137 src/sbin/fdisk/fdisk.c (expand / switch to unified diff)

--- src/sbin/fdisk/fdisk.c 2011/12/02 03:04:11 1.136
+++ src/sbin/fdisk/fdisk.c 2011/12/02 04:05:20 1.137
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: fdisk.c,v 1.136 2011/12/02 03:04:11 christos Exp $ */ 1/* $NetBSD: fdisk.c,v 1.137 2011/12/02 04:05:20 enami Exp $ */
2 2
3/* 3/*
4 * Mach Operating System 4 * Mach Operating System
5 * Copyright (c) 1992 Carnegie Mellon University 5 * Copyright (c) 1992 Carnegie Mellon University
6 * All Rights Reserved. 6 * All Rights Reserved.
7 * 7 *
8 * Permission to use, copy, modify and distribute this software and its 8 * Permission to use, copy, modify and distribute this software and its
9 * documentation is hereby granted, provided that both the copyright 9 * documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the 10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions 11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation. 12 * thereof, and that both notices appear in supporting documentation.
13 * 13 *
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
@@ -29,27 +29,27 @@ @@ -29,27 +29,27 @@
29/* 29/*
30 * 14-Dec-89 Robert Baron (rvb) at Carnegie-Mellon University 30 * 14-Dec-89 Robert Baron (rvb) at Carnegie-Mellon University
31 * Copyright (c) 1989 Robert. V. Baron 31 * Copyright (c) 1989 Robert. V. Baron
32 * Created. 32 * Created.
33 */ 33 */
34 34
35#if HAVE_NBTOOL_CONFIG_H 35#if HAVE_NBTOOL_CONFIG_H
36#include "nbtool_config.h" 36#include "nbtool_config.h"
37#endif 37#endif
38 38
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40 40
41#ifndef lint 41#ifndef lint
42__RCSID("$NetBSD: fdisk.c,v 1.136 2011/12/02 03:04:11 christos Exp $"); 42__RCSID("$NetBSD: fdisk.c,v 1.137 2011/12/02 04:05:20 enami Exp $");
43#endif /* not lint */ 43#endif /* not lint */
44 44
45#define MBRPTYPENAMES 45#define MBRPTYPENAMES
46#include <sys/types.h> 46#include <sys/types.h>
47#include <sys/param.h> 47#include <sys/param.h>
48#include <sys/stat.h> 48#include <sys/stat.h>
49#include <ctype.h> 49#include <ctype.h>
50#include <err.h> 50#include <err.h>
51#include <errno.h> 51#include <errno.h>
52#include <fcntl.h> 52#include <fcntl.h>
53#include <paths.h> 53#include <paths.h>
54#include <stdarg.h> 54#include <stdarg.h>
55#include <stddef.h> 55#include <stddef.h>
@@ -594,27 +594,27 @@ main(int argc, char *argv[]) @@ -594,27 +594,27 @@ main(int argc, char *argv[])
594 warnx("Secondary GPT header was deleted"); 594 warnx("Secondary GPT header was deleted");
595 write_mbr(); 595 write_mbr();
596 } 596 }
597 } 597 }
598 598
599 exit(0); 599 exit(0);
600} 600}
601 601
602static void 602static void
603usage(void) 603usage(void)
604{ 604{
605 int indent = 7 + (int)strlen(getprogname()) + 1; 605 int indent = 7 + (int)strlen(getprogname()) + 1;
606 606
607 (void)fprintf(stderr, "usage: %s [-afiluvBS] " 607 (void)fprintf(stderr, "usage: %s [-aBFfIilSuv] "
608 "[-A ptn_alignment[/ptn_0_offset]] \\\n" 608 "[-A ptn_alignment[/ptn_0_offset]] \\\n"
609 "%*s[-b cylinders/heads/sectors] \\\n" 609 "%*s[-b cylinders/heads/sectors] \\\n"
610 "%*s[-0123 | -E num " 610 "%*s[-0123 | -E num "
611 "[-s id/start/size[/bootmenu]]] \\\n" 611 "[-s id/start/size[/bootmenu]]] \\\n"
612 "%*s[-t disktab] [-T disktype] \\\n" 612 "%*s[-t disktab] [-T disktype] \\\n"
613 "%*s[-c bootcode] " 613 "%*s[-c bootcode] "
614 "[-r|-w file] [device]\n" 614 "[-r|-w file] [device]\n"
615 "\t-a change active partition\n" 615 "\t-a change active partition\n"
616 "\t-f force - not interactive\n" 616 "\t-f force - not interactive\n"
617 "\t-i initialise MBR code\n" 617 "\t-i initialise MBR code\n"
618 "\t-l list partition types\n" 618 "\t-l list partition types\n"
619 "\t-u update partition data\n" 619 "\t-u update partition data\n"
620 "\t-v verbose output, -v -v more verbose still\n" 620 "\t-v verbose output, -v -v more verbose still\n"