All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos
@ 2011-12-05 10:55 Horst Kronstorfer
  2011-12-05 10:55 ` [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling Horst Kronstorfer
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Horst Kronstorfer @ 2011-12-05 10:55 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
 tools/mkenvimage.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 9c32f4a..b7b0e0f 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -116,7 +116,7 @@ int main(int argc, char **argv)
 	/* Check datasize and allocate the data */
 	if (datasize == 0) {
 		fprintf(stderr,
-			"Please specify the size of the envrionnment "
+			"Please specify the size of the environment "
 			"partition.\n");
 		usage(argv[0]);
 		return EXIT_FAILURE;
@@ -182,12 +182,12 @@ int main(int argc, char **argv)
 		ret = close(txt_fd);
 	}
 	/*
-	 * The right test to do is "=>" (not ">") because of the additionnal
+	 * The right test to do is "=>" (not ">") because of the additional
 	 * ending \0. See below.
 	 */
 	if (filesize >= envsize) {
 		fprintf(stderr, "The input file is larger than the "
-				"envrionnment partition size\n");
+				"environment partition size\n");
 		return EXIT_FAILURE;
 	}
 
@@ -196,7 +196,7 @@ int main(int argc, char **argv)
 		if (filebuf[fp] == '\n') {
 			if (fp == 0) {
 				/*
-				 * Newline at the beggining of the file ?
+				 * Newline at the beginning of the file ?
 				 * Ignore it.
 				 */
 				continue;
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling
  2011-12-05 10:55 [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Horst Kronstorfer
@ 2011-12-05 10:55 ` Horst Kronstorfer
  2011-12-20 22:51   ` Wolfgang Denk
  2011-12-05 10:55 ` [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage() Horst Kronstorfer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Horst Kronstorfer @ 2011-12-05 10:55 UTC (permalink / raw)
  To: u-boot

Since the original implementation indicates explicit error handling
we turn off getopt()'s internal error messaging to avoid duplicate
error messages.  Additionally we add ':' (missing option argument)
error handling.

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
 tools/mkenvimage.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index b7b0e0f..22d1b88 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -80,8 +80,11 @@ int main(int argc, char **argv)
 
 	int fp, ep;
 
+	/* Turn off getopt()'s internal error message */
+	opterr = 0;
+
 	/* Parse the cmdline */
-	while ((option = getopt(argc, argv, "s:o:rbp:h")) != -1) {
+	while ((option = getopt(argc, argv, ":s:o:rbp:h")) != -1) {
 		switch (option) {
 		case 's':
 			datasize = strtol(optarg, NULL, 0);
@@ -106,8 +109,13 @@ int main(int argc, char **argv)
 		case 'h':
 			usage(argv[0]);
 			return EXIT_SUCCESS;
+		case ':':
+			fprintf(stderr, "Missing argument for option -%c\n",
+				optopt);
+			usage(argv[0]);
+			return EXIT_FAILURE;
 		default:
-			fprintf(stderr, "Wrong option -%c\n", option);
+			fprintf(stderr, "Wrong option -%c\n", optopt);
 			usage(argv[0]);
 			return EXIT_FAILURE;
 		}
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage()
  2011-12-05 10:55 [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Horst Kronstorfer
  2011-12-05 10:55 ` [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling Horst Kronstorfer
@ 2011-12-05 10:55 ` Horst Kronstorfer
  2011-12-20 22:53   ` Wolfgang Denk
  2011-12-21 12:05   ` [U-Boot] [PATCH v2] " Horst Kronstorfer
  2011-12-05 10:55 ` [U-Boot] [PATCH 4/4] mkenvimage: Add version info switch (-V) Horst Kronstorfer
  2011-12-20 22:51 ` [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Wolfgang Denk
  3 siblings, 2 replies; 13+ messages in thread
From: Horst Kronstorfer @ 2011-12-05 10:55 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
 tools/mkenvimage.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 22d1b88..3e7f967 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -79,6 +79,11 @@ int main(int argc, char **argv)
 	struct stat txt_file_stat;
 
 	int fp, ep;
+	const char *prg;
+
+	/* Parse program basename */
+	prg = strrchr(argv[0], '/');
+	prg = (prg) ? prg + 1 : argv[0];
 
 	/* Turn off getopt()'s internal error message */
 	opterr = 0;
@@ -107,16 +112,16 @@ int main(int argc, char **argv)
 			padbyte = strtol(optarg, NULL, 0);
 			break;
 		case 'h':
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_SUCCESS;
 		case ':':
 			fprintf(stderr, "Missing argument for option -%c\n",
 				optopt);
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 		default:
 			fprintf(stderr, "Wrong option -%c\n", optopt);
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 		}
 	}
@@ -126,7 +131,7 @@ int main(int argc, char **argv)
 		fprintf(stderr,
 			"Please specify the size of the environment "
 			"partition.\n");
-		usage(argv[0]);
+		usage(prg);
 		return EXIT_FAILURE;
 	}
 
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/4] mkenvimage: Add version info switch (-V)
  2011-12-05 10:55 [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Horst Kronstorfer
  2011-12-05 10:55 ` [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling Horst Kronstorfer
  2011-12-05 10:55 ` [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage() Horst Kronstorfer
@ 2011-12-05 10:55 ` Horst Kronstorfer
  2011-12-20 22:54   ` Wolfgang Denk
  2011-12-20 22:51 ` [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Wolfgang Denk
  3 siblings, 1 reply; 13+ messages in thread
From: Horst Kronstorfer @ 2011-12-05 10:55 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
 tools/mkenvimage.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 3e7f967..046661d 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -36,6 +36,7 @@
 #include <sys/stat.h>
 
 #include <u-boot/crc.h>
+#include <version.h>
 
 #define CRC_SIZE sizeof(uint32_t)
 
@@ -56,6 +57,7 @@ static void usage(const char *exec_name)
 	       "\t-b : the target is big endian (default is little endian)\n"
 	       "\t-p <byte> : fill the image with <byte> bytes instead of "
 	       "0xff bytes\n"
+	       "\t-V : print version information and exit\n"
 	       "\n"
 	       "If the input file is \"-\", data is read from standard input\n",
 	       exec_name);
@@ -89,7 +91,7 @@ int main(int argc, char **argv)
 	opterr = 0;
 
 	/* Parse the cmdline */
-	while ((option = getopt(argc, argv, ":s:o:rbp:h")) != -1) {
+	while ((option = getopt(argc, argv, ":s:o:rbp:hV")) != -1) {
 		switch (option) {
 		case 's':
 			datasize = strtol(optarg, NULL, 0);
@@ -114,6 +116,9 @@ int main(int argc, char **argv)
 		case 'h':
 			usage(prg);
 			return EXIT_SUCCESS;
+		case 'V':
+			printf("%s version %s\n", prg, PLAIN_VERSION);
+			return EXIT_SUCCESS;
 		case ':':
 			fprintf(stderr, "Missing argument for option -%c\n",
 				optopt);
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos
  2011-12-05 10:55 [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Horst Kronstorfer
                   ` (2 preceding siblings ...)
  2011-12-05 10:55 ` [U-Boot] [PATCH 4/4] mkenvimage: Add version info switch (-V) Horst Kronstorfer
@ 2011-12-20 22:51 ` Wolfgang Denk
  3 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-20 22:51 UTC (permalink / raw)
  To: u-boot

Dear Horst Kronstorfer,

In message <1323082526-2125-1-git-send-email-hkronsto@frequentis.com> you wrote:
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
>  tools/mkenvimage.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Genius doesn't work on an assembly line basis.  You can't simply say,
"Today I will be brilliant."
	-- Kirk, "The Ultimate Computer", stardate 4731.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling
  2011-12-05 10:55 ` [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling Horst Kronstorfer
@ 2011-12-20 22:51   ` Wolfgang Denk
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-20 22:51 UTC (permalink / raw)
  To: u-boot

Dear Horst Kronstorfer,

In message <1323082526-2125-2-git-send-email-hkronsto@frequentis.com> you wrote:
> Since the original implementation indicates explicit error handling
> we turn off getopt()'s internal error messaging to avoid duplicate
> error messages.  Additionally we add ':' (missing option argument)
> error handling.
> 
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
>  tools/mkenvimage.c |   12 ++++++++++--
>  1 files changed, 10 insertions(+), 2 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Whom the gods would destroy, they first teach BASIC.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage()
  2011-12-05 10:55 ` [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage() Horst Kronstorfer
@ 2011-12-20 22:53   ` Wolfgang Denk
       [not found]     ` <024FE3275EF7814D9B07390F28C0832C63A240F5@vie196nt.frequentis.frq>
  2011-12-21 12:05   ` [U-Boot] [PATCH v2] " Horst Kronstorfer
  1 sibling, 1 reply; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-20 22:53 UTC (permalink / raw)
  To: u-boot

Dear Horst Kronstorfer,

In message <1323082526-2125-3-git-send-email-hkronsto@frequentis.com> you wrote:
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
>  tools/mkenvimage.c |   13 +++++++++----
>  1 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
> index 22d1b88..3e7f967 100644
> --- a/tools/mkenvimage.c
> +++ b/tools/mkenvimage.c
> @@ -79,6 +79,11 @@ int main(int argc, char **argv)
>  	struct stat txt_file_stat;
>  
>  	int fp, ep;
> +	const char *prg;
> +
> +	/* Parse program basename */
> +	prg = strrchr(argv[0], '/');
> +	prg = (prg) ? prg + 1 : argv[0];

Any reason for not using basename() here?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The manager will be continually amazed that policies he took for com-
mon knowledge are totally unknown by some member of his  team.  Since
his fundamental job is to keep everybody going in the same direction,
his chief daily task will be communication, not decision-making.
                              - Fred Brooks, "The Mythical Man Month"

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/4] mkenvimage: Add version info switch (-V)
  2011-12-05 10:55 ` [U-Boot] [PATCH 4/4] mkenvimage: Add version info switch (-V) Horst Kronstorfer
@ 2011-12-20 22:54   ` Wolfgang Denk
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-20 22:54 UTC (permalink / raw)
  To: u-boot

Dear Horst Kronstorfer,

In message <1323082526-2125-4-git-send-email-hkronsto@frequentis.com> you wrote:
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
>  tools/mkenvimage.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q:  Why do mountain climbers rope themselves together?
A:  To prevent the sensible ones from going home.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage()
       [not found]     ` <024FE3275EF7814D9B07390F28C0832C63A240F5@vie196nt.frequentis.frq>
@ 2011-12-21 10:49       ` Wolfgang Denk
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-21 10:49 UTC (permalink / raw)
  To: u-boot

Dear KRONSTORFER Horst,

In message <024FE3275EF7814D9B07390F28C0832C63A240F5@vie196nt.frequentis.frq> you wrote:
>
> > > +	/* Parse program basename */
> > > +	prg = strrchr(argv[0], '/');
> > > +	prg = (prg) ? prg + 1 : argv[0];
> > 
> > Any reason for not using basename() here?
> 
> i'm just used to not using basename() ... do you want an updated patch?

Yes, please.  Using available standard functions is always better than
reinventing the wheel.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Unix is supported by IBM, like a hanging man is supported by rope.
		        - Don Libes & Sandy Ressler: _Life With Unix_

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v2] Print program basename instead of whole path in usage()
  2011-12-05 10:55 ` [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage() Horst Kronstorfer
  2011-12-20 22:53   ` Wolfgang Denk
@ 2011-12-21 12:05   ` Horst Kronstorfer
  2011-12-21 19:32     ` Wolfgang Denk
  2011-12-21 20:39     ` [U-Boot] [PATCH, v3] " Horst Kronstorfer
  1 sibling, 2 replies; 13+ messages in thread
From: Horst Kronstorfer @ 2011-12-21 12:05 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
Changes for v2:
   - Use the GNU version of basename().
   - Rebased against branch 'next.'

 tools/mkenvimage.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 753d9e6..6a6a392 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -25,6 +25,9 @@
  * MA 02111-1307 USA
  */
 
+/* We want the GNU version of basename() */
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -81,6 +84,9 @@ int main(int argc, char **argv)
 	struct stat txt_file_stat;
 
 	int fp, ep;
+	const char *prg;
+
+	prg = basename(argv[0]);
 
 	/* Turn off getopt()'s internal error message */
 	opterr = 0;
@@ -109,7 +115,7 @@ int main(int argc, char **argv)
 			padbyte = strtol(optarg, NULL, 0);
 			break;
 		case 'h':
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_SUCCESS;
 		case 'V':
 			printf("%s version %s\n", prg, PLAIN_VERSION);
@@ -117,11 +123,11 @@ int main(int argc, char **argv)
 		case ':':
 			fprintf(stderr, "Missing argument for option -%c\n",
 				optopt);
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 		default:
 			fprintf(stderr, "Wrong option -%c\n", optopt);
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 		}
 	}
@@ -131,7 +137,7 @@ int main(int argc, char **argv)
 		fprintf(stderr,
 			"Please specify the size of the environment "
 			"partition.\n");
-		usage(argv[0]);
+		usage(prg);
 		return EXIT_FAILURE;
 	}
 
-- 
1.7.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v2] Print program basename instead of whole path in usage()
  2011-12-21 12:05   ` [U-Boot] [PATCH v2] " Horst Kronstorfer
@ 2011-12-21 19:32     ` Wolfgang Denk
  2011-12-21 20:39     ` [U-Boot] [PATCH, v3] " Horst Kronstorfer
  1 sibling, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-21 19:32 UTC (permalink / raw)
  To: u-boot

Dear Horst Kronstorfer,

In message <1324469157-18032-1-git-send-email-hkronsto@frequentis.com> you wrote:
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
> Changes for v2:
>    - Use the GNU version of basename().
>    - Rebased against branch 'next.'
> 
>  tools/mkenvimage.c |   14 ++++++++++----
>  1 files changed, 10 insertions(+), 4 deletions(-)

This does not apply cleanly against current master:

Applying: Print program basename instead of whole path in usage()
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging tools/mkenvimage.c
CONFLICT (content): Merge conflict in tools/mkenvimage.c
Failed to merge in the changes.
Patch failed at 0001 Print program basename instead of whole path in
usage()


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If all you have is a hammer, everything looks like a nail.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH, v3] Print program basename instead of whole path in usage()
  2011-12-21 12:05   ` [U-Boot] [PATCH v2] " Horst Kronstorfer
  2011-12-21 19:32     ` Wolfgang Denk
@ 2011-12-21 20:39     ` Horst Kronstorfer
  2011-12-22  8:09       ` Wolfgang Denk
  1 sibling, 1 reply; 13+ messages in thread
From: Horst Kronstorfer @ 2011-12-21 20:39 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
Changes for v2:
   - Use the GNU version of basename().
   - Rebase against branch 'next.'
Changes for v3:
   - Rebase against branch 'master.'

 tools/mkenvimage.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 9c32f4a..3bb471d 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -25,6 +25,9 @@
  * MA 02111-1307 USA
  */
 
+/* We want the GNU version of basename() */
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -79,6 +82,9 @@ int main(int argc, char **argv)
 	struct stat txt_file_stat;
 
 	int fp, ep;
+	const char *prg;
+
+	prg = basename(argv[0]);
 
 	/* Parse the cmdline */
 	while ((option = getopt(argc, argv, "s:o:rbp:h")) != -1) {
@@ -104,11 +110,11 @@ int main(int argc, char **argv)
 			padbyte = strtol(optarg, NULL, 0);
 			break;
 		case 'h':
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_SUCCESS;
 		default:
 			fprintf(stderr, "Wrong option -%c\n", option);
-			usage(argv[0]);
+			usage(prg);
 			return EXIT_FAILURE;
 		}
 	}
@@ -118,7 +124,7 @@ int main(int argc, char **argv)
 		fprintf(stderr,
 			"Please specify the size of the envrionnment "
 			"partition.\n");
-		usage(argv[0]);
+		usage(prg);
 		return EXIT_FAILURE;
 	}
 
-- 
1.7.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH, v3] Print program basename instead of whole path in usage()
  2011-12-21 20:39     ` [U-Boot] [PATCH, v3] " Horst Kronstorfer
@ 2011-12-22  8:09       ` Wolfgang Denk
  0 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2011-12-22  8:09 UTC (permalink / raw)
  To: u-boot

Dear Horst Kronstorfer,

In message <1324499979-4978-1-git-send-email-hkronsto@frequentis.com> you wrote:
> Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
> ---
> Changes for v2:
>    - Use the GNU version of basename().
>    - Rebase against branch 'next.'
> Changes for v3:
>    - Rebase against branch 'master.'
> 
>  tools/mkenvimage.c |   12 +++++++++---
>  1 files changed, 9 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It all seemed, he thought, to be rather a lot of  trouble  to  go  to
just sharpen a razor blade.  - Terry Pratchett, _The Light Fantastic_

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-12-22  8:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05 10:55 [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Horst Kronstorfer
2011-12-05 10:55 ` [U-Boot] [PATCH 2/4] mkenvimage: Fix getopt() error handling Horst Kronstorfer
2011-12-20 22:51   ` Wolfgang Denk
2011-12-05 10:55 ` [U-Boot] [PATCH 3/4] mkenvimage: Print program basename instead of whole path in usage() Horst Kronstorfer
2011-12-20 22:53   ` Wolfgang Denk
     [not found]     ` <024FE3275EF7814D9B07390F28C0832C63A240F5@vie196nt.frequentis.frq>
2011-12-21 10:49       ` Wolfgang Denk
2011-12-21 12:05   ` [U-Boot] [PATCH v2] " Horst Kronstorfer
2011-12-21 19:32     ` Wolfgang Denk
2011-12-21 20:39     ` [U-Boot] [PATCH, v3] " Horst Kronstorfer
2011-12-22  8:09       ` Wolfgang Denk
2011-12-05 10:55 ` [U-Boot] [PATCH 4/4] mkenvimage: Add version info switch (-V) Horst Kronstorfer
2011-12-20 22:54   ` Wolfgang Denk
2011-12-20 22:51 ` [U-Boot] [PATCH 1/4] mkenvimage: Fix some typos Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.