iio-buffer-utils: Don't throw warnings on ENOENT

As we don't return when the file doesn't exist, don't print a warning
either, as this would pollute logs and throw people off when debugging
real problems.

Closes: #180
This commit is contained in:
Bastien Nocera
2017-08-16 16:52:23 +02:00
parent 20c41c1126
commit d0ced55668

View File

@@ -177,7 +177,8 @@ iioutils_get_param_float (float *output,
fclose (sysfsfp);
} else {
ret = -errno;
g_warning ("Failed to read float from %s", filename);
if (ret != -ENOENT)
g_warning ("Failed to read float from %s", filename);
}
g_free (filename);