search for: write_verify_sectors

Displaying 4 results from an estimated 4 matches for "write_verify_sectors".

2010 Sep 19
2
can't get write_sectors to work...
...t of writing to the disk: printf(" Host bus: %s, Interface type: %s\n\n", d->edd_params.host_bus_type, d->edd_params.interface_type); zero_buf = calloc(1, d->edd_params.bytes_per_sector); for(int sector = 0; sector < d->edd_params.sectors; sector++){ err = write_verify_sectors(d, sector,zero_buf,1); if (err == -1) { printf("sector: %d error: %d\n", sector, disk_errno); //disk_errno is always zero here } printf("sector: %d wrote:%d\r", sector, err); } if (zero_buf) { free(zero_buf); } } When run, the error case is always executed, b...
2015 Aug 07
1
[PATCH] com32: write_sectors fixes
...; @@ -48,7 +48,7 @@ int write_sectors(const struct driveinfo *drive_info, const unsigned int lba, if (!dapa) goto out; - memcpy(buf, data, size); + memcpy(buf, data, SECTOR * size); memset(&inreg, 0, sizeof inreg); if (drive_info->ebios) { @@ -123,7 +123,7 @@ int write_verify_sectors(struct driveinfo *drive_info, const unsigned int lba, const void *data, const int size) { - char *rb = malloc(SECTOR * size * sizeof(char)); + char *rb = malloc(SECTOR * size); int status; if (write_sectors(drive_info, lba, data, size) == -1)
2010 Apr 27
2
gpllib write_sectors() patch
Here is a partial patch that I'm using to illustrate a few questions that I have. Looking at the gpllib write_sectors (com32/gpllib/disk/write.c) it looks like the allocated size is wrong; size is in sectors so we should adjust the alloc/memcpy by size*SECTOR. Also, comparing core/diskio.c it looks like the registers aren't even setup right. In the patch below I put an #if 0 around the
2010 Jul 26
5
[RFC/PATCH] New chainloading functionality
This patch introduces extra functionality to chain.c, mainly with reference to BPB adjustments, but not only that. It expects 3 small patches I sent earlier (they are included for easy reference, patches 1-3/4). The changes introduced are: 1) file and boot sector use separate options to control load address and jump address (if applicable). Options are as described below: *