LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 03: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, 12:55 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Umask?? Permissions??
 
Old 05-06-2012, 07: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, 12:57 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

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



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 01:24 AM
Unexpected results: Difference in Perl Script Behavior between manual and cron runs EnderX Programming 3 12-10-2010 11:42 PM
using mknod jiml8 Linux - Software 2 07-22-2007 04:26 PM
mknod Basel Linux From Scratch 1 09-03-2005 02:13 PM
mknod Infinite_Pizza Linux - Software 2 04-14-2005 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:50 AM.

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
Open Source Consulting | Domain Registration