]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix writeisofs lseek() usage (Bug#311, reported by John Peace
authorDavid van Moolenbroek <david@minix3.org>
Thu, 1 Oct 2009 16:56:46 +0000 (16:56 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 1 Oct 2009 16:56:46 +0000 (16:56 +0000)
commands/simple/writeisofs.c

index d0ffd8996354be4f859c88d014cc4083716b677c..1274cfe9fd5bb3f255a73427f413e124a03afb72 100644 (file)
@@ -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;
 }