Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/stand/newdisk - use getprogname() instead of a...
details: https://anonhg.NetBSD.org/src/rev/3aab97386b0a
branches: trunk
changeset: 764618:3aab97386b0a
user: isaki <isaki%NetBSD.org@localhost>
date: Fri Apr 29 05:59:53 2011 +0000
description:
- use getprogname() instead of argv[0]
- remove an extra decl. of optind
diffstat:
sys/arch/x68k/stand/newdisk/newdisk.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 25e7d019f043 -r 3aab97386b0a sys/arch/x68k/stand/newdisk/newdisk.c
--- a/sys/arch/x68k/stand/newdisk/newdisk.c Fri Apr 29 05:43:51 2011 +0000
+++ b/sys/arch/x68k/stand/newdisk/newdisk.c Fri Apr 29 05:59:53 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: newdisk.c,v 1.6 2011/04/29 05:43:51 isaki Exp $ */
+/* $NetBSD: newdisk.c,v 1.7 2011/04/29 05:59:53 isaki Exp $ */
/*-
* Copyright (c) 1999 Minoura Makoto
@@ -48,7 +48,6 @@
#include <sys/disklabel.h>
#include <sys/dkio.h>
-char *prog;
char *mboot = MBOOT;
char dev[MAXPATHLEN];
char buf[4096 + 1];
@@ -65,7 +64,7 @@
{
fprintf(stderr,
"Usage: %s [-v] [-n] [-f] [-c] [-m /usr/mdec/mboot] "
- "/dev/rsdXc\n", prog);
+ "/dev/rsdXc\n", getprogname());
exit(1);
/* NOTREACHED */
}
@@ -73,12 +72,10 @@
int
main(int argc, char *argv[])
{
- extern int optind;
int ch;
int fd;
struct disklabel label;
- prog = argv[0];
while ((ch = getopt(argc, argv, "vnfcm:p")) != -1) {
switch (ch) {
case 'v':
Home |
Main Index |
Thread Index |
Old Index