iio-buffer-utils: Print error when reading from device fails

Rather than just "Failed to read float from...", also print the
errno so can start taking guesses at what the problem is.
This commit is contained in:
Bastien Nocera
2017-09-06 10:21:52 +02:00
parent 401d59e54b
commit 8e994daa3b

View File

@@ -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);