From: Andreas Dilger <email@example.com>
> In this struct the occurrences of dev_t have been replaced by their
> actual values (short int / int / long int).
Even better, have specific sized types (__u16, __u32, __u64) for the
fields, so there is no ambiguity (e.g. sparc64, or 32-bit code running
I replaced the dev_t's by the actual thing they were typedef'd to.
That is guaranteed to preserve correctness.
> In the patch below I remove the definition for this struct from
> <linux/loop.h> and put it in <asm/loopinfo.h>.
Great. Now we have 20 copies of asm-foo/loopinfo.h. Couldn't you
just have asm-generic/loopinfo.h and each of the arch-specific
pieces just include that?
Yes, a bit ugly. I could have saved kernel source (20 small files)
by using __legacy_dev_t in loop.h, with a typedef of __legacy_dev_t
Maybe I should have done that. The reason I did what I did is
that all these defined types give lots of complications in
user space code. Maintainability of the union of kernel and
user space source is increased by just saying explicitly
what these types are.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:23 EST