This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Problem creating device files
- From: "Nicolas Boudin" <N dot Boudin at neopost dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 21 Jun 2006 10:47:34 +0200
- Subject: Problem creating device files
Hello,
I get strange results when trying to create device files with this program:
#include <sys/stat.h>
int main (void)
{
int major, minor;
dev_t dev;
major = 5;
minor = 1;
dev = (major << 8) | minor;
mknod ("test", S_IFCHR | 0666, dev);
return 0;
}
After running it, I get:
# ls -al test
crw-rw-rw- 1 NBoudin mkgroup-l-d 0, 1281 Jun 21 10:44 test
However, with "mknod test2 c 5 1":
crw-rw-rw- 1 NBoudin mkgroup-l-d 5, 1 Jun 21 10:44 test2
Why do I get this result?
Bye,
Nicolas
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/