Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-17-2009, 11:56 AM   #1
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() that any specific purpose r we using.

static DEVICE_ATTR(temp_max, S_IWUSR | S_IRUGO,
show_temp_max, set_temp_max);
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, 05:57 AM   #2
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.

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


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 01:51 PM
Kdesktop attributes rogere Linux - Software 0 12-15-2004 08:10 PM
thread attributes iftiuk Programming 2 07-29-2004 01:41 PM
Name the attributes alaios General 5 10-29-2003 06:50 PM
file attributes binky22 Linux - Newbie 2 09-26-2003 04:17 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 PM.

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