search for: syslinux_read_disk

Displaying 2 results from an estimated 2 matches for "syslinux_read_disk".

2007 Apr 05
0
Patch: Add io.c functions, and vfat library
...partition; } filedesc; static filedesc rFd; static int fat_disk_read_handle(intptr_t fdp, void* buf, size_t nbyte, libfat_sector_t sector) { filedesc* fd = (filedesc*) fdp; int num_sectors = nbyte / LIBFAT_SECTOR_SIZE; int status; sector += fd->partition->start_lba; status = syslinux_read_disk(fd->disk_info, buf, sector, num_sectors); return (status) ? 0 : nbyte; } and in some function like main(): /* Get the disk geometry (not needed for MBR) */ if ( syslinux_get_disk_params(drive, &disk_info) ) { error("Cannot get disk parameters\n"); goto error...
2007 Apr 18
2
[Patch]: Drive/Partition and extensible filesystem support for syslinux
...<syslinux/io.h> #include <syslinux/partitions.h> #include <fs/fat/libfat.h> syslinux_devdesc dfd; struct libfat_filesystem* fs; diskinfo disk_info; char mbr[512]; static part_entry *partition; int fd; syslinux_get_disk_params(drive, &disk_info); // specify your drive number syslinux_read_disk(&disk_info, mbr, 0, 1); // Read mbr partition = PARTITION_ENTRY(mbr, 2); // 2 for partition 2 // this is the disk device/partition descriptor dfd.disk_info = &disk_info; dfd.partition = partition; // try opening libfat partition on the given partition descriptor fs = libfat_open(syslinux_...