Question about <linux/loop.h> - PR libc/786
H.J. Lu
hjl@lucon.org
Fri Oct 2 09:53:00 GMT 1998
>
> >glibc does not define the loop_info structure needed to configure the linux
> >loopback block device. losetup/mount simply include linux/loop.h. The problem
> >is that loop_info contains dev_t members, which are 16bit in the kernel and
> >32bit in glibc userland. Result is that losetup messes up all structure offset
>
> I think losetup and mount can both be counted as Linux-specific utilities that
> need intimate knowledge of kernel structures. We've always said that such
> programs should define their own interfaces if they need them, either
> internally or by having the kernel people provide and maintain a "libloop"
> that knows about the interface the kernel expects.
>
That is the approach I took for knfsd.
H.J.
More information about the Libc-hacker
mailing list