aboutsummaryrefslogtreecommitdiff
path: root/misc-utils/ftl_check.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-11-25 18:30:41 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-12-06 19:38:16 +0100
commitbfb33f2f46a40023aa9820f4cdd99281e41250c1 (patch)
tree148d0f16e4936218b4d3f89a2ee45d8c12bcfb6b /misc-utils/ftl_check.c
parentb2a9601cebb67db9e02ac7bbd927a21aa95f5ba3 (diff)
common: Fix 'unchecked return code' warnings
Several tools are simply not checking return code of functions marked with 'warn_unused_result'. Provide wrappers for the read/write functions to avoid patching old code and providing proper error handling. Fix the remaining ones (calls to fgets() and system()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'misc-utils/ftl_check.c')
-rw-r--r--misc-utils/ftl_check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/ftl_check.c b/misc-utils/ftl_check.c
index d7d2e8b..970d968 100644
--- a/misc-utils/ftl_check.c
+++ b/misc-utils/ftl_check.c
@@ -95,7 +95,7 @@ static void check_partition(int fd)
perror("seek failed");
break;
}
- read(fd, &hdr, sizeof(hdr));
+ read_nocheck(fd, &hdr, sizeof(hdr));
if ((le32_to_cpu(hdr.FormattedSize) > 0) &&
(le32_to_cpu(hdr.FormattedSize) <= mtd.size) &&
(le16_to_cpu(hdr.NumEraseUnits) > 0) &&