* [Qemu-devel] [Patch] Kqemu patch for 2.6.17-rc2
@ 2006-05-10 21:41 Thomas Petazzoni
2006-06-06 14:15 ` Leonardo E. Reiter
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2006-05-10 21:41 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1.1: Type: text/plain, Size: 929 bytes --]
Hi,
On 2.6.17-rc2, the MODULE_PARM() way of declaring module parameters
seems to have disappeared (it is anyway deprecated since the beginning
of the 2.6 series). As such, kqemu-1.3.0pre7 doesn't compile.
/home/thomas/kqemu-1.3.0pre7/kqemu-linux.c:52: error: syntax error before string constant
/home/thomas/kqemu-1.3.0pre7/kqemu-linux.c:52: warning: type defaults to ‘int’ in declaration of ‘MODULE_PARM’
/home/thomas/kqemu-1.3.0pre7/kqemu-linux.c:52: warning: function declaration isn’t a prototype
/home/thomas/kqemu-1.3.0pre7/kqemu-linux.c:52: warning: data definition has no type or storage class
The attached patch fixes it.
Sincerly,
Thomas
--
PETAZZONI Thomas - thomas.petazzoni@enix.org
http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@jabber.dk
http://{agenda,livret}dulibre.org - http://www.toulibre.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: kqemu-linux-2.6.17-rc2.patch --]
[-- Type: text/x-patch; name=kqemu-linux-2.6.17-rc2.patch, Size: 466 bytes --]
--- kqemu-1.3.0pre7/kqemu-linux.c 2006-05-07 16:28:05.000000000 +0200
+++ kqemu-1.3.0pre7.new/kqemu-linux.c 2006-05-10 23:35:25.000000000 +0200
@@ -49,7 +49,7 @@
/* if 0 is used, then devfs/udev is used to automatically create the
device */
int major = 250;
-MODULE_PARM(major,"i");
+module_param(major, int, 0);
/* Lock the page at virtual address 'user_addr' and return its
physical address (page index). Return a host OS private user page
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Patch] Kqemu patch for 2.6.17-rc2
2006-05-10 21:41 [Qemu-devel] [Patch] Kqemu patch for 2.6.17-rc2 Thomas Petazzoni
@ 2006-06-06 14:15 ` Leonardo E. Reiter
2006-06-07 20:34 ` Nigel J. Terry
0 siblings, 1 reply; 3+ messages in thread
From: Leonardo E. Reiter @ 2006-06-06 14:15 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
Hi,
I'm attaching a small update to Thomas's patch which conditionally
enables this based on kernel version. As far as I can tell (from very
brief research), module_param became available very late in 2.4. Also,
the old version (MODULE_PARM) is supported in most 2.6 kernels as well.
I picked arbitrarily 2.6.10 as the break-off point - it's really easy
to change that to be something else. In any case, Fabrice, can you
think about applying this, or something very similar, as it looks like
MODULE_PARM has been finally abandoned in the latest kernels.
Regards,
Leo Reiter
Thomas Petazzoni wrote:
> Hi,
>
> On 2.6.17-rc2, the MODULE_PARM() way of declaring module parameters
> seems to have disappeared (it is anyway deprecated since the beginning
> of the 2.6 series). As such, kqemu-1.3.0pre7 doesn't compile.
--
Leonardo E. Reiter
Vice President of Product Development, CTO
Win4Lin, Inc.
Virtual Computing that means Business
Main: +1 512 339 7979
Fax: +1 512 532 6501
http://www.win4lin.com
[-- Attachment #2: kqemu-linux-module-param.diff --]
[-- Type: text/x-patch, Size: 489 bytes --]
--- kqemu-linux.c.orig 2006-06-06 10:06:03.000000000 -0400
+++ kqemu-linux.c 2006-06-06 10:09:41.000000000 -0400
@@ -49,7 +49,11 @@
/* if 0 is used, then devfs/udev is used to automatically create the
device */
int major = 250;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
MODULE_PARM(major,"i");
+#else
+module_param(major, int, 0);
+#endif
/* Lock the page at virtual address 'user_addr' and return its
physical address (page index). Return a host OS private user page
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Patch] Kqemu patch for 2.6.17-rc2
2006-06-06 14:15 ` Leonardo E. Reiter
@ 2006-06-07 20:34 ` Nigel J. Terry
0 siblings, 0 replies; 3+ messages in thread
From: Nigel J. Terry @ 2006-06-07 20:34 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/html, Size: 2051 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-07 20:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10 21:41 [Qemu-devel] [Patch] Kqemu patch for 2.6.17-rc2 Thomas Petazzoni
2006-06-06 14:15 ` Leonardo E. Reiter
2006-06-07 20:34 ` Nigel J. Terry
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).