All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Boeglin <alex@boeglin.org>
To: grub-devel@gnu.org
Subject: [PATCH] fix GRUB_TICKS_PER_SECOND in include/grub/efi/time.h
Date: Sun, 17 Feb 2008 12:52:40 +0100	[thread overview]
Message-ID: <20080217115240.GB8497@boeglin.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

Hi,

This small patch fixes grub_get_rtc on EFI architecture. If I understood
correctly, one minute is 60000 milliseconds, not 3600.

Alex

[-- Attachment #2: grub2_efitime.patch --]
[-- Type: text/x-diff, Size: 1523 bytes --]

Index: ChangeLog
===================================================================
RCS file: /sources/grub/grub2/ChangeLog,v
retrieving revision 1.591
diff -u -p -r1.591 ChangeLog
--- ChangeLog	17 Feb 2008 10:32:02 -0000	1.591
+++ ChangeLog	17 Feb 2008 11:47:50 -0000
@@ -1,3 +1,8 @@
+2008-02-17  Alexandre Boeglin  <alex@boeglin.org>
+
+	* include/grub/efi/time.h (GRUB_TICKS_PER_SECOND): One minute is 60 * 1000
+	milliseconds.
+
 2008-02-17  Robert Millan  <rmh@aybabtu.com>
 
 	* util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
Index: include/grub/efi/time.h
===================================================================
RCS file: /sources/grub/grub2/include/grub/efi/time.h,v
retrieving revision 1.2
diff -u -p -r1.2 time.h
--- include/grub/efi/time.h	21 Jul 2007 23:32:23 -0000	1.2
+++ include/grub/efi/time.h	17 Feb 2008 11:47:50 -0000
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2006,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2006,2007,2008  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 #include <grub/symbol.h>
 
 /* This is destined to overflow when one minute passes by.  */
-#define GRUB_TICKS_PER_SECOND	((1UL << 31) / 60 / 60 * 2)
+#define GRUB_TICKS_PER_SECOND	((1UL << 31) / 60 / 1000 * 2)
 
 /* Return the real time in ticks.  */
 grub_uint32_t EXPORT_FUNC (grub_get_rtc) (void);

             reply	other threads:[~2008-02-17 11:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-17 11:52 Alexandre Boeglin [this message]
2008-02-17 12:15 ` [PATCH] fix GRUB_TICKS_PER_SECOND in include/grub/efi/time.h Alexandre Boeglin
2008-02-17 14:55   ` Alexandre Boeglin
2008-02-21 18:53     ` Alexandre Boeglin
2008-02-21 21:16       ` Yoshinori K. Okuji
2008-02-21 21:08 ` Yoshinori K. Okuji
2008-02-22  7:49   ` Alexandre Boeglin
2008-02-22  8:24     ` Yoshinori K. Okuji
2008-02-29 12:52       ` Alexandre Boeglin
2008-03-01 17:30         ` Yoshinori K. Okuji

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=20080217115240.GB8497@boeglin.org \
    --to=alex@boeglin.org \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.