Module Name: src
Committed By: martin
Date: Thu Nov 3 20:46:41 UTC 2011
Modified Files:
src/usr.sbin/installboot: installboot.c
Log Message:
Minor usage tweaks for SMALLPROG
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/installboot/installboot.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/installboot/installboot.c
diff -u src/usr.sbin/installboot/installboot.c:1.35 src/usr.sbin/installboot/installboot.c:1.36
--- src/usr.sbin/installboot/installboot.c:1.35 Wed Aug 31 13:32:37 2011
+++ src/usr.sbin/installboot/installboot.c Thu Nov 3 20:46:41 2011
@@ -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 @@ machine_usage(void)
#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 @@ getfstype(ib_params *param, const char *
static void
fstype_usage(void)
{
+#ifndef NO_STAGE2
const char *prefix;
int i;
@@ -546,6 +547,7 @@ fstype_usage(void)
prefix=", ";
}
fputs("\n", stderr);
+#endif
}
static void