From 478835401ecf44391a3b32cfa178b1d56bde1c11 Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Tue, 2 Jun 2015 22:24:41 -0700 Subject: [PATCH] pcspkr piano should exit if it can't open spkr [ci skip] --- userspace/extra/piano.c | 1 + 1 file changed, 1 insertion(+) diff --git a/userspace/extra/piano.c b/userspace/extra/piano.c index 48ff1b98..9ff7cfaa 100644 --- a/userspace/extra/piano.c +++ b/userspace/extra/piano.c @@ -39,6 +39,7 @@ int main(int argc, char * argv[]) { spkr = open("/dev/spkr", O_WRONLY); if (spkr == -1) { fprintf(stderr, "%s: could not open speaker\n", argv[0]); + return 1; } set_unbuffered();