Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/installboot Minor usage tweaks for SMALLPROG



details:   https://anonhg.NetBSD.org/src/rev/af80eacebef5
branches:  trunk
changeset: 770952:af80eacebef5
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Nov 03 20:46:41 2011 +0000

description:
Minor usage tweaks for SMALLPROG

diffstat:

 usr.sbin/installboot/installboot.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 17a3c878ad49 -r af80eacebef5 usr.sbin/installboot/installboot.c
--- a/usr.sbin/installboot/installboot.c        Thu Nov 03 20:09:18 2011 +0000
+++ b/usr.sbin/installboot/installboot.c        Thu Nov 03 20:46:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: installboot.c,v 1.35 2011/08/31 13:32:37 joerg Exp $   */
+/*     $NetBSD: installboot.c,v 1.36 2011/11/03 20:46:41 martin Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(__lint)
-__RCSID("$NetBSD: installboot.c,v 1.35 2011/08/31 13:32:37 joerg Exp $");
+__RCSID("$NetBSD: installboot.c,v 1.36 2011/11/03 20:46:41 martin Exp $");
 #endif /* !__lint */
 
 #include <sys/ioctl.h>
@@ -488,7 +488,7 @@
 #ifdef TIOCGWINSZ
        struct winsize win;
 
-       if (ioctl(fileno(stderr), TIOCGWINSZ, &win) == 0)
+       if (ioctl(fileno(stderr), TIOCGWINSZ, &win) == 0 && win.ws_col > 0)
                wincol = win.ws_col;
 #endif
 
@@ -533,6 +533,7 @@
 static void
 fstype_usage(void)
 {
+#ifndef NO_STAGE2
        const char *prefix;
        int     i;
 
@@ -546,6 +547,7 @@
                prefix=", ";
        }
        fputs("\n", stderr);
+#endif
 }
 
 static void



Home | Main Index | Thread Index | Old Index