Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/disklabel - Display "Enter '?' for help" when starting ...



details:   https://anonhg.NetBSD.org/src/rev/e7019cde1169
branches:  trunk
changeset: 749380:e7019cde1169
user:      abs <abs%NetBSD.org@localhost>
date:      Sat Nov 28 10:52:10 2009 +0000

description:
- 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]:

diffstat:

 sbin/disklabel/interact.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 849bde5b2203 -r e7019cde1169 sbin/disklabel/interact.c
--- a/sbin/disklabel/interact.c Sat Nov 28 10:28:22 2009 +0000
+++ b/sbin/disklabel/interact.c Sat Nov 28 10:52:10 2009 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index