[alsa-devel] [PATCH 04/11] ucm: implement basic script exec functionality

Liam Girdwood lrg at slimlogic.co.uk
Tue Dec 21 23:11:53 CET 2010


Signed-off-by: Liam Girdwood <lrg at slimlogic.co.uk>
---
 src/ucm/main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/ucm/main.c b/src/ucm/main.c
index ecf07f9..64e4279 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -265,7 +265,9 @@ static int execute_sequence(snd_use_case_mgr_t *uc_mgr,
 			usleep(s->data.sleep);
 			break;
 		case SEQUENCE_ELEMENT_TYPE_EXEC:
-			uc_error("exec not yet implemented: '%s'", s->data.exec);
+			err = system(s->data.exec);
+			if (err < 0)
+				goto __fail;
 			break;
 		default:
 			uc_error("unknown sequence command %i", s->type);
-- 
1.7.1



More information about the Alsa-devel mailing list