Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode update usage message:
details: https://anonhg.NetBSD.org/src/rev/0c168840a8f3
branches: trunk
changeset: 772258:0c168840a8f3
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Dec 26 21:22:23 2011 +0000
description:
update usage message:
$ ./netbsd -h
-h: unknown flag
usage: ./netbsd [-acdqsvxz] [tap=<dev>,<eaddr>] [audio=<dev>] [<fsimg>]
(ex. "./netbsd tap=tap0,00:00:be:ef:ca:fe audio=audio0 root.fs")
diffstat:
sys/arch/usermode/usermode/machdep.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r ac04b4afe068 -r 0c168840a8f3 sys/arch/usermode/usermode/machdep.c
--- a/sys/arch/usermode/usermode/machdep.c Mon Dec 26 21:06:42 2011 +0000
+++ b/sys/arch/usermode/usermode/machdep.c Mon Dec 26 21:22:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.44 2011/12/26 21:06:42 jmcneill Exp $ */
+/* $NetBSD: machdep.c,v 1.45 2011/12/26 21:22:23 jmcneill Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -38,7 +38,7 @@
#include "opt_sdl.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2011/12/26 21:06:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2011/12/26 21:22:23 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -73,6 +73,20 @@
void main(int argc, char *argv[]);
void usermode_reboot(void);
+static void
+usage(const char *pn)
+{
+ printf("usage: %s [-acdqsvxz]"
+ " [tap=<dev>,<eaddr>]"
+ " [audio=<dev>]"
+ " [<fsimg>]\n",
+ pn);
+ printf(" (ex. \"%s"
+ " tap=tap0,00:00:be:ef:ca:fe"
+ " audio=audio0"
+ " root.fs\")\n", pn);
+}
+
void
main(int argc, char *argv[])
{
@@ -141,8 +155,7 @@
BOOT_FLAG(argv[i][j], r);
if (r == 0) {
printf("-%c: unknown flag\n", argv[i][j]);
- printf("usage: %s [-acdqsvxz]\n", argv[0]);
- printf(" (ex. \"%s -s\")\n", argv[0]);
+ usage(argv[0]);
return;
}
tmpopt |= r;
Home |
Main Index |
Thread Index |
Old Index