Make perror("fopen") messages distinct
This commit is contained in:
@@ -72,7 +72,7 @@ struct scarlett2_firmware_header *scarlett2_read_firmware_header(
|
|||||||
) {
|
) {
|
||||||
FILE *file = fopen(fn, "rb");
|
FILE *file = fopen(fn, "rb");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
perror("fopen");
|
perror("fopen firmware header");
|
||||||
fprintf(stderr, "Unable to open %s\n", fn);
|
fprintf(stderr, "Unable to open %s\n", fn);
|
||||||
return NULL;
|
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) {
|
struct scarlett2_firmware_file *scarlett2_read_firmware_file(const char *fn) {
|
||||||
FILE *file = fopen(fn, "rb");
|
FILE *file = fopen(fn, "rb");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
perror("fopen");
|
perror("fopen firmware file");
|
||||||
fprintf(stderr, "Unable to open %s\n", fn);
|
fprintf(stderr, "Unable to open %s\n", fn);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ static int get_sample_rate(struct sample_rate *data) {
|
|||||||
|
|
||||||
FILE *file = fopen(data->path, "r");
|
FILE *file = fopen(data->path, "r");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
perror("fopen");
|
perror("fopen /proc/asound/cardN/stream0");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user