Messages in this thread | | | From | "H. Peter Anvin" <> | Subject | Re: On re-working the major/minor system | Date | 7 Dec 2001 13:21:58 -0800 |
| |
Followup to: <20011207135100.A17683@codepoet.org> By author: Erik Andersen <andersen@codepoet.org> In newsgroup: linux.dev.kernel > > Right. Tons of apps have illicit insider knowledge of kernel > major/minor representation and NEED IT to do their job. Try > running 'ls -l' on a device node. Wow, it prints out major and > minor number. You can pack up a tarball containing all of /dev > so tar has to has insider major/minor knowledge too -- as does > the structure of every existant tarball! Check out, for example, > Section 10.1.1 (page 210) of the IEEE Std. 1003.1b-1993 (POSIX) > and you will see every tarball in existance stores 8 chars for > the major, and 8 chars for the minor.... >
Actually, it's not "tons of apps", it's in the C library itself.
These things are defined in <sys/sysmacros.h> and anyone who uses anything else should be taken out and shot.
-hpa -- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com> - 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/
| |