]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
virtio: let header files include virtio_ids.h
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 30 Sep 2009 09:17:21 +0000 (11:17 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 22 Oct 2009 06:09:28 +0000 (16:39 +1030)
Rusty,

commit 3ca4f5ca73057a617f9444a91022d7127041970a
    virtio: add virtio IDs file
moved all device IDs into a single file. While the change itself is
a very good one, it can break userspace applications. For example
if a userspace tool wanted to get the ID of virtio_net it used to
include virtio_net.h. This does no longer work, since virtio_net.h
does not include virtio_ids.h.
This patch moves all "#include <linux/virtio_ids.h>" from the C
files into the header files, making the header files compatible with
the old ones.

In addition, this patch exports virtio_ids.h to userspace.

CC: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 files changed:
Documentation/lguest/lguest.c
drivers/block/virtio_blk.c
drivers/char/hw_random/virtio-rng.c
drivers/char/virtio_console.c
drivers/net/virtio_net.c
drivers/virtio/virtio_balloon.c
include/linux/Kbuild
include/linux/virtio_9p.h
include/linux/virtio_balloon.h
include/linux/virtio_blk.h
include/linux/virtio_console.h
include/linux/virtio_net.h
include/linux/virtio_rng.h
net/9p/trans_virtio.c

index ba9373f82ab5fa9fe62276cc27333447a22475ba..098de5bce00a795126301b870c7b19359fe164a0 100644 (file)
@@ -42,7 +42,6 @@
 #include <signal.h>
 #include "linux/lguest_launcher.h"
 #include "linux/virtio_config.h"
-#include <linux/virtio_ids.h>
 #include "linux/virtio_net.h"
 #include "linux/virtio_blk.h"
 #include "linux/virtio_console.h"
index 348befaaec73466bcb037951a3c21b3d5cd77e14..55635d1f697de143d2d60681727afdf182082539 100644 (file)
@@ -3,7 +3,6 @@
 #include <linux/blkdev.h>
 #include <linux/hdreg.h>
 #include <linux/virtio.h>
-#include <linux/virtio_ids.h>
 #include <linux/virtio_blk.h>
 #include <linux/scatterlist.h>
 
index 962968f05b9421dd0182677a874be7795cce0990..b6c24dcc987d62a35a0dc633eabfdddc89c07176 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/scatterlist.h>
 #include <linux/spinlock.h>
 #include <linux/virtio.h>
-#include <linux/virtio_ids.h>
 #include <linux/virtio_rng.h>
 
 /* The host will fill any buffer we give it with sweet, sweet randomness.  We
index 0d328b59568d46f33c7b6e44c676c6709dea2371..a035ae39a3594bad321536817c5943695c3be433 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/virtio.h>
-#include <linux/virtio_ids.h>
 #include <linux/virtio_console.h>
 #include "hvc_console.h"
 
index 8d009760277cede76fead3a54edf2c7669a7acbc..50ac94ce9c16b2c9e524d62729ff7ceac8eacc39 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/ethtool.h>
 #include <linux/module.h>
 #include <linux/virtio.h>
-#include <linux/virtio_ids.h>
 #include <linux/virtio_net.h>
 #include <linux/scatterlist.h>
 #include <linux/if_vlan.h>
index 200c22f55130ba890d37a73a0e565460e8240315..39789232646d8a2314142ccc9d98002da2d35cd8 100644 (file)
@@ -19,7 +19,6 @@
  */
 //#define DEBUG
 #include <linux/virtio.h>
-#include <linux/virtio_ids.h>
 #include <linux/virtio_balloon.h>
 #include <linux/swap.h>
 #include <linux/kthread.h>
index 3f384d4b163acecac3a66cec0dbbd421ff28f729..1feed71551c9676b6863cf1bc96ef4c2cd86ea60 100644 (file)
@@ -364,6 +364,7 @@ unifdef-y += utsname.h
 unifdef-y += videodev2.h
 unifdef-y += videodev.h
 unifdef-y += virtio_config.h
+unifdef-y += virtio_ids.h
 unifdef-y += virtio_blk.h
 unifdef-y += virtio_net.h
 unifdef-y += virtio_9p.h
index ea7226a45acbbf46a36684a8596e1734e5f52331..095e10d148b40d32780621dec6f259a5c90c22e1 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_VIRTIO_9P_H
 /* This header is BSD licensed so anyone can use the definitions to implement
  * compatible drivers/servers. */
+#include <linux/virtio_ids.h>
 #include <linux/virtio_config.h>
 
 /* Maximum number of virtio channels per partition (1 for now) */
index 09d730085060afc91d3a01d60c9698a274e57555..1418f048cb34741919b788160a4657eba462b2fe 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_VIRTIO_BALLOON_H
 /* This header is BSD licensed so anyone can use the definitions to implement
  * compatible drivers/servers. */
+#include <linux/virtio_ids.h>
 #include <linux/virtio_config.h>
 
 /* The feature bitmap for virtio balloon */
index 15cb666581d7cbdb42cd7d39f4d309ac59399fb0..1e19470d2da21185272f40ab506b2c38c0558677 100644 (file)
@@ -3,6 +3,7 @@
 /* This header is BSD licensed so anyone can use the definitions to implement
  * compatible drivers/servers. */
 #include <linux/types.h>
+#include <linux/virtio_ids.h>
 #include <linux/virtio_config.h>
 
 /* Feature bits */
index b5f51980601445b79a13493cb8521a1c97692bb3..fe885174cc1f061ef8d0b706a362d27574ca616f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _LINUX_VIRTIO_CONSOLE_H
 #define _LINUX_VIRTIO_CONSOLE_H
 #include <linux/types.h>
+#include <linux/virtio_ids.h>
 #include <linux/virtio_config.h>
 /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
  * anyone can use the definitions to implement compatible drivers/servers. */
index 1f41734bbb777b0147926ed0964a79d84fa6d026..085e42298ce5b1b9f353f457951e7fc49a5ef949 100644 (file)
@@ -3,6 +3,7 @@
 /* This header is BSD licensed so anyone can use the definitions to implement
  * compatible drivers/servers. */
 #include <linux/types.h>
+#include <linux/virtio_ids.h>
 #include <linux/virtio_config.h>
 #include <linux/if_ether.h>
 
index 48121c3c434b6781661167debbf7b4a7540945fd..c4d5de896f0c1b0fa1cd2d0b2e98dadf4a4d8b8f 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_VIRTIO_RNG_H
 /* This header is BSD licensed so anyone can use the definitions to implement
  * compatible drivers/servers. */
+#include <linux/virtio_ids.h>
 #include <linux/virtio_config.h>
 
 #endif /* _LINUX_VIRTIO_RNG_H */
index b2e07f0dd29844f046fef7acad2e6e1824d33d8b..ea1e3daabefeddb1dc6f46ddf5538b33cc3c0317 100644 (file)
@@ -43,7 +43,6 @@
 #include <net/9p/transport.h>
 #include <linux/scatterlist.h>
 #include <linux/virtio.h>
-#include <linux/virtio_ids.h>
 #include <linux/virtio_9p.h>
 
 #define VIRTQUEUE_NUM  128