Some more 64bit function eradication.
. Replace 64bit funcions with operators in arch_clock.c . Replace 64bit funcions with operators in proc.c . Replace 64bit funcions with operators in vbox.c . Replace 64bit funcions with operators in driver.c . Eradicates is_zero64, make_zero64, neg64 Change-Id: Ie4e1242a73534f114725271b2e2365b2004cb7b9
This commit is contained in:
@@ -77,8 +77,8 @@ static int driver_open(int which)
|
||||
if(!size_known) {
|
||||
disk_size = part.size;
|
||||
size_known = 1;
|
||||
sectors = div64u(disk_size, SECTOR_SIZE);
|
||||
if(cmp64(mul64u(sectors, SECTOR_SIZE), disk_size)) {
|
||||
sectors = (unsigned long)(disk_size / SECTOR_SIZE);
|
||||
if ((u64_t)sectors * SECTOR_SIZE != disk_size) {
|
||||
printf("Filter: partition too large\n");
|
||||
|
||||
return RET_REDO;
|
||||
@@ -88,7 +88,7 @@ static int driver_open(int which)
|
||||
disk_size, sectors);
|
||||
#endif
|
||||
} else {
|
||||
if(cmp64(disk_size, part.size)) {
|
||||
if (disk_size != part.size) {
|
||||
printf("Filter: partition size mismatch "
|
||||
"(0x%"PRIx64" != 0x%"PRIx64")\n",
|
||||
part.size, disk_size);
|
||||
@@ -954,7 +954,7 @@ int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, int request)
|
||||
* report the driver for acting strangely!
|
||||
*/
|
||||
if (m1.BDEV_STATUS > (ssize_t) *sizep ||
|
||||
cmp64(add64u(pos, m1.BDEV_STATUS), disk_size) < 0)
|
||||
(pos + (unsigned int) m1.BDEV_STATUS < disk_size))
|
||||
return bad_driver(DRIVER_MAIN, BD_PROTO, EFAULT);
|
||||
|
||||
/* Return the actual size. */
|
||||
@@ -976,8 +976,8 @@ int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, int request)
|
||||
|
||||
/* As above */
|
||||
if (m2.BDEV_STATUS > (ssize_t) *sizep ||
|
||||
cmp64(add64u(pos, m2.BDEV_STATUS),
|
||||
disk_size) < 0)
|
||||
(pos + (unsigned int) m2.BDEV_STATUS <
|
||||
disk_size))
|
||||
return bad_driver(DRIVER_BACKUP, BD_PROTO,
|
||||
EFAULT);
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ static void vbox_update_time(void)
|
||||
sizeof(*req)) == VMMDEV_ERR_OK) {
|
||||
time(&otime); /* old time */
|
||||
|
||||
ntime = div64u(req->time, 1000); /* new time */
|
||||
ntime = (unsigned long)(req->time / 1000); /* new time */
|
||||
|
||||
/* Make time go forward, if the difference exceeds the drift
|
||||
* threshold. Never make time go backward.
|
||||
|
||||
Reference in New Issue
Block a user