diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2009-09-30 05:17:21 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-10-22 02:09:28 -0400 |
commit | e95646c3ec33c8ec0693992da4332a6b32eb7e31 (patch) | |
tree | 7855767cc4dccdefc4ea64584cc01b64f92176f3 | |
parent | f8b12e513b953aebf30f8ff7d2de9be7e024dbbe (diff) |
virtio: let header files include virtio_ids.h
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>
-rw-r--r-- | Documentation/lguest/lguest.c | 1 | ||||
-rw-r--r-- | drivers/block/virtio_blk.c | 1 | ||||
-rw-r--r-- | drivers/char/hw_random/virtio-rng.c | 1 | ||||
-rw-r--r-- | drivers/char/virtio_console.c | 1 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 1 | ||||
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 1 | ||||
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/virtio_9p.h | 1 | ||||
-rw-r--r-- | include/linux/virtio_balloon.h | 1 | ||||
-rw-r--r-- | include/linux/virtio_blk.h | 1 | ||||
-rw-r--r-- | include/linux/virtio_console.h | 1 | ||||
-rw-r--r-- | include/linux/virtio_net.h | 1 | ||||
-rw-r--r-- | include/linux/virtio_rng.h | 1 | ||||
-rw-r--r-- | net/9p/trans_virtio.c | 1 |
14 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index ba9373f82ab5..098de5bce00a 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <signal.h> | 42 | #include <signal.h> |
43 | #include "linux/lguest_launcher.h" | 43 | #include "linux/lguest_launcher.h" |
44 | #include "linux/virtio_config.h" | 44 | #include "linux/virtio_config.h" |
45 | #include <linux/virtio_ids.h> | ||
46 | #include "linux/virtio_net.h" | 45 | #include "linux/virtio_net.h" |
47 | #include "linux/virtio_blk.h" | 46 | #include "linux/virtio_blk.h" |
48 | #include "linux/virtio_console.h" | 47 | #include "linux/virtio_console.h" |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 348befaaec73..55635d1f697d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -3,7 +3,6 @@ | |||
3 | #include <linux/blkdev.h> | 3 | #include <linux/blkdev.h> |
4 | #include <linux/hdreg.h> | 4 | #include <linux/hdreg.h> |
5 | #include <linux/virtio.h> | 5 | #include <linux/virtio.h> |
6 | #include <linux/virtio_ids.h> | ||
7 | #include <linux/virtio_blk.h> | 6 | #include <linux/virtio_blk.h> |
8 | #include <linux/scatterlist.h> | 7 | #include <linux/scatterlist.h> |
9 | 8 | ||
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 962968f05b94..b6c24dcc987d 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/virtio.h> | 23 | #include <linux/virtio.h> |
24 | #include <linux/virtio_ids.h> | ||
25 | #include <linux/virtio_rng.h> | 24 | #include <linux/virtio_rng.h> |
26 | 25 | ||
27 | /* The host will fill any buffer we give it with sweet, sweet randomness. We | 26 | /* The host will fill any buffer we give it with sweet, sweet randomness. We |
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 0d328b59568d..a035ae39a359 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/err.h> | 31 | #include <linux/err.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/virtio.h> | 33 | #include <linux/virtio.h> |
34 | #include <linux/virtio_ids.h> | ||
35 | #include <linux/virtio_console.h> | 34 | #include <linux/virtio_console.h> |
36 | #include "hvc_console.h" | 35 | #include "hvc_console.h" |
37 | 36 | ||
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8d009760277c..50ac94ce9c16 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/virtio.h> | 24 | #include <linux/virtio.h> |
25 | #include <linux/virtio_ids.h> | ||
26 | #include <linux/virtio_net.h> | 25 | #include <linux/virtio_net.h> |
27 | #include <linux/scatterlist.h> | 26 | #include <linux/scatterlist.h> |
28 | #include <linux/if_vlan.h> | 27 | #include <linux/if_vlan.h> |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 200c22f55130..39789232646d 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | //#define DEBUG | 20 | //#define DEBUG |
21 | #include <linux/virtio.h> | 21 | #include <linux/virtio.h> |
22 | #include <linux/virtio_ids.h> | ||
23 | #include <linux/virtio_balloon.h> | 22 | #include <linux/virtio_balloon.h> |
24 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
25 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 3f384d4b163a..1feed71551c9 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -364,6 +364,7 @@ unifdef-y += utsname.h | |||
364 | unifdef-y += videodev2.h | 364 | unifdef-y += videodev2.h |
365 | unifdef-y += videodev.h | 365 | unifdef-y += videodev.h |
366 | unifdef-y += virtio_config.h | 366 | unifdef-y += virtio_config.h |
367 | unifdef-y += virtio_ids.h | ||
367 | unifdef-y += virtio_blk.h | 368 | unifdef-y += virtio_blk.h |
368 | unifdef-y += virtio_net.h | 369 | unifdef-y += virtio_net.h |
369 | unifdef-y += virtio_9p.h | 370 | unifdef-y += virtio_9p.h |
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index ea7226a45acb..095e10d148b4 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_VIRTIO_9P_H | 2 | #define _LINUX_VIRTIO_9P_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/virtio_ids.h> | ||
5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
6 | 7 | ||
7 | /* Maximum number of virtio channels per partition (1 for now) */ | 8 | /* Maximum number of virtio channels per partition (1 for now) */ |
diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h index 09d730085060..1418f048cb34 100644 --- a/include/linux/virtio_balloon.h +++ b/include/linux/virtio_balloon.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_VIRTIO_BALLOON_H | 2 | #define _LINUX_VIRTIO_BALLOON_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/virtio_ids.h> | ||
5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
6 | 7 | ||
7 | /* The feature bitmap for virtio balloon */ | 8 | /* The feature bitmap for virtio balloon */ |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index 15cb666581d7..1e19470d2da2 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -3,6 +3,7 @@ | |||
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/virtio_ids.h> | ||
6 | #include <linux/virtio_config.h> | 7 | #include <linux/virtio_config.h> |
7 | 8 | ||
8 | /* Feature bits */ | 9 | /* Feature bits */ |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index b5f519806014..fe885174cc1f 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_CONSOLE_H | 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H |
2 | #define _LINUX_VIRTIO_CONSOLE_H | 2 | #define _LINUX_VIRTIO_CONSOLE_H |
3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
4 | #include <linux/virtio_ids.h> | ||
4 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
5 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 6 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
6 | * anyone can use the definitions to implement compatible drivers/servers. */ | 7 | * anyone can use the definitions to implement compatible drivers/servers. */ |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 1f41734bbb77..085e42298ce5 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -3,6 +3,7 @@ | |||
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/virtio_ids.h> | ||
6 | #include <linux/virtio_config.h> | 7 | #include <linux/virtio_config.h> |
7 | #include <linux/if_ether.h> | 8 | #include <linux/if_ether.h> |
8 | 9 | ||
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h index 48121c3c434b..c4d5de896f0c 100644 --- a/include/linux/virtio_rng.h +++ b/include/linux/virtio_rng.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_VIRTIO_RNG_H | 2 | #define _LINUX_VIRTIO_RNG_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/virtio_ids.h> | ||
5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
6 | 7 | ||
7 | #endif /* _LINUX_VIRTIO_RNG_H */ | 8 | #endif /* _LINUX_VIRTIO_RNG_H */ |
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index b2e07f0dd298..ea1e3daabefe 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <net/9p/transport.h> | 43 | #include <net/9p/transport.h> |
44 | #include <linux/scatterlist.h> | 44 | #include <linux/scatterlist.h> |
45 | #include <linux/virtio.h> | 45 | #include <linux/virtio.h> |
46 | #include <linux/virtio_ids.h> | ||
47 | #include <linux/virtio_9p.h> | 46 | #include <linux/virtio_9p.h> |
48 | 47 | ||
49 | #define VIRTQUEUE_NUM 128 | 48 | #define VIRTQUEUE_NUM 128 |