qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu/hw m48t59.c
Date: Wed, 14 Jun 2006 12:41:34 +0000	[thread overview]
Message-ID: <E1FqUgg-0006S2-IR@savannah.gnu.org> (raw)

CVSROOT:	/sources/qemu
Module name:	qemu
Changes by:	Fabrice Bellard <bellard>	06/06/14 12:41:34

Modified files:
	hw             : m48t59.c 

Log message:
	clock year fix for sparc (Blue Swirl)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/m48t59.c?cvsroot=qemu&r1=1.7&r2=1.8

Patches:
Index: m48t59.c
===================================================================
RCS file: /sources/qemu/qemu/hw/m48t59.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- m48t59.c	30 Oct 2005 16:58:32 -0000	1.7
+++ m48t59.c	14 Jun 2006 12:41:34 -0000	1.8
@@ -332,6 +332,9 @@
 	tmp = fromBCD(val);
 	if (tmp >= 0 && tmp <= 99) {
 	    get_time(NVRAM, &tm);
+            if (NVRAM->type == 8)
+                tm.tm_year = fromBCD(val) + 68; // Base year is 1968
+            else
 	    tm.tm_year = fromBCD(val);
 	    set_time(NVRAM, &tm);
 	}
@@ -421,6 +424,9 @@
     case 0x1FFF:
         /* year */
         get_time(NVRAM, &tm);
+        if (NVRAM->type == 8) 
+            retval = toBCD(tm.tm_year - 68); // Base year is 1968
+        else
         retval = toBCD(tm.tm_year);
         break;
     default:

             reply	other threads:[~2006-06-14 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-14 12:41 Fabrice Bellard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-04 10:56 [Qemu-devel] qemu/hw m48t59.c Blue Swirl
2007-09-30  1:29 Jocelyn Mayer
2007-12-29  9:03 Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1FqUgg-0006S2-IR@savannah.gnu.org \
    --to=fabrice@bellard.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).