avoid shadowing time while it still exists
This commit is contained in:
parent
d377d3f58a
commit
e11bb150ed
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: adb_direct.c,v 1.33 2005/12/11 12:18:03 christos Exp $ */
|
||||
/* $NetBSD: adb_direct.c,v 1.34 2006/06/07 23:22:52 kardel Exp $ */
|
||||
|
||||
/* From: adb_direct.c 2.02 4/18/97 jpw */
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: adb_direct.c,v 1.33 2005/12/11 12:18:03 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: adb_direct.c,v 1.34 2006/06/07 23:22:52 kardel Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/cdefs.h>
|
||||
@ -1461,7 +1461,7 @@ set_adb_info(ADBSetInfoBlock * info, int adbAddr)
|
||||
/* caller should really use machine-independant version: getPramTime */
|
||||
/* this version does pseudo-adb access only */
|
||||
int
|
||||
adb_read_date_time(unsigned long *time)
|
||||
adb_read_date_time(unsigned long *t)
|
||||
{
|
||||
u_char output[ADB_MAX_MSG_LENGTH];
|
||||
int result;
|
||||
@ -1469,7 +1469,7 @@ adb_read_date_time(unsigned long *time)
|
||||
|
||||
switch (adbHardware) {
|
||||
case ADB_HW_PMU:
|
||||
pm_read_date_time(time);
|
||||
pm_read_date_time(t);
|
||||
return 0;
|
||||
|
||||
case ADB_HW_CUDA:
|
||||
@ -1484,7 +1484,7 @@ adb_read_date_time(unsigned long *time)
|
||||
while (0 == flag) /* wait for result */
|
||||
;
|
||||
|
||||
memcpy(time, output + 1, 4);
|
||||
memcpy(t, output + 1, 4);
|
||||
return 0;
|
||||
|
||||
case ADB_HW_UNKNOWN:
|
||||
@ -1496,7 +1496,7 @@ adb_read_date_time(unsigned long *time)
|
||||
/* caller should really use machine-independant version: setPramTime */
|
||||
/* this version does pseudo-adb access only */
|
||||
int
|
||||
adb_set_date_time(unsigned long time)
|
||||
adb_set_date_time(unsigned long t)
|
||||
{
|
||||
u_char output[ADB_MAX_MSG_LENGTH];
|
||||
int result;
|
||||
@ -1508,10 +1508,10 @@ adb_set_date_time(unsigned long time)
|
||||
output[0] = 0x06; /* 6 byte message */
|
||||
output[1] = 0x01; /* to pram/rtc device */
|
||||
output[2] = 0x09; /* set date/time */
|
||||
output[3] = (u_char)(time >> 24);
|
||||
output[4] = (u_char)(time >> 16);
|
||||
output[5] = (u_char)(time >> 8);
|
||||
output[6] = (u_char)(time);
|
||||
output[3] = (u_char)(t >> 24);
|
||||
output[4] = (u_char)(t >> 16);
|
||||
output[5] = (u_char)(t >> 8);
|
||||
output[6] = (u_char)(t);
|
||||
result = send_adb_cuda((u_char *)output, (u_char *)0,
|
||||
adb_op_comprout, &flag, (int)0);
|
||||
if (result != 0) /* exit if not sent */
|
||||
@ -1523,7 +1523,7 @@ adb_set_date_time(unsigned long time)
|
||||
return 0;
|
||||
|
||||
case ADB_HW_PMU:
|
||||
pm_set_date_time(time);
|
||||
pm_set_date_time(t);
|
||||
return 0;
|
||||
|
||||
case ADB_HW_UNKNOWN:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pm_direct.c,v 1.29 2005/12/11 12:18:03 christos Exp $ */
|
||||
/* $NetBSD: pm_direct.c,v 1.30 2006/06/07 23:22:52 kardel Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997 Takashi Hamada
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pm_direct.c,v 1.29 2005/12/11 12:18:03 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pm_direct.c,v 1.30 2006/06/07 23:22:52 kardel Exp $");
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef ADB_DEBUG
|
||||
@ -862,8 +862,8 @@ pm_adb_poweroff()
|
||||
}
|
||||
|
||||
void
|
||||
pm_read_date_time(time)
|
||||
u_long *time;
|
||||
pm_read_date_time(t)
|
||||
u_long *t;
|
||||
{
|
||||
PMData p;
|
||||
|
||||
@ -873,19 +873,19 @@ pm_read_date_time(time)
|
||||
p.r_buf = p.data;
|
||||
pmgrop(&p);
|
||||
|
||||
memcpy(time, p.data, 4);
|
||||
memcpy(t, p.data, 4);
|
||||
}
|
||||
|
||||
void
|
||||
pm_set_date_time(time)
|
||||
u_long time;
|
||||
pm_set_date_time(t)
|
||||
u_long t;
|
||||
{
|
||||
PMData p;
|
||||
|
||||
p.command = PMU_SET_RTC;
|
||||
p.num_data = 4;
|
||||
p.s_buf = p.r_buf = p.data;
|
||||
memcpy(p.data, &time, 4);
|
||||
memcpy(p.data, &t, 4);
|
||||
pmgrop(&p);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user