search for: get_geometry

Displaying 6 results from an estimated 6 matches for "get_geometry".

2012 Aug 02
0
[PATCH 1/3] ALPHA: make sector size dynamic in extlinux
...int size; + + if (!ioctl(devfd, BLKSSZGET, &size)) + return size; + return SECTOR_SIZE; +} + +/* * Get device geometry and partition offset */ struct geometry_table { @@ -145,7 +157,7 @@ static const struct geometry_table standard_geometries[] = { {0, {0, 0, 0, 0}} }; -int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo) +static int get_geometry(int devfd, uint64_t totalbytes, unsigned sector_size, struct hd_geometry *geo) { struct floppy_struct fd_str; struct loop_info li; @@ -179,7 +191,7 @@ int get_geometry(int devfd, uint64_t totalbytes, struct...
2011 Jul 16
1
crash in extlinux/main
...iting a bootloader on a file mounted via /dev/mapper in Lunix it crashed on me with a segment fault. The bug is here: if (!ioctl(devfd, HDIO_GETGEO, &geo)) { Since we are already called with geo as a pointer the & is wrong as the pointer itself will be overwritten. This works: int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo) { struct floppy_struct fd_str; struct loop_info li; struct loop_info64 li64; const struct geometry_table *gp; int rv = 0; memset(geo, 0, sizeof *geo); if (!ioctl(devfd, HDIO_GETGEO, geo)) { goto ok; If...
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.
2012 Aug 02
0
[PATCH 2/3] ALPHA: first try to fix adv problem
...fd, const char *dir, int devfd) dprintf("subpath = %s\n", subpath); totalbytes = get_size(devfd); - sector_size = get_sector_size(devfd); + /* FIXME support greater sector sizes for BTRFS */ + sector_size = fs_type == BTRFS ? SECTOR_SIZE : get_sector_size(devfd); get_geometry(devfd, totalbytes, sector_size, &geo); if (opt.heads) @@ -318,6 +319,7 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) int i; sector_t *sp = sectp; +// FIXME ?? for (i = 0; i < nsect - 2; i++) *sp++ = BTRFS_EXTLINUX_OFFSET/SECTOR_SIZE + i; fo...
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello, Happy New Year! These patches make syslinux/linux support ext2/3/4, and it doesn't require the root privilege, I'd like to add a separate e2fs/syslinux, if that is more appropriate, it should be easy to do that. I put these patches on github so that you can easily get them in case you'd like to test them. (The repo's name is sys_tmp, which avoids confusing others, I will
2014 Dec 24
14
[PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem
Hello syslinux, Merry Christmas! These patches will make extlinux work with umounted ext2/3/4 filesystem, for example: $ extlinux -i /dev/sdXN or $ extlinux -i file_block Also it can work with something like: $ extlinux /dev/sdXN --reset-adv or $ extlinux file_block --reset-adv We don't use a new option (I planed to use "-d" but it is already in use), it will check whether the