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] why the /dev/mem ioctl ?

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] why the /dev/mem ioctl ?
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Fri, 1 Oct 2004 16:32:33 -0400 (EDT)
Cc: Arjan Van de Ven <arjanv@xxxxxxxxxx>
Delivery-date: Fri, 01 Oct 2004 21:46:05 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Hi,

While creating a patch file from the latest Xen, I noticed
something strange.  There's an ioctl being added to /dev/mem.

I'm wondering what it's used for and why it's using /dev/mem
instead of (say) /dev/xenctl ...

+static int ioctl_mem(struct inode * inode, struct file * file, unsigned 
int cmd, unsigned long arg)
+{
+       switch (cmd) {
+       case _IO('M', 1): file->private_data = (void *)arg; break;
+       default: return -ENOSYS;
+       }
+       return 0;
+}

+#if defined(CONFIG_XEN_PRIVILEGED_GUEST)
+       .ioctl          = ioctl_mem,
+#endif


-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>