search for: diskinfo

Displaying 20 results from an estimated 50 matches for "diskinfo".

2013 Sep 06
1
[PATCH 2/2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...Anvin * Copyright (C) 2010 Shao Miller + * Copyright (C) 2013 Raphael S. Carvalho * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -92,6 +93,13 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) if (!(outreg.eflags.l & EFLAGS_CF) && outreg.ebx.w[0] == 0xaa55 && (outreg.ecx.b[0] & 1)) { diskinfo->ebios = 1; + diskinfo->ops.disk_op = &ebios_disk_op; + diskinfo->ops.read_code = EBIOS_READ_CODE; + diskinfo->ops.write_code = EBIOS_WRITE_CODE; +...
2013 Sep 06
1
[PATCH 2/2 v2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...010 Shao Miller + * Copyright (C) 2013 Raphael S. Carvalho * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -159,6 +160,81 @@ out: } /** + * Fill inreg based on EBIOS addressing properties. + * + * @v diskinfo The disk drive to read from + * @v inreg Register data structure to be filled. + * @v lba The logical block address to begin reading at + * @v count The number of sectors to read + * @ret lmalloc'd buf upon success, NULL upon failure + */ +static inline void * +ebios_disk_op(const st...
2013 Sep 17
1
[PATCH 2/4 v3] com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.
...k.c +++ b/com32/lib/syslinux/disk.c @@ -33,6 +33,7 @@ * Deal with disks and partitions */ +#include <core.h> #include <dprintf.h> #include <stdio.h> #include <stdlib.h> @@ -158,6 +159,83 @@ out: } /** + * Fill inreg based on EBIOS addressing properties. + * + * @v diskinfo The disk drive to read from + * @v inreg Register data structure to be filled. + * @v lba The logical block address to begin reading at + * @v count The number of sectors to read + * @v op_code Code to write/read operation + * @ret lmalloc'd buf upon success, NULL upon failure + */...
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...xtern void disk_gpt_part_dump(const struct disk_gpt_part_entry *const + gpt_part); + +/* disk.c */ +#ifndef SYSLINUX_EFI extern int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg); +#endif + extern int disk_get_params(int disk, struct disk_info *const diskinfo); extern void *disk_read_sectors(const struct disk_info *const diskinfo, - uint64_t lba, uint8_t count); + uint64_t lba, uint8_t count); extern int disk_write_sectors(const struct disk_info *const diskinfo, - uint64_t lba, const void *data, uint8_t c...
2013 Sep 06
2
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...ff --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) diskinfo->ebios = 1;...
2013 Mar 09
1
kickstart %pre vda/sda troubles
hi, The problem: for kvm/qemu disks are /dev/vdx devices when using the virtio driver. For vmware, drives are /dev/sdx devices. For hp servers, /dev/ccisss/whatever (sorry, no proliant with an array controller handy to check it). in order to just have one kickstart script to maintain I am trying to use the %pre section but getting a bit stuck. This is what I have: %pre if [ -b /dev/sda ] then
2014 Jun 29
0
[PATCH 4/6] chain: add missing pi_del() in find*() functions
...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_part->...
2013 Sep 17
2
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...ff --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->ebios = 1;...
2013 Sep 17
0
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...inux/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 *c...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...ff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c index d6409af..093751a 100644 --- a/com32/lib/syslinux/disk.c +++ b/com32/lib/syslinux/disk.c @@ -73,7 +73,8 @@ 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 = __com32.cs_bounce; + struct disk_ebios_eparam *eparam; + int rv = 0; memset(diskinfo, 0, sizeof *diskinfo); diskinfo->disk = disk; @@ -93,6 +94,10 @@ int disk_get_params(int disk, struct disk_info...
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
2008 Aug 02
0
'diskinfo' problem with eSATA device (initio 1611)
...RT, noise, backup etc..) I bought a very nice "docking" station connected to my ICH9 SATA controller (http://www.sharkoon.com/html/produkte/externe_gehaeuse/sata_quickport_pro/index_en.html) I can read/write to inserted disks, also smartctl works, but my favourite test doesn't run: diskinfo -t /dev/ad10 returns: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.: Inappropriate ioctl for device The eSATA bridge is a initio 1611 chip. I have another external SATA enclosure and there is the same problem. Any ideas what the reason is and how to "fix"? Best regards, -Harry -...
2013 Sep 30
0
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...inux/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 *co...
2016 Jul 14
3
[PATCH] : Adding dlabel option to chain.c32
On 07/14/16 05:56, Ady Ady via Syslinux wrote: > > @Peter, Erwan, Gene, Michal, (and anyone else interested)... > > Although I haven't actually tested Erwan's patch, would it be > acceptable by you (all) if I were to send a patch to this Syslinux > Mailing List with the same code while changing the wording as I > previously suggested in a prior email? Would it be
2013 Oct 18
0
[RFC/PATCH 3/3] Wire up MultiFS support.
...) { + if (i->partition == partition) + return i->fs; + } + return NULL; +} + +/* + * Attempt to find a partition based on drive and partition numbers. + * + * @ret: 0 on success, -1 on failure. + */ +static int find_partition(struct part_iter **_iter, struct disk_info *diskinfo, + int partition) +{ + struct part_iter *iter = NULL; + + if (!(iter = pi_begin(diskinfo, 0))) + return -1; + + do { + if (iter->index == partition) + break; + } while (!pi_next(iter)); + + if (iter->status) { + dprintf("MultiFS: Request disk/p...
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
2016 Jul 15
0
[PATCH] : Add diskbypartname option to chain.c32
...drive; } +/* + * Search for a disk having a GPT partition with a specified Partition Name. + * Return disk and iterator at proper position. + */ +static int find_disk_by_partition_name(const char *label, struct part_iter **_boot_part) +{ + 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 (!(iter = pi_begin(&diskinfo, opt.piflags))) + continue; + /* Check for a matching GPT Partition Name */ + if (...
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
2013 Oct 17
1
[PATCH] chain: Fix chainloading on 6.02
...--- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c index 0b0c737..47ecb52 100644 --- a/com32/lib/syslinux/disk.c +++ b/com32/lib/syslinux/disk.c @@ -171,22 +171,28 @@ out: static void *ebios_setup(const struct disk_info *const diskinfo, com32sys_t *inreg, uint64_t lba, uint8_t count, uint8_t op_code) { - static __lowmem struct disk_ebios_dapa dapa; + static struct disk_ebios_dapa *dapa = NULL; void *buf; + if (!dapa) { + dapa = lmalloc(sizeof *dapa); + if (!dapa) + return NULL; + } + buf = lmalloc...
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.