Log sector size and disk model when rejecting a device with a size of 0 byte.

This commit is contained in:
Christophe Grenier 2008-08-07 09:04:50 +02:00
parent 8c550589cb
commit 6d2e514b9e

View file

@ -1452,7 +1452,12 @@ disk_t *file_test_availability(const char *device, const int verbose, const arch
#endif
if(disk_car->disk_real_size!=0)
return disk_car;
log_warning("Warning: can't get size for %s\n", device);
if(disk_car->model==NULL)
log_warning("Warning: can't get size for %s, sector size=%u\n",
disk_car->description(disk_car), disk_car->sector_size);
else
log_warning("Warning: can't get size for %s, sector size=%u - %s\n",
disk_car->description(disk_car), disk_car->sector_size, disk_car->model);
free(data);
free(disk_car->device);
free(disk_car->model);