Module Name: src Committed By: christos Date: Fri Sep 23 19:36:50 UTC 2016
Modified Files: src/sbin/gpt: create.c Log Message: PR/51497: Clare: Allow gpt -p <n> create to work. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sbin/gpt/create.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/create.c diff -u src/sbin/gpt/create.c:1.22 src/sbin/gpt/create.c:1.23 --- src/sbin/gpt/create.c:1.22 Thu Jun 9 15:04:43 2016 +++ src/sbin/gpt/create.c Fri Sep 23 15:36:50 2016 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: create.c,v 1.22 2016/06/09 19:04:43 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.23 2016/09/23 19:36:50 christos Exp $"); #endif #include <sys/types.h> @@ -128,7 +128,7 @@ cmd_create(gpt_t gpt, int argc, char *ar int active = 0; int force = 0; int primary_only = 0; - u_int parts = 128; + u_int parts = 0; while ((ch = getopt(argc, argv, "AfPp:")) != -1) { switch(ch) { @@ -149,6 +149,8 @@ cmd_create(gpt_t gpt, int argc, char *ar return usage(); } } + if (parts == 0) + parts = 128; if (argc != optind) return usage();