| 2032 | } |
| 2033 | |
| 2034 | void hd_update_geometry(disk_t *disk, const int verbose) |
| 2035 | { |
| 2036 | if(disk->autodetect!=0) |
| 2037 | { |
| 2038 | unsigned char *buffer=(unsigned char *)MALLOC(disk->sector_size); |
| 2039 | if((unsigned)disk->pread(disk, buffer, disk->sector_size, 0) == disk->sector_size) |
| 2040 | { |
| 2041 | if(verbose>1) |
| 2042 | { |
| 2043 | log_trace("autoset_geometry\n"); |
| 2044 | } |
| 2045 | autoset_geometry(disk,buffer,1); |
| 2046 | } |
| 2047 | free(buffer); |
| 2048 | } |
| 2049 | #ifdef DJGPP |
| 2050 | if(disk->description==disk_description) |
| 2051 | { |
| 2052 | struct info_disk_struct*data=(struct info_disk_struct*)disk->data; |
| 2053 | data->geo_phys.cylinders=disk->geom.cylinders; |
| 2054 | } |
| 2055 | #endif |
| 2056 | } |
| 2057 | |
| 2058 | void hd_update_all_geometry(const list_disk_t * list_disk, const int verbose) |
| 2059 | { |
no test coverage detected