Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LND0S-0000yo-FS for qemu-devel@nongnu.org; Wed, 14 Jan 2009 16:10:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LND0R-0000y9-F5 for qemu-devel@nongnu.org; Wed, 14 Jan 2009 16:10:31 -0500 Received: from [199.232.76.173] (port=48920 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LND0R-0000y6-8f for qemu-devel@nongnu.org; Wed, 14 Jan 2009 16:10:31 -0500 Received: from hall.aurel32.net ([88.191.82.174]:44450) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LND0Q-0003iN-T7 for qemu-devel@nongnu.org; Wed, 14 Jan 2009 16:10:31 -0500 Date: Wed, 14 Jan 2009 22:10:29 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] Fix day of week in mc146818 Message-ID: <20090114211029.GJ20474@hall.aurel32.net> References: <496A02B2.1000309@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <496A02B2.1000309@reactos.org> Sender: Aurelien Jarno Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-15?Q?Herv=E9?= Poussineau Cc: qemu-devel@nongnu.org On Sun, Jan 11, 2009 at 03:31:14PM +0100, Hervé Poussineau wrote: > Hello, > > According to mc146818 specification, Day of Week register (#6) is > between 1 and 7, 1 representing Sunday. > According C specification, tm_wday field in struct tm is between 0 and > 6, 0 representing Sunday. > > Bit 2 of register B (#11) is named DM (data mode) and specifies if RTC > stores values in BCD or in binary form. > > Attached patch fixes the off by one error and replaces magic value 0x04 > by REG_B_DM. > > Signed-off-by: Hervé Poussineau > Thanks, applied. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net