aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-10-02 11:22:38 -0400
committerTaylor Holberton <taylorcholberton@gmail.com>2016-10-02 11:22:38 -0400
commitf168b1218dfd60c4ad8463b6dd6c6bd80860da38 (patch)
treec1277dfda8e559f1239ab88287f9b679e0b20460 /utils
parentd60ba43115107c54ad2755bde8cd118554212cca (diff)
added error if -i file-type doesn't make sense
Diffstat (limited to 'utils')
-rw-r--r--utils/tinyplay.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/tinyplay.c b/utils/tinyplay.c
index cca8223..1c4e23f 100644
--- a/utils/tinyplay.c
+++ b/utils/tinyplay.c
@@ -146,6 +146,12 @@ int main(int argc, char **argv)
if (*argv) {
if (strcasecmp(*argv, "raw") == 0) {
is_raw = 1;
+ } else if (strcasecmp(*argv, "wav") == 0) {
+ is_raw = 0;
+ } else {
+ fprintf(stderr, "Error: file type '%s' not supported\n", *argv);
+ fclose(file);
+ return 1;
}
}
}