summaryrefslogtreecommitdiffstats
path: root/src/disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/disk.c')
-rw-r--r--src/disk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/disk.c b/src/disk.c
index 7370f13..f8a51f8 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -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