summaryrefslogtreecommitdiff
path: root/misc/parchive/patches/patch-ab
blob: 1a36b9982aa3be050ab2ca6b765431206be70a81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
$NetBSD: patch-ab,v 1.1 2002/01/04 21:40:59 fredb Exp $

--- main.c.orig	Sat Nov 17 13:29:48 2001
+++ main.c
@@ -28,14 +28,20 @@
 int
 usage(void)
 {
+#ifdef KNOW_NAME
+	extern char *__progname;
+#else
+	char progname[] = "par";
+#endif
+
 	printf(
 "Usage:\n"
-"   par c(heck)   [options] <par file>         : Check parity archive\n"
-"   par r(ecover) [options] <par file>         : Restore missing volumes\n"
-"   par a(dd)     [options] <par file> [files] : Add files to parity archive\n"
+"   %s c(heck)   [options] <par file>         : Check parity archive\n"
+"   %s r(ecover) [options] <par file>         : Restore missing volumes\n"
+"   %s a(dd)     [options] <par file> [files] : Add files to parity archive\n"
 " Advanced:\n"
-"   par m(ix)     [options] : Try to restore from all parity files at once\n"
-"   par i(nteractive) [<par files>] : Interactive mode (very bare-bones)\n"
+"   %s m(ix)     [options] : Try to restore from all parity files at once\n"
+"   %s i(nteractive) [<par files>] : Interactive mode (very bare-bones)\n"
 "\n"
 "Options: (Can be turned off with '+')\n"
 "    -m   : Move existing files out of the way\n"
@@ -52,8 +58,12 @@
 "    -v,+v: Increase or decrease verbosity\n"
 "    -h,-?: Display this help\n"
 "    --   : Always treat following arguments as files\n"
-"\n"
-	);
+"\n",
+#ifdef KNOW_NAME
+	__progname, __progname, __progname, __progname, __progname);
+#else
+	progname, progname, progname, progname, progname);
+#endif
 	return 0;
 }