* mknod bug? major minor's are whacky
@ 2010-08-17 23:46 Bob Goldberg
2010-08-17 23:52 ` Eric Blake
0 siblings, 1 reply; 3+ messages in thread
From: Bob Goldberg @ 2010-08-17 23:46 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
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!?!?
and how do I re-create a null device if mknod doesn't work right?
TIA
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mknod bug? major minor's are whacky
2010-08-17 23:46 mknod bug? major minor's are whacky Bob Goldberg
@ 2010-08-17 23:52 ` Eric Blake
2010-08-18 10:11 ` Corinna Vinschen
0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2010-08-17 23:52 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mknod bug? major minor's are whacky
2010-08-17 23:52 ` Eric Blake
@ 2010-08-18 10:11 ` Corinna Vinschen
0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2010-08-18 10:11 UTC (permalink / raw)
To: cygwin
On Aug 17 17:51, Eric Blake wrote:
> 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!?!?
They come from Cygwin. They are an accidental reflection of the
volume id, which is used in stat::st_rdev for files by default.
Cygwin only set st_dev to the device number so far. I fixed that
in CVS so that st_rdev and st_dev both contain the device number
now for device files.
Thanks for the report,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-18 10:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-17 23:46 mknod bug? major minor's are whacky Bob Goldberg
2010-08-17 23:52 ` Eric Blake
2010-08-18 10:11 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).