LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2012, 04:54 PM   #1
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Rep: Reputation: 17
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,
 
Old 05-05-2012, 01:55 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,775

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Umask?? Permissions??
 
Old 05-06-2012, 08:03 AM   #3
Ananda Bbau
LQ Newbie
 
Registered: May 2012
Posts: 9

Rep: Reputation: Disabled
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.
 
Old 05-06-2012, 01:57 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,775

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference in Apache2 behavior depending on URL. snilloc Linux - Software 0 11-20-2011 02:24 AM
Unexpected results: Difference in Perl Script Behavior between manual and cron runs EnderX Programming 3 12-11-2010 12:42 AM
using mknod jiml8 Linux - Software 2 07-22-2007 05:26 PM
mknod Basel Linux From Scratch 1 09-03-2005 03:13 PM
mknod Infinite_Pizza Linux - Software 2 04-14-2005 09:59 PM


All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration