all: Check for return value of lseek
This commit is contained in:
1 parent
1ee86c05f4
commit
b7f80de25d
5 files changed
+47
-9
No files matched your search
+4
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user