diff --git a/common/filetype.c b/common/filetype.c index 9ec8ebf..8cfae88 100644 --- a/common/filetype.c +++ b/common/filetype.c @@ -326,7 +326,6 @@ int fd, ret; void *buf; enum filetype type = filetype_unknown; - unsigned long bootsec; fd = open(filename, O_RDONLY); if (fd < 0) @@ -340,21 +339,6 @@ type = file_detect_type(buf, ret); - if (type == filetype_mbr) { - /* - * Get the first partition start sector - * and check for FAT in it - */ - is_fat_or_mbr(buf, &bootsec); - ret = lseek(fd, (bootsec) * 512, SEEK_SET); - if (ret < 0) - goto err_out; - ret = read(fd, buf, 512); - if (ret < 0) - goto err_out; - type = is_fat_or_mbr((u8 *)buf, NULL); - } - err_out: close(fd); free(buf); @@ -380,21 +364,6 @@ type = file_detect_type(buf, ret); - if (type == filetype_mbr) { - unsigned long bootsec; - /* - * Get the first partition start sector - * and check for FAT in it - */ - is_fat_or_mbr(buf, &bootsec); - - ret = cdev_read(cdev, buf, 512, bootsec * 512, 0); - if (ret < 0) - goto err_out; - - type = is_fat_or_mbr((u8 *)buf, NULL); - } - err_out: free(buf); cdev_close(cdev);