From 64d9f8173a22cb0ae2b3ebab261aaae9d6c0d04b Mon Sep 17 00:00:00 2001 From: "Geoffrey D. Bennett" Date: Thu, 20 Feb 2025 23:41:36 +1030 Subject: [PATCH] Make perror("fopen") messages distinct --- src/scarlett2-firmware.c | 4 ++-- src/widget-sample-rate.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scarlett2-firmware.c b/src/scarlett2-firmware.c index 9f14263..115bb25 100644 --- a/src/scarlett2-firmware.c +++ b/src/scarlett2-firmware.c @@ -72,7 +72,7 @@ struct scarlett2_firmware_header *scarlett2_read_firmware_header( ) { FILE *file = fopen(fn, "rb"); if (!file) { - perror("fopen"); + perror("fopen firmware header"); fprintf(stderr, "Unable to open %s\n", fn); return NULL; } @@ -91,7 +91,7 @@ struct scarlett2_firmware_header *scarlett2_read_firmware_header( struct scarlett2_firmware_file *scarlett2_read_firmware_file(const char *fn) { FILE *file = fopen(fn, "rb"); if (!file) { - perror("fopen"); + perror("fopen firmware file"); fprintf(stderr, "Unable to open %s\n", fn); return NULL; } diff --git a/src/widget-sample-rate.c b/src/widget-sample-rate.c index 7d88a74..3224b21 100644 --- a/src/widget-sample-rate.c +++ b/src/widget-sample-rate.c @@ -46,7 +46,7 @@ static int get_sample_rate(struct sample_rate *data) { FILE *file = fopen(data->path, "r"); if (!file) { - perror("fopen"); + perror("fopen /proc/asound/cardN/stream0"); return 0; }