Consolidated and fixed device_geometry computation.

* The only implementation that would accept more than 2 TB was the one in
  scsi_disk. But even that one was limited to 63 TB.
* Now there is a new utility function devfs_compute_geometry_size() which
  does it correctly for sizes up to 2^64 which should be good enough for
  quite some time :-)
* This fixes bug #8992.
This commit is contained in:
Axel Dörfler
2012-10-08 13:59:16 +02:00
parent cff0983994
commit 9b9cb227c7
5 changed files with 61 additions and 45 deletions
+4 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008, Axel Dörfler, [email protected]. All rights reserved.
* Copyright 2002-2012, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
@@ -29,6 +29,9 @@ status_t devfs_publish_device(const char *path, device_hooks *calls);
status_t devfs_publish_directory(const char *path);
status_t devfs_rescan_driver(const char *driverName);
void devfs_compute_geometry_size(device_geometry* geometry, uint64 blockCount,
uint32 blockSize);
#ifdef __cplusplus
}
#endif