Module Name: src
Committed By: jmcneill
Date: Mon Dec 26 21:22:23 UTC 2011
Modified Files:
src/sys/arch/usermode/usermode: machdep.c
Log Message:
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")
To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/usermode/usermode/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/usermode/usermode/machdep.c
diff -u src/sys/arch/usermode/usermode/machdep.c:1.44 src/sys/arch/usermode/usermode/machdep.c:1.45
--- src/sys/arch/usermode/usermode/machdep.c:1.44 Mon Dec 26 21:06:42 2011
+++ src/sys/arch/usermode/usermode/machdep.c Mon Dec 26 21:22:23 2011
@@ -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 <[email protected]>
@@ -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 @@ char *usermode_audio_device = NULL;
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 @@ main(int argc, char *argv[])
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;