Changeset b0ac906b283b428ba1c7f35fe1e71a84b3d3d9c6 for linux
- Timestamp:
- 09/07/11 07:19:05 (9 months ago)
- Children:
- 045bc5cd1118fee51b19d89dc316038c8a93e5bf
- Parents:
- 67954e370003d9bbfd8b58042669f2e9d532636f
- git-author:
- Paulo Alcantara <pcacjr@gmail.com> / 2011-07-05T21:32:51Z+0000
- git-committer:
- Paulo Alcantara <pcacjr@gmail.com> / 2011-09-07T07:19:05Z+0000
- Location:
- linux
- Files:
-
- 2 modified
-
Makefile (modified) (2 diffs)
-
syslinux.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linux/Makefile
r261317 rb0ac90 12 12 13 13 ## 14 ## Linux FAT installer14 ## Linux FAT/NTFS installer 15 15 ## 16 16 … … 29 29 ../libinstaller/setadv.c \ 30 30 ../libinstaller/advio.c \ 31 ../libinstaller/f at.c \31 ../libinstaller/fs.c \ 32 32 ../libinstaller/syslxmod.c \ 33 33 ../libinstaller/bootsect_bin.c \ -
linux/syslinux.c
rfa6d94 rb0ac90 70 70 #include <sysexits.h> 71 71 #include "syslxcom.h" 72 #include "syslxfs.h" 72 73 #include "setadv.h" 73 74 #include "syslxopt.h" /* unified options */ … … 295 296 } 296 297 297 fs_type = VFAT;298 298 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); 299 299 fsync(dev_fd); 300 300 301 301 /* 302 * Check to see that what we got was indeed an MS-DOS boot sector/superblock 303 */ 304 if ((errmsg = syslinux_check_bootsect(sectbuf))) { 302 * Check to see that what we got was indeed an FAT/NTFS 303 * boot sector/superblock 304 */ 305 if ((errmsg = syslinux_check_bootsect(sectbuf, &fs_type))) { 305 306 fprintf(stderr, "%s: %s\n", opt.device, errmsg); 306 307 exit(1); … … 358 359 } 359 360 360 if (do_mount(dev_fd, &mnt_cookie, mntpath, "vfat") && 361 do_mount(dev_fd, &mnt_cookie, mntpath, "msdos")) { 362 rmdir(mntpath); 363 die("mount failed"); 361 if (fs_type == VFAT) { 362 if (do_mount(dev_fd, &mnt_cookie, mntpath, "vfat") && 363 do_mount(dev_fd, &mnt_cookie, mntpath, "msdos")) { 364 rmdir(mntpath); 365 die("failed on mounting fat volume"); 366 } 367 } else if (fs_type == NTFS) { 368 if (do_mount(dev_fd, &mnt_cookie, mntpath, "ntfs-3g")) { 369 rmdir(mntpath); 370 die("failed on mounting ntfs volume"); 371 } 364 372 } 365 373 … … 475 483 476 484 /* Copy the syslinux code into the boot sector */ 477 syslinux_make_bootsect(sectbuf );485 syslinux_make_bootsect(sectbuf, fs_type); 478 486 479 487 /* Write new boot sector */
