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 11-06-2006, 04:38 AM   #1
rahul_kulkarni
Member
 
Registered: Dec 2004
Posts: 32

Rep: Reputation: 15
Does linux generate any event when...


Hello All,

Does linux os generate any event when it finds U.S.B. in U.S.B. driver? If yes, how to catch that from the program? If not, is ther any other way to do this?

Thanks in advance,
// Rahul
 
Old 11-06-2006, 04:49 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well the underlying framework that manages usb devices is udevd in conjunction with hotplugd. these are very much event based and chuck all sorts of messages around. having said that i don't really know what you mean by "when it finds U.S.B. in U.S.B. driver" so can't really be sure that's what you're after.
 
Old 11-06-2006, 05:06 AM   #3
rahul_kulkarni
Member
 
Registered: Dec 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks for the reply. Here is what I want to do:

Basically, I want to read and copy the files (on harddisk)available on usb when sombody inserts usb in a drive. Instead of polling usb drive continuously I would like my daemon to work on event based call back function.

Regards,
// Rahul
 
Old 11-07-2006, 06:11 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
that's just what udev and hotplug are there for. based on any number of identifiable traits, e.g. device type, maker, serial number, block name, they will run a program or perform other such tasks. you would not need your own daemon to do this, it's already done.
 
  


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
(bash) echo "#!/bin/bash" event not found - trying to generate profiles automatically jimieee Programming 9 05-03-2006 10:24 AM
Is there something like event viewer in Linux? ArchW Linux - Newbie 4 03-13-2006 07:11 PM
Generate a system event to send email ? debian_dummy Debian 2 05-02-2004 04:37 AM
Need to generate popup alerts on linux machines professorfrink Linux - Software 10 04-17-2004 09:27 AM
Need to generate popup message on Linux machines professorfrink Linux - General 4 11-14-2003 10:46 AM


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