From 2ac8124914445a4351d44fa8dc205745bf462de9 Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Thu, 1 Oct 2009 16:56:46 +0000 Subject: [PATCH] Fix writeisofs lseek() usage (Bug#311, reported by John Peace --- commands/simple/writeisofs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/simple/writeisofs.c b/commands/simple/writeisofs.c index d0ffd8996..1274cfe9f 100644 --- a/commands/simple/writeisofs.c +++ b/commands/simple/writeisofs.c @@ -1072,7 +1072,7 @@ int get_system_type(int fd) unsigned char bootsector[512]; errno= 0; - old_pos= lseek(fd, SEEK_SET, 0); + old_pos= lseek(fd, 0, SEEK_SET); if (old_pos == -1 && errno != 0) { fprintf(stderr, "bootimage file is not seekable: %s\n", @@ -1106,6 +1106,6 @@ int get_system_type(int fd) exit(1); } - lseek(fd, SEEK_SET, old_pos); + lseek(fd, old_pos, SEEK_SET); return type; }