Merge branch 'pathbased' of ssh://terminus.zytor.com/pub/git/syslinux/syslinux into...
[profile/ivi/syslinux.git] / extlinux / main.c
index a4b81cd..6ce3b60 100644 (file)
@@ -41,18 +41,8 @@ typedef uint64_t u64;
 #include <sys/mount.h>
 #include <sys/vfs.h>
 
-#include <linux/fd.h>          /* Floppy geometry */
-#include <linux/hdreg.h>       /* Hard disk geometry */
-#define statfs _kernel_statfs  /* HACK to deal with broken 2.4 distros */
-#include <linux/fs.h>          /* FIGETBSZ, FIBMAP */
-#include <linux/msdos_fs.h>    /* FAT_IOCTL_SET_ATTRIBUTES */
-#ifndef FAT_IOCTL_SET_ATTRIBUTES
-# define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, uint32_t)
-#endif
-#undef statfs
-#undef SECTOR_SIZE             /* Garbage from <linux/msdos_fs.h> */
+#include "linuxioctl.h"
 
-#include "ext2_fs.h"
 #include "btrfs.h"
 #include "fat.h"
 #include "../version.h"
@@ -198,7 +188,7 @@ int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo)
  * Generate sector extents
  */
 static void generate_extents(struct syslinux_extent *ex, int nptrs,
-                            sector_t *sectp, int nsect)
+                            const sector_t *sectp, int nsect)
 {
     uint32_t addr = 0x7c00 + 2*SECTOR_SIZE;
     uint32_t base;
@@ -222,7 +212,6 @@ static void generate_extents(struct syslinux_extent *ex, int nptrs,
        if (len) {
            set_64(&ex->lba, lba);
            set_16(&ex->len, len);
-           printf("EXTENT: %11lu / %5u\n", lba, len);
            ex++;
        }
 
@@ -238,7 +227,6 @@ static void generate_extents(struct syslinux_extent *ex, int nptrs,
     if (len) {
        set_64(&ex->lba, lba);
        set_16(&ex->len, len);
-       printf("EXTENT: %11lu / %5u\n", lba, len);
        ex++;
     }
 }