From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: James McMechan <james_mcmechan@hotmail.com>
Subject: Re: [uml-devel] [ link to patch] resurrecting the uml-hcd
Date: Sun, 13 Aug 2006 17:56:18 +0200 [thread overview]
Message-ID: <200608131756.18571.blaisorblade@yahoo.it> (raw)
In-Reply-To: <BAY101-F3556FC13777163E2ABDF69E2490@phx.gbl>
On Sunday 13 August 2006 17:41, James McMechan wrote:
> >From: Blaisorblade <blaisorblade@yahoo.it>
> >To: user-mode-linux-devel@lists.sourceforge.net
> >CC: "James McMechan" <james_mcmechan@hotmail.com>,
> >linux-usb-devel@lists.sourceforge.net
> >Subject: Re: [uml-devel] [ link to patch] resurrecting the uml-hcd
> >Date: Sun, 13 Aug 2006 13:24:28 +0200
> No problem, I don't like it either, if the registration functions
> still worked I would have kept using the old ones and defered the
> platform update.
Don't worry, that's clear.
> this is the result of mad typeing to get the silly thing
> working under 2.6.17
>
> it is not too hard to just delete the !PLATFORM sections but I will
> be needing them in 2.6.12 later so I had left them in
> the struct redefs and function arg changes don't seem to fit well
> into a header abstraction unless you want #RETURNVALUE1
> #ARGLIST1 and simliar oddness.
See the irqreturn_t definition - they suggest similar things indeed for 2.4
compatibility (they suggest "add
#if 2.4
#define irqreturn_t void
#define IRQ_HANDLED /**/
#endif
).
> If I understood you correctly my problem would be
> in .h
> #ifdef KERN2_6_17
> #define func old_func
> #else
> #define func new_func
> #endif
> and in .c
> #ifdef PLATFORM
> new_return new_func(new_arg)
> {}
> #else
> old_return old_func(old_arg)
> {}
> #endif
> since the new and old version won't compile due to
> renaming arguments and return values that don't exist
> in the other version I think I would just end up duplicating
> the code in a bigger ifdef.
I don't know the specific issue (i.e. how different are the two routines), my
proposal was something like
#if LINUX_KERNEL_VERSION < ...
#define pci_init_driver pci_register_driver
#endif
or to have a micro-wrapper just for the changed thing. If the init is too
different then ok - actually if you write with the #ifdef possibly when you
merge you can remove it, and even if you keep it I don't think there will be
too many objections.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2006-08-13 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-13 4:10 [uml-devel] [ link to patch] resurrecting the uml-hcd James McMechan
2006-08-13 11:24 ` Blaisorblade
2006-08-13 15:41 ` James McMechan
2006-08-13 15:56 ` Blaisorblade [this message]
2006-08-13 16:00 ` Blaisorblade
2006-08-13 19:00 ` [uml-devel] [linux-usb-devel] " Alan Stern
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=200608131756.18571.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=james_mcmechan@hotmail.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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