LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
 
Search this Thread
Old 06-12-2013, 04:21 PM   #1
PeterUK
Member
 
Registered: May 2009
Posts: 277

Rep: Reputation: 16
Slackware- udev rules


I am creating a rule which do:

Code:
DRIVER=="usbtest", RUN+="/bin/sh -c 'echo -n %k> %S%p/driver/unbind'"
What does actually do?

dmesg give:

Code:
[38346.717705] usbtest 2-3:1.0: FX2 device
[38346.717709] usbtest 2-3:1.0: high-speed {control bulk-in bulk-out} tests (+alt)
[38346.717728] usbcore: registered new interface driver usbtest
What exactly is that? Thanks

UPDATE:
Also compiling the code I get this warning
Quote:
warning 197: keyword 'xdata' is deprecated, use '__xdata' instead
Why is that?

Last edited by PeterUK; 06-12-2013 at 05:45 PM.
 
Old 07-09-2013, 01:25 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Answering because no answers for many days, not because I'm an expert ...

The rule means:
  1. DRIVER==usbtest Apply this rule to all devices which the kernel chooses to use the usbtest driver for.
  2. RUN+= Add the following command to commands to be run for this device (will be ineffective if there is a subsequent RUN=).
  3. "/bin/sh -c '...'" Run /bin/sh, telling it to execute the command in single quotes.
  4. echo -n %k> %S%p/driver/unbind Write the kernel name for this device to /sys/<path for this device>/driver/unbind. That explanation is based on the udev man page documentation of %* "substitutions" and may well not be exactly right. Maybe %S is /proc, not /sys.
The meaning of the first two lines of quoted dmesg depends on the usbtest driver itself. The third presumably means the usbtest driver has been added/loaded within the USB drivers framework.

What are you compiling?
 
Old 07-09-2013, 01:46 AM   #3
bartgymnast
Member
 
Registered: Feb 2003
Location: Lelystad, Netherlands
Distribution: slack 7.1 till latest and -current, LFS
Posts: 335

Rep: Reputation: 123Reputation: 123
hi PeterUK, the Warning is a warning.
It basicaly means that you compile the code against another program that has released a newer version.
In this newer version they are using '__xdata' instead of 'xdata'

so the program you are compiling is basically written against an older version of the dependency.
and do not worry it is a warning, and not an error.
 
Old 07-09-2013, 04:09 AM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,713

Rep: Reputation: 535Reputation: 535Reputation: 535Reputation: 535Reputation: 535Reputation: 535
Quote:
Originally Posted by bartgymnast View Post
hi PeterUK, the Warning is a warning.
It basicaly means that you compile the code against another program that has released a newer version.
In this newer version they are using '__xdata' instead of 'xdata'

so the program you are compiling is basically written against an older version of the dependency.
and do not worry it is a warning, and not an error.
Compilers emit warnings for errors that aren't so bad that the compiler cannot continue. You should fully understand what the warning means before you hand wave it away as a "no biggie."
 
  


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
slackware 12.0, udev rules for usb-dev works, but mounting does not work correct paalmarker Linux - General 5 03-30-2010 01:51 AM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
udev rules Slackware 11 swampdog2002 Slackware 9 11-17-2006 07:06 PM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM


All times are GMT -5. The time now is 10:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration