summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2015-09-07 11:32:05 +0100
committerThomas Wood <thomas.wood@intel.com>2015-09-08 16:15:16 +0100
commit1dcace30184c812f1e12ee10cc827accce140cc0 (patch)
tree97fcb91aa25b376a6ae320529da8c7785799a14c /lib/igt_aux.c
parentf0381d1abebfc5b7e24a835dfe1c2344396c0304 (diff)
build: fix unused-result warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r--lib/igt_aux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index c26d167d..e77392cd 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -767,8 +767,12 @@ static void igt_module_param_exit_handler(int sig)
fd = open(file_path, O_RDWR);
if (fd >= 0) {
- write(fd, data->original_value,
- strlen(data->original_value));
+ int size = strlen (data->original_value);
+
+ if (size != write(fd, data->original_value, size))
+ igt_warn("%s may not have been reset to its"
+ " original value\n", file_path);
+
close(fd);
}
}