Messages in this thread |  | | | Date | Fri, 23 Apr 1999 16:40:37 +0200 | | From | Andi Kleen <> | | Subject | Re: /dev/loop0 offset doen't work on /dev/scd0 |
| |
On Fri, Apr 23, 1999 at 03:49:33PM +0200, Andreas Schwab wrote: > Andi Kleen <ak@muc.de> writes: > > |> On Fri, Apr 23, 1999 at 11:20:55AM +0200, Andreas Schwab wrote: > |> > dwguest@win.tue.nl (Guest section DW) writes: > |> > > |> > |> The current code in util-linux does > |> > |> > |> > |> #include <linux/posix_types.h> > |> > |> #define dev_t __kernel_dev_t > |> > |> #include <linux/loop.h> > |> > |> #undef dev_t > |> > |> > |> > |> which is not very elegant but as far as I know works on all systems. > |> > > |> > IMHO the right fix is to use __kernel_dev_t in <linux/loop.h> in the first > |> > place. > |> > |> But if you want to do anything intelligent with the __kernel_dev_t > |> you need a way to convert it into a glibc dev_t. > > A simple cast will do.
But you cannot know if glibc didn't do other things with the dev_t. Is it guaranteed that the glibc dev_t will forever be convertible to a __kernel_dev_t (and vice versa) with a single cast?
I think glibc should supply public functions to do that (this is not only for loop, but I suspect lots of third-party kernel modules have the same problem)
Noone ever said that it was simple to separate the glibc ABI from the kernel ABI ;)
-Andi -- This is like TV. I don't like TV.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |