Displaying 2 results from an estimated 2 matches for "syslinux_get_disk_param".
Did you mean:
syslinux_get_disk_params
2007 Apr 18
2
[Patch]: Drive/Partition and extensible filesystem support for syslinux
...n place to make it open
other filesystems too).
Usage is like this:
#include <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 libf...
2007 Apr 05
0
Patch: Add io.c functions, and vfat library
...s = 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;
}
/* Get MBR */
if ( syslinux_read_disk(&disk_info, mbr, 0, 1) ) {
error("Cannot read Master Boot Record\n");
goto error;
}
/* Get 1st partition info */...