LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   difference in behavior between 2.6.18 and 2.6.33 while using mknod (https://www.linuxquestions.org/questions/linux-newbie-8/difference-in-behavior-between-2-6-18-and-2-6-33-while-using-mknod-943319/)

greplinux 05-04-2012 03:54 PM

difference in behavior between 2.6.18 and 2.6.33 while using mknod
 
Hi All,

I am using mknod function in my driver to create a device file.

Code:

mknod("/dev/sampledev", S_IFCHR|S_IRUGO|S_IWUGO, MKDEV(SAMPLE_MAJOR, 0));
While loading this driver in 2.6.18 kernel the permission i get is as following:

Quote:

crw-rw-rw-
In 2.6.33:
Quote:

crw-r--r--
I havent done any changes in the code. can you guys explain this difference in behavior?

Thanks in advance,

business_kid 05-05-2012 12:55 PM

Umask?? Permissions??

Ananda Bbau 05-06-2012 07:03 AM

Same Error
 
Hi All

Me also has got the same write permission problem while using the mknod for kernel 2.6.32. I checked the umask values and permissions all. Please any one can try and give the answer to that..


Please if anyone help for that, it will be better to me.



Thanks,
G.Ananda Babu.

business_kid 05-06-2012 12:57 PM

If everything else is the same, the difference might just be the one you mentioned - 2.6.18 vs 2.6.33. I would compare options also. If IFCHR, S_IRUGO, & S_IWUGO are variables, check them with
Quote:

echo $IFCHR $S_IRUGO $S_IWUGO
MKDEV is what? If it's a script
Quote:

cat MKDEV


All times are GMT -5. The time now is 01:12 AM.