All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alsaucm: exit when user wants 'help' and 'version'
@ 2011-08-19  6:00 Lu Guanqun
  2011-08-19 12:30 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Lu Guanqun @ 2011-08-19  6:00 UTC (permalink / raw)
  To: ALSA, Liam Girdwood, Jaroslav Kysela

When user specifies option 'help' or 'version', the program exists immediately.
This is more expected way than the current one.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
---
 alsaucm/usecase.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/alsaucm/usecase.c b/alsaucm/usecase.c
index 1c94680..14a4be0 100644
--- a/alsaucm/usecase.c
+++ b/alsaucm/usecase.c
@@ -395,10 +395,10 @@ int main(int argc, char *argv[])
 		switch (c) {
 		case 'h':
 			dump_help(context);
-			break;
+			my_exit(context, EXIT_SUCCESS);
 		case OPT_VERSION:
 			printf("%s: version " SND_UTIL_VERSION_STR "\n", command);
-			break;
+			my_exit(context, EXIT_SUCCESS);
 		case 'c':
 			if (context->card)
 				free(context->card);

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

end of thread, other threads:[~2011-08-19 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19  6:00 [PATCH] alsaucm: exit when user wants 'help' and 'version' Lu Guanqun
2011-08-19 12:30 ` Liam Girdwood

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.