From: Guillem Jover <guillem@debian.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] Do not print RTC frequency warning if it's already ok
Date: Thu, 23 Dec 2004 14:09:30 +0100 [thread overview]
Message-ID: <20041223130930.GB776@zulo.hadrons.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
Hi,
This is a patch for a bug reported in Debian. It now only prints
the RTC frequency warning when the current value is different than
the one wanted.
Patch attached.
regards,
guillem
[-- Attachment #2: qemu-0.6.1_not_print_rtc_freq_if_ok.patch --]
[-- Type: text/plain, Size: 1007 bytes --]
Package: qemu
Version: 0.6.1
Author: Guillem Jover <guillem@debian.org>
Status: not-applied
Description:
Do not print warning if the current RTC frequency is ok.
diff -Naur qemu-0.6.1.orig/vl.c qemu-0.6.1/vl.c
--- qemu-0.6.1.orig/vl.c 2004-11-14 21:51:33.000000000 +0100
+++ qemu-0.6.1/vl.c 2004-11-27 19:03:44.000000000 +0100
@@ -852,10 +852,14 @@
static int start_rtc_timer(void)
{
+ unsigned long current_rtc_freq = 0;
+
rtc_fd = open("/dev/rtc", O_RDONLY);
if (rtc_fd < 0)
return -1;
- if (ioctl(rtc_fd, RTC_IRQP_SET, RTC_FREQ) < 0) {
+ ioctl(rtc_fd, RTC_IRQP_READ, ¤t_rtc_freq);
+ if (current_rtc_freq != RTC_FREQ &&
+ ioctl(rtc_fd, RTC_IRQP_SET, RTC_FREQ) < 0) {
fprintf(stderr, "Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal\n"
"error, but for better emulation accuracy either use a 2.6 host Linux kernel or\n"
"type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.\n");
reply other threads:[~2004-12-23 13:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041223130930.GB776@zulo.hadrons.org \
--to=guillem@debian.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).