Fix size parameter for ioctl.

This commit is contained in:
Marcus Overhagen 2012-09-15 01:22:34 +02:00
parent 3c5216179e
commit 4a2ac3c2ac
1 changed files with 4 additions and 4 deletions

View File

@ -164,11 +164,11 @@ status_t Initialize(int fatbits, const char *device, const char *label, bool nop
device_geometry biosGeometry; device_geometry biosGeometry;
device_geometry deviceGeometry; device_geometry deviceGeometry;
partition_info partitionInfo; partition_info partitionInfo;
isRawDevice = 0 != strstr(device, "/raw"); isRawDevice = 0 != strstr(device, "/raw");
hasBiosGeometry = B_OK == ioctl(fd, B_GET_BIOS_GEOMETRY, &biosGeometry); hasBiosGeometry = B_OK == ioctl(fd, B_GET_BIOS_GEOMETRY, &biosGeometry, sizeof(biosGeometry));
hasDeviceGeometry = B_OK == ioctl(fd, B_GET_GEOMETRY, &deviceGeometry); hasDeviceGeometry = B_OK == ioctl(fd, B_GET_GEOMETRY, &deviceGeometry, sizeof(deviceGeometry));
hasPartitionInfo = B_OK == ioctl(fd, B_GET_PARTITION_INFO, &partitionInfo); hasPartitionInfo = B_OK == ioctl(fd, B_GET_PARTITION_INFO, &partitionInfo, sizeof(partitionInfo));
if (!isRawDevice && !hasBiosGeometry && !hasDeviceGeometry && !hasPartitionInfo) if (!isRawDevice && !hasBiosGeometry && !hasDeviceGeometry && !hasPartitionInfo)
isRawDevice = true; isRawDevice = true;