Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 37317 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.4.23/arch/cris/drivers/ds1302.c (+1 lines)
Lines 346-351 Link Here
346
		{
346
		{
347
			struct rtc_time rtc_tm;
347
			struct rtc_time rtc_tm;
348
						
348
						
349
			memset(&rtc_tm, 0, sizeof (struct rtc_time));
349
			get_rtc_time(&rtc_tm);						
350
			get_rtc_time(&rtc_tm);						
350
			if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
351
			if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
351
				return -EFAULT;	
352
				return -EFAULT;	
(-)linux-2.4.23/arch/cris/drivers/pcf8563.c (+1 lines)
Lines 220-225 Link Here
220
		{
220
		{
221
			struct rtc_time tm;
221
			struct rtc_time tm;
222
222
223
			memset(&tm, 0, sizeof (struct rtc_time));
223
			get_rtc_time(&tm);
224
			get_rtc_time(&tm);
224
225
225
			if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) {
226
			if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) {
(-)linux-2.4.23/arch/m68k/bvme6000/rtc.c (+1 lines)
Lines 54-59 Link Here
54
		/* Ensure clock and real-time-mode-register are accessible */
54
		/* Ensure clock and real-time-mode-register are accessible */
55
		msr = rtc->msr & 0xc0;
55
		msr = rtc->msr & 0xc0;
56
		rtc->msr = 0x40;
56
		rtc->msr = 0x40;
57
		memset(&wtime, 0, sizeof(struct rtc_time));
57
		do {
58
		do {
58
			wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
59
			wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
59
			wtime.tm_min =  BCD2BIN(rtc->bcd_min);
60
			wtime.tm_min =  BCD2BIN(rtc->bcd_min);
(-)linux-2.4.23/arch/m68k/mvme16x/rtc.c (+1 lines)
Lines 52-57 Link Here
52
		cli();
52
		cli();
53
		/* Ensure clock and real-time-mode-register are accessible */
53
		/* Ensure clock and real-time-mode-register are accessible */
54
		rtc->ctrl = RTC_READ;
54
		rtc->ctrl = RTC_READ;
55
		memset(&wtime, 0, sizeof(struct rtc_time));
55
		wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
56
		wtime.tm_sec =  BCD2BIN(rtc->bcd_sec);
56
		wtime.tm_min =  BCD2BIN(rtc->bcd_min);
57
		wtime.tm_min =  BCD2BIN(rtc->bcd_min);
57
		wtime.tm_hour = BCD2BIN(rtc->bcd_hr);
58
		wtime.tm_hour = BCD2BIN(rtc->bcd_hr);
(-)linux-2.4.23/arch/ppc64/kernel/rtc.c (+1 lines)
Lines 96-101 Link Here
96
	switch (cmd) {
96
	switch (cmd) {
97
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
97
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
98
	{
98
	{
99
		memset(&wtime, 0, sizeof(struct rtc_time));
99
		ppc_md.get_rtc_time(&wtime);
100
		ppc_md.get_rtc_time(&wtime);
100
		break;
101
		break;
101
	}
102
	}
(-)linux-2.4.23/drivers/acorn/char/i2c.c (+1 lines)
Lines 166-171 Link Here
166
		break;
166
		break;
167
167
168
	case RTC_RD_TIME:
168
	case RTC_RD_TIME:
169
		memset(&rtctm, 0, sizeof(struct rtc_time));
169
		get_rtc_time(&rtc_raw, &year);
170
		get_rtc_time(&rtc_raw, &year);
170
		rtctm.tm_sec  = rtc_raw.secs;
171
		rtctm.tm_sec  = rtc_raw.secs;
171
		rtctm.tm_min  = rtc_raw.mins;
172
		rtctm.tm_min  = rtc_raw.mins;
(-)linux-2.4.23/drivers/char/ds1286.c (-1 / +2 lines)
Lines 173-179 Link Here
173
		 * means "don't care" or "match all". Only the tm_hour,
173
		 * means "don't care" or "match all". Only the tm_hour,
174
		 * tm_min, and tm_sec values are filled in.
174
		 * tm_min, and tm_sec values are filled in.
175
		 */
175
		 */
176
176
		memset(&wtime, 0, sizeof(struct rtc_time));
177
		ds1286_get_alm_time(&wtime);
177
		ds1286_get_alm_time(&wtime);
178
		break;
178
		break;
179
	}
179
	}
Lines 216-221 Link Here
216
	}
216
	}
217
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
217
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
218
	{
218
	{
219
		memset(&wtime, 0, sizeof(struct rtc_time));
219
		ds1286_get_time(&wtime);
220
		ds1286_get_time(&wtime);
220
		break;
221
		break;
221
	}
222
	}
(-)linux-2.4.23/drivers/char/efirtc.c (+1 lines)
Lines 118-123 Link Here
118
static void
118
static void
119
convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
119
convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
120
{
120
{
121
	memset(wtime, 0, sizeof(struct rtc_time));
121
	wtime->tm_sec  = eft->second;
122
	wtime->tm_sec  = eft->second;
122
	wtime->tm_min  = eft->minute;
123
	wtime->tm_min  = eft->minute;
123
	wtime->tm_hour = eft->hour;
124
	wtime->tm_hour = eft->hour;
(-)linux-2.4.23/drivers/char/ip27-rtc.c (+1 lines)
Lines 83-88 Link Here
83
	switch (cmd) {
83
	switch (cmd) {
84
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
84
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
85
	{
85
	{
86
		memset(&wtime, 0, sizeof(struct rtc_time));
86
		get_rtc_time(&wtime);
87
		get_rtc_time(&wtime);
87
		break;
88
		break;
88
	}
89
	}
(-)linux-2.4.23/drivers/char/mips_rtc.c (+1 lines)
Lines 82-87 Link Here
82
82
83
	switch (cmd) {
83
	switch (cmd) {
84
	case RTC_RD_TIME:	/* Read the time/date from RTC  */
84
	case RTC_RD_TIME:	/* Read the time/date from RTC  */
85
		memset(&rtc_tm, 0, sizeof(struct rtc_time));
85
		curr_time = rtc_get_time();
86
		curr_time = rtc_get_time();
86
		to_tm(curr_time, &rtc_tm);
87
		to_tm(curr_time, &rtc_tm);
87
		rtc_tm.tm_year -= 1900;
88
		rtc_tm.tm_year -= 1900;
(-)linux-2.4.23/drivers/char/rtc.c (-1 / +2 lines)
Lines 362-368 Link Here
362
		 * means "don't care" or "match all". Only the tm_hour,
362
		 * means "don't care" or "match all". Only the tm_hour,
363
		 * tm_min, and tm_sec values are filled in.
363
		 * tm_min, and tm_sec values are filled in.
364
		 */
364
		 */
365
365
		memset(&wtime, 0, sizeof(struct rtc_time));
366
		get_rtc_alm_time(&wtime);
366
		get_rtc_alm_time(&wtime);
367
		break; 
367
		break; 
368
	}
368
	}
Lines 406-411 Link Here
406
	}
406
	}
407
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
407
	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
408
	{
408
	{
409
		memset(&wtime, 0, sizeof(struct rtc_time));
409
		get_rtc_time(&wtime);
410
		get_rtc_time(&wtime);
410
		break;
411
		break;
411
	}
412
	}
(-)linux-2.4.23/drivers/hil/hp_sdc_rtc.c (+2 lines)
Lines 561-566 Link Here
561
        }
561
        }
562
        case RTC_ALM_READ:      /* Read the present alarm time */
562
        case RTC_ALM_READ:      /* Read the present alarm time */
563
        {
563
        {
564
		memset(&ttime, 0, sizeof(struct timeval));
564
		if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT;
565
		if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT;
565
                break;
566
                break;
566
        }
567
        }
Lines 609-614 Link Here
609
        }
610
        }
610
        case RTC_RD_TIME:       /* Read the time/date from RTC  */
611
        case RTC_RD_TIME:       /* Read the time/date from RTC  */
611
        {
612
        {
613
		memset(&wtime, 0, sizeof(struct rtc_time));
612
		if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT;
614
		if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT;
613
                break;
615
                break;
614
        }
616
        }
(-)linux-2.4.23/drivers/macintosh/rtc.c (+1 lines)
Lines 64-69 Link Here
64
	case RTC_RD_TIME:
64
	case RTC_RD_TIME:
65
		if (ppc_md.get_rtc_time)
65
		if (ppc_md.get_rtc_time)
66
		{
66
		{
67
			memset(&rtc_tm, 0, sizeof(struct rtc_time));
67
			get_rtc_time(&rtc_tm);
68
			get_rtc_time(&rtc_tm);
68
69
69
			if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
70
			if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
(-)linux-2.4.23/drivers/sbus/char/rtc.c (+1 lines)
Lines 89-94 Link Here
89
	switch (cmd)
89
	switch (cmd)
90
	{
90
	{
91
	case RTCGET:
91
	case RTCGET:
92
		memset(&rtc_tm, 0, sizeof(struct rtc_time));
92
		get_rtc_time(&rtc_tm);
93
		get_rtc_time(&rtc_tm);
93
94
94
		if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
95
		if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))

Return to bug 37317