WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Cleanup asm-x86/guest_access.h

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Cleanup asm-x86/guest_access.h
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Thu, 11 Jan 2007 15:53:51 +0100
Delivery-date: Thu, 11 Jan 2007 06:57:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: AMD / OSRC
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.4
Hi!

I cleaned up xen/include/asm-x86/guest_access.h. I also fixed a bug in 
__copy_field_from_guest(), which seems to me to
be a kind of cut-copy-paste bug.

copy_{to,from}_user() and copy_{to,from}_user_hvm() expect a non-const
argument as the first argument. So I remove the consts from the initializer.
I replace typeof with __typeof__, which is always available in gcc - it is 
not, when the -ansi option is used.

I do some explicit casts, which makes gcc errors more readable.
In case, you pass an array by your mistake, which gets
casted to a char *, then gcc tells you that rather just "invalid initializer".

Christoph

Attachment: xen_guest_access.diff
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>