LinuxQuestions.org
Review your favorite Linux distribution.
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-17-2009, 12:56 PM   #1
avyadavnitw
LQ Newbie
 
Registered: Apr 2009
Posts: 16

Rep: Reputation: 0
Device attributes


I have some doubts in Device attributes.
In order to create files in sysfs we use DEVICE_ATTR() macro is used.

But how to create the files and pass the values to the files.
Why we need to use DEVICE_ATTR() macro.......is that any specific purpose r we using.

static DEVICE_ATTR(temp_max, S_IWUSR | S_IRUGO,
show_temp_max, set_temp_max);
http://www.linuxjournal.com/article/7252
i am going thru the above link...............

can anyone please explain me r provide a link which has details abt device attributes?
 
Old 05-18-2009, 06:57 AM   #2
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 285

Rep: Reputation: 32
You can use sysfs APIs too.
http://www.mjmwired.net/kernel/Docum.../sysfs-api.txt

You can have a look into USBIP project's source code for more details.
 
  


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
What are Attributes in Clustering paragkalra Linux - Software 0 10-01-2007 02:51 PM
Kdesktop attributes rogere Linux - Software 0 12-15-2004 09:10 PM
thread attributes iftiuk Programming 2 07-29-2004 02:41 PM
Name the attributes alaios General 5 10-29-2003 07:50 PM
file attributes binky22 Linux - Newbie 2 09-26-2003 05:17 PM


All times are GMT -5. The time now is 04:18 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