* [Qemu-devel] [patch] Do not print RTC frequency warning if it's already ok
@ 2004-12-23 13:09 Guillem Jover
0 siblings, 0 replies; only message in thread
From: Guillem Jover @ 2004-12-23 13:09 UTC (permalink / raw)
To: qemu-devel
[-- 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");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-12-23 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-23 13:09 [Qemu-devel] [patch] Do not print RTC frequency warning if it's already ok Guillem Jover
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).