Module Name:    src
Committed By:   abs
Date:           Sat Nov 28 10:52:10 UTC 2009

Modified Files:
        src/sbin/disklabel: interact.c

Log Message:
- Display "Enter '?' for help" when starting interactive mode
- Use %.40g rather than %g when printing sectors and MB for existing
  partition size/offset.
  Changes [1.93802e+06c, 1953525105s, 953870M]:
  to:     [1938021c, 1953525105s, 953869.6875M]:


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sbin/disklabel/interact.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/disklabel/interact.c
diff -u src/sbin/disklabel/interact.c:1.32 src/sbin/disklabel/interact.c:1.33
--- src/sbin/disklabel/interact.c:1.32	Wed Oct 21 01:07:46 2009
+++ src/sbin/disklabel/interact.c	Sat Nov 28 10:52:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: interact.c,v 1.32 2009/10/21 01:07:46 snj Exp $	*/
+/*	$NetBSD: interact.c,v 1.33 2009/11/28 10:52:10 abs Exp $	*/
 
 /*
  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: interact.c,v 1.32 2009/10/21 01:07:46 snj Exp $");
+__RCSID("$NetBSD: interact.c,v 1.33 2009/11/28 10:52:10 abs Exp $");
 #endif /* lint */
 
 #include <sys/param.h>
@@ -702,7 +702,7 @@
 defnum(struct disklabel *lp, char *buf, uint32_t size)
 {
 
-	(void) snprintf(buf, BUFSIZ, "%gc, %us, %gM",
+	(void) snprintf(buf, BUFSIZ, "%.40gc, %us, %.40gM",
 	    size / (float) lp->d_secpercyl,
 	    size, size  * (lp->d_secsize / (float) (1024 * 1024)));
 }
@@ -776,6 +776,7 @@
 {
 	char	line[BUFSIZ];
 
+	puts("Enter '?' for help");
 	for (;;) {
 		if (getinput(">", "partition", NULL, line) == -1)
 			return;

Reply via email to