From: David van Moolenbroek Date: Thu, 1 Oct 2009 16:56:46 +0000 (+0000) Subject: Fix writeisofs lseek() usage (Bug#311, reported by John Peace X-Git-Tag: v3.1.5~48 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.host.html?a=commitdiff_plain;h=2ac8124914445a4351d44fa8dc205745bf462de9;p=minix.git Fix writeisofs lseek() usage (Bug#311, reported by John Peace --- 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; }