diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-12-29 05:53:57 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-12-29 05:53:57 -0800 |
| commit | dd5a4db6dc90f5dc72c2f4dc38e7880a28d58433 (patch) | |
| tree | 93ec228e4182a8aebc14fdb7e3d529ba0416eca4 | |
| parent | fe8bbcd3b5a0daa344f98024463f253b11d71b52 (diff) | |
[PATCH] fix userspace compiles with nbd.h
From: Paul Clements <Paul.Clements@SteelEye.com>
A previous "cleanup" on the nbd.h header file broke userspace compiles.
I've added an #ifdef __KERNEL__ so that userspace doesn't need to worry
about the nbd_device structure, which is only used in-kernel. The patch
allows me to compile my nbd tools with the 2.6 nbd.h.
| -rw-r--r-- | include/linux/nbd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index 8a3311efe284..dcb0228efcae 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -35,6 +35,9 @@ enum { /* Define PARANOIA to include extra sanity checking code in here & driver */ #define PARANOIA +/* userspace doesn't need the nbd_device structure */ +#ifdef __KERNEL__ + struct nbd_device { int flags; int harderror; /* Code of hard error */ @@ -53,6 +56,8 @@ struct nbd_device { u64 bytesize; }; +#endif + /* This now IS in some kind of include file... */ /* These are send over network in request/reply magic field */ |
