Re: 2.5.2-pre7 still missing bits of kdev_t

From: Linus Torvalds (torvalds@transmeta.com)
Date: Fri Jan 04 2002 - 16:14:47 EST


On Fri, 4 Jan 2002, Alexander Viro wrote:
>
> Reasons:
> a) foo_mknod() - why the hell would we take dev_t, pass it into
> ->mknod() only to split it into major:minor there and immediately
> rebuild dev_t from them? And that - for _all_ instances of ->mknod()

No, if you make init_special_inode() take minor/major, then you have to
make mknod do the same.

At that point it becomes a ABI issue how the mknod _system_call_ argument
is split up into major/minor, and the rest of the kernel wouldn't really
care.

However, looking more at this, we clearly need to have the same ABI for
stat() as for mknod(), so it probably makes sense to just continue to have
"dev_t is a standard mix of minor/major" numbers approach, and just
continue passing "dev_t" around exactly as such a combination (and then
let people do the proper MKNOD/MAJOR/MINOR macros on it).

So you may be right - there are no real advantage from splitting the two,
as long as dev_t and kdev_t cannot be mixed up by mistake (which is
largely true already now).

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.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 : Mon Jan 07 2002 - 21:00:26 EST