all: Check for return value of lseek

This commit is contained in:
Pali Rohár committed 2016-01-10 14:29:18 +01:00
1 parent 1ee86c05f4
commit b7f80de25d
5 files changed
+47 -9

No files matched your search

+4 -1
View File
@@ -185,7 +185,10 @@ int disk_dump_dev(int fd, const char * file) {
return -1;
}
lseek(fd, 0, SEEK_SET);
if ( lseek(fd, 0, SEEK_SET) == (off_t)-1 ) {
ERROR_INFO("Cannot seek to begin of block device");
return -1;
}
#endif