All of lore.kernel.org
 help / color / mirror / Atom feed
* dtc: Change exit code for usage message
@ 2008-03-18  3:04 David Gibson
  0 siblings, 0 replies; only message in thread
From: David Gibson @ 2008-03-18  3:04 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

If dtc's command line arguments are invalid, it prints a usage message
and returns exit code 2.  That's the same exit code as for a failed
check, which is potentially confusing if running dtc from an automated
harness.  Therefore this patch changes the usage exit code to 3.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/dtc.c
===================================================================
--- dtc.orig/dtc.c	2008-03-18 14:02:42.000000000 +1100
+++ dtc/dtc.c	2008-03-18 14:02:46.000000000 +1100
@@ -106,7 +106,7 @@ static void  __attribute__ ((noreturn)) 
 	fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n");
 	fprintf(stderr, "\t-v\n");
 	fprintf(stderr, "\t\tPrint DTC version and exit\n");
-	exit(2);
+	exit(3);
 }
 
 int main(int argc, char *argv[])

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-18  3:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18  3:04 dtc: Change exit code for usage message David Gibson

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.