[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 1/6] hw/ds1338.c: Correct bug in conversion to BC
From: |
Antoine Mathys |
Subject: |
[Qemu-devel] [PATCH v4 1/6] hw/ds1338.c: Correct bug in conversion to BCD. |
Date: |
Wed, 12 Dec 2012 23:59:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Signed-off-by: Antoine Mathys <address@hidden>
---
hw/ds1338.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ds1338.c b/hw/ds1338.c
index b576d56..faaa4a0 100644
--- a/hw/ds1338.c
+++ b/hw/ds1338.c
@@ -57,9 +57,9 @@ static void capture_current_time(DS1338State *s)
} else {
s->nvram[2] = to_bcd(now.tm_hour);
}
- s->nvram[3] = to_bcd(now.tm_wday) + 1;
+ s->nvram[3] = to_bcd(now.tm_wday + 1);
s->nvram[4] = to_bcd(now.tm_mday);
- s->nvram[5] = to_bcd(now.tm_mon) + 1;
+ s->nvram[5] = to_bcd(now.tm_mon + 1);
s->nvram[6] = to_bcd(now.tm_year - 100);
}
--
1.7.10.4
- [Qemu-devel] [PATCH v4 0/6] hw/ds1338.c, Antoine Mathys, 2012/12/12
- [Qemu-devel] [PATCH v4 1/6] hw/ds1338.c: Correct bug in conversion to BCD.,
Antoine Mathys <=
- [Qemu-devel] [PATCH v4 2/6] hw/ds1338.c: Add definitions for various flags in the RTC registers., Antoine Mathys, 2012/12/12
- [Qemu-devel] [PATCH v4 3/6] hw/ds1338.c: Fix handling of HOURS register., Antoine Mathys, 2012/12/12
- [Qemu-devel] [PATCH v4 4/6] hw/ds1338.c: Ensure state is properly initialized., Antoine Mathys, 2012/12/12
- [Qemu-devel] [PATCH v4 6/6] hw/ds1338.c: Fix handling of DAY (wday) register., Antoine Mathys, 2012/12/12
- [Qemu-devel] [PATCH v4 5/6] hw/ds1338.c: Implement support for the control register., Antoine Mathys, 2012/12/12
- Re: [Qemu-devel] [PATCH v4 0/6] hw/ds1338.c, Peter Maydell, 2012/12/13