search for: disk_info

Displaying 20 results from an estimated 35 matches for "disk_info".

Did you mean: vdisk_info
2013 Sep 06
1
[PATCH 2/2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...files changed, 108 insertions(+), 83 deletions(-) diff --git a/com32/include/syslinux/disk.h b/com32/include/syslinux/disk.h index f96ca68..e793514 100644 --- a/com32/include/syslinux/disk.h +++ b/com32/include/syslinux/disk.h @@ -41,6 +41,14 @@ #define SECTOR 512u /* bytes/sector */ +struct disk_info; +struct disk_ops { + void *(*disk_op)(const struct disk_info *const, com32sys_t *, + uint64_t, uint8_t); + uint32_t read_code; + uint32_t write_code; +}; + struct disk_info { int disk; int ebios; /* EBIOS supported on this disk */ @@ -50,6 +58,14 @@ struct disk_info {...
2007 Apr 18
2
[Patch]: Drive/Partition and extensible filesystem support for syslinux
...ning partitions with fat filesystems (well, the architecture is in 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...
2007 Apr 05
0
Patch: Add io.c functions, and vfat library
This is a continuation to the library creation effort for syslinux. I added the necessary ops required to read partitions and sectors off the disk. I'm using it with my com32 module. I did change the interface for read_disk a bit, so it takes a disk_info argument. This way I can maintain multiple instances of read handlers, for example if I'm reading and comparing stuff from two different partitions, etc. There was some discussion on whether the FAT library, should be in com32/lib, but its quite helpful for me since I can hook my own read_hand...
2013 Sep 06
1
[PATCH 2/2 v2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...9 +++++++++++++++++++++------------------- 2 files changed, 112 insertions(+), 85 deletions(-) diff --git a/com32/include/syslinux/disk.h b/com32/include/syslinux/disk.h index f96ca68..348d1ae 100644 --- a/com32/include/syslinux/disk.h +++ b/com32/include/syslinux/disk.h @@ -52,6 +52,19 @@ struct disk_info { uint32_t spt; }; +struct disk_ops { + uint8_t ah; + void *(*op)(const struct disk_info *const, com32sys_t *, + uint64_t, uint8_t); +}; + +enum disk_op_codes { + EBIOS_READ_CODE = 0x42, /* Extended read */ + EBIOS_WRITE_CODE = 0x43, /* Extended write */ + CHS_READ_CODE = 0...
2013 Sep 06
2
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...deletions(-) diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c index 093751a..554bed3 100644 --- a/com32/lib/syslinux/disk.c +++ b/com32/lib/syslinux/disk.c @@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg) int disk_get_params(int disk, struct disk_info *const diskinfo) { static com32sys_t inreg, outreg; - struct disk_ebios_eparam *eparam; + struct disk_ebios_eparam *eparam = NULL; int rv = 0; memset(diskinfo, 0, sizeof *diskinfo); @@ -94,12 +94,12 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) diskinf...
2013 Sep 17
1
[PATCH 2/4 v3] com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.
...nux/disk.h +++ b/com32/include/syslinux/disk.h @@ -41,6 +41,13 @@ #define SECTOR 512u /* bytes/sector */ +enum disk_op_codes { + EBIOS_READ_CODE = 0x42, /* Extended read */ + EBIOS_WRITE_CODE = 0x43, /* Extended write */ + CHS_READ_CODE = 0x02, + CHS_WRITE_CODE = 0x03, +}; + struct disk_info { int disk; int ebios; /* EBIOS supported on this disk */ diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c index d96acbf..b3b9129 100644 --- a/com32/lib/syslinux/disk.c +++ b/com32/lib/syslinux/disk.c @@ -33,6 +33,7 @@ * Deal with disks and partitions */ +#include...
2014 Jun 29
10
[PATCH 0/6] chain.c32 patches
This small set fixes few bugs, improves gpt handling (under buggy conditions) and implements strict flag with more fine grained control which should fix issues with sanity checks against disk sizes. If this set is allright I'd want to do what I mentioned in older discussion with Ady - backport missing patches from 6.x to 5.x and 4.x so all versions have up to date chain version. Michal
2014 Jun 29
0
[PATCH 1/6] chain/partiter: fix and improve gpt handling in buggy cases
...iter.c index 1eb5350..ee19e8b 100644 --- a/com32/chain/partiter.c +++ b/com32/chain/partiter.c @@ -412,34 +412,16 @@ static inline int valid_crc(uint32_t crc, const uint8_t *buf, unsigned int siz) return crc == crc32(crc32(0, NULL, 0), buf, siz); } -static int gpt_check_hdr_crc(const struct disk_info * const diskinfo, struct disk_gpt_header **_gh) +static int valid_crc_hdr(void *buf) { - struct disk_gpt_header *gh = *_gh; - uint64_t lba_alt; - uint32_t hold_crc32; + struct disk_gpt_header *gh = buf; + uint32_t crc = gh->chksum; + int valid; - hold_crc32 = gh->chksu...
2013 Sep 17
2
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...deletions(-) diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c index 093751a..d96acbf 100644 --- a/com32/lib/syslinux/disk.c +++ b/com32/lib/syslinux/disk.c @@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg) int disk_get_params(int disk, struct disk_info *const diskinfo) { static com32sys_t inreg, outreg; - struct disk_ebios_eparam *eparam; + struct disk_ebios_eparam *eparam = NULL; int rv = 0; memset(diskinfo, 0, sizeof *diskinfo); @@ -94,12 +94,12 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) diskinfo...
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...nd associated documentation @@ -33,8 +34,8 @@ * Deal with disks and partitions */ -#ifndef _SYSLINUX_DISK_H -#define _SYSLINUX_DISK_H +#ifndef _SYSLINUX_DISK_H_ +#define _SYSLINUX_DISK_H_ #include <com32.h> #include <stdint.h> @@ -50,15 +51,24 @@ enum disk_op_codes { struct disk_info { int disk; - int ebios; /* EBIOS supported on this disk */ - int cbios; /* CHS geometry is valid */ - uint32_t bps; /* bytes per sector */ - uint64_t lbacnt; /* total amount of sectors */ + uint32_t bps; /* bytes per sector */ + uint64_t lbacnt; /* total amount of s...
2012 Nov 06
50
chain.c32 (and partiter) updates v2
This is a bit updated set of chain.c32 changes that simplifies a few things (and in partiter part), fixes few minor issues and adds a few new features. Details are in the following commits, below is the summary and pull details at the end. Shao - any chance to peek over them ? Most of those are relatively simple changes and well tested, though of course something might have slipped my attention.
2013 Sep 17
0
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c > index 093751a..554bed3 100644 > --- a/com32/lib/syslinux/disk.c > +++ b/com32/lib/syslinux/disk.c > @@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg) > int disk_get_params(int disk, struct disk_info *const diskinfo) > { > static com32sys_t inreg, outreg; > - struct disk_ebios_eparam *eparam; > + struct disk_ebios_eparam *eparam = NULL; > int rv = 0; > > memset(diskinfo, 0, sizeof *diskinfo); > @@ -94,12 +94,12 @@ int disk_get_params(int disk, str...
2014 Jun 29
0
[PATCH 4/6] chain: add missing pi_del() in find*() functions
...c08ec6e..f86cd7d 100644 --- a/com32/chain/chain.c +++ b/com32/chain/chain.c @@ -64,27 +64,23 @@ static int is_phys(uint8_t sdifs) static int find_by_sig(uint32_t mbr_sig, struct part_iter **_boot_part) { - struct part_iter *boot_part = NULL; + struct part_iter *iter = NULL; struct disk_info diskinfo; int drive; for (drive = 0x80; drive < 0x80 + fixed_cnt; drive++) { if (disk_get_params(drive, &diskinfo)) continue; /* Drive doesn't exist */ - if (!(boot_part = pi_begin(&diskinfo, opt.piflags))) - continue; - /* Check for a MBR disk */ - if (boot_...
2015 Jul 22
0
[PULL 1/8] Move partiter from com32/chain to com32/lib/syslinux
...ypes+2; - -/* pi_dtor_() - common/raw iterator cleanup */ -static void pi_dtor_(struct part_iter *iter) -{ - /* syslinux's free is null resilient */ - free(iter->data); -} - -/* pi_ctor() - common/raw iterator initialization */ -static int pi_ctor(struct part_iter *iter, - const struct disk_info *di, int flags -) -{ - memcpy(&iter->di, di, sizeof *di); - iter->flags = flags; - iter->index0 = -1; - iter->length = di->lbacnt; - - iter->type = typeraw; - return 0; -} - -/* pi_dos_ctor() - MBR/EBR iterator specific initialization */ -static int pi_dos_ct...
2007 Oct 17
3
Adding a "boot from local hard disk" option to syslinux menu, booted from USB
...lling get_disk_params\n"); printf(logs); strcat(logrc, logs); if ( get_disk_params(drive) && whichpart ) { //error(); sprintf(logs, "Cannot get disk parameters\n"); error(logs); strcat(logrc, logs); goto endloop; } sprintf(logs, "disk_info: disk %d, ebios %d, cbios %d, head %d, sect %d\n", disk_info.disk, disk_info.ebios, disk_info.cbios, disk_info.head, disk_info.sect); printf(logs); strcat(logrc, logs); /* Get MBR */ sprintf(logs, "Get MBR - Calling read_sector\n"); printf(logs); strcat(logrc, l...
2013 Oct 18
0
[RFC/PATCH 1/3] Move partiter from com32/chain to com32/lib/syslinux
...ypes+2; - -/* pi_dtor_() - common/raw iterator cleanup */ -static void pi_dtor_(struct part_iter *iter) -{ - /* syslinux's free is null resilient */ - free(iter->data); -} - -/* pi_ctor() - common/raw iterator initialization */ -static int pi_ctor(struct part_iter *iter, - const struct disk_info *di, int flags -) -{ - memcpy(&iter->di, di, sizeof *di); - iter->flags = flags; - iter->index0 = -1; - iter->length = di->lbacnt; - - iter->type = typeraw; - return 0; -} - -/* pi_dos_ctor() - MBR/EBR iterator specific initialization */ -static int pi_dos_ct...
2009 Mar 23
2
HDT: Doesn't work with syslinux
When I boot Hardware Detection Tool 0.2.3 or 0.2.5 with syslinux 3.73 or 3.74-pre11, I get: ======================================================= Hardware Detection Tool 0.2.5 by Erwan Velu CPU: Detecting DISKS: Detecting DISK 0x80: 0x80: PCI ATA : sectors = 703282600, s/t = 63 head = 255: EDD=3.0 ======================================================= Then it halts. Ctrl + Alt + Del
2013 Sep 30
0
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c > index 093751a..d96acbf 100644 > --- a/com32/lib/syslinux/disk.c > +++ b/com32/lib/syslinux/disk.c > @@ -73,7 +73,7 @@ int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg) > int disk_get_params(int disk, struct disk_info *const diskinfo) > { > static com32sys_t inreg, outreg; > - struct disk_ebios_eparam *eparam; > + struct disk_ebios_eparam *eparam = NULL; > int rv = 0; > > memset(diskinfo, 0, sizeof *diskinfo); > @@ -94,12 +94,12 @@ int disk_get_params(int disk, stru...
2010 Aug 08
1
PATCH/RFC chain.c: update iterator code, yank from chain.c, move both to separate directory
1) code split and move Iterator related functionality is yanked from chain.c and moved to iterator.{c,h}. Both are moved to com32/chain and this way chain.c is ready for further splitting. Alternatively, partiter could be moved to com32/lib at any time in the future. It's potentially useful for other modules (e.g. if someone wanted to code partition dumper or editor). 2) Iterator updates
2012 Aug 20
13
[PATCH 00/12] Multidisk support
Hello, the following patches should get multidisk access working. The syntax accepted is the following: (hdx,y)/path/to/file where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk. the other accepted syntax is using MBR's 32 bits disk signature so for example: (mbr:0x12345678,2)/foo/bar would address