Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Commit

Permalink
iio-buffer-utils: Print error when reading from device fails
Browse files Browse the repository at this point in the history
Rather than just "Failed to read float from...", also print the
errno so can start taking guesses at what the problem is.
  • Loading branch information
hadess committed Sep 6, 2017
1 parent 401d59e commit 8e994da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iio-buffer-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ iioutils_get_param_float (float *output,
} else {
ret = -errno;
if (ret != -ENOENT)
g_warning ("Failed to read float from %s", filename);
g_warning ("Failed to read float from %s: %s", filename, g_strerror (-ret));
}

g_free (filename);
Expand Down

0 comments on commit 8e994da

Please sign in to comment.