mknod bug? major minor's are whacky
Eric Blake
eblake@redhat.com
Tue Aug 17 23:52:00 GMT 2010
On 08/17/2010 05:46 PM, Bob Goldberg wrote:
> cygwin 1.7.6
>
> attempting to:
> $ mknod null c 1 3
>
> what I get is:
> crw-rw-rw- 1 user mkgroup-l-d 46200, 14467 2010-08-17 18:44 null
>
> WHERE did those crazy major/minor's come from!?!?
The fact that your owner is mkgroup-l-d is probably a hint - my guess is
that cygwin is returning -1 because you haven't set up your user
database correctly, rather than an actual device number. If that's the
case, then cygwin could probably be fixed (device major/minor node
numbers need not depend on whether the user database is set up correctly).
At any rate, Cygwin does not necessarily use the same major/minor node
numbers as Linux. Any use of mknod outside of creating named pipes is
_highly_ platform dependent, and your best bet is to read the source
code for the actual node numbers that cygwin supports rather than
relying on something that worked for Linux.
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100817/2ce2faea/attachment.sig>
More information about the Cygwin
mailing list