Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-06-2005, 12:46 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
How to detect USB Flash drive in C program?

I am using 2.4 kernel. And i am trying to write a C program that detects when USB stick is jacked in.

I am a newbie in linux. Please help me how i could do it.

Thanks in advance
Old 12-06-2005, 02:56 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.

The solution depends on which level you want it to run (GUI application? text mode? deamon?). You may look at hotplug, however. It should help you with your task.


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
How to detect insertion/removal of flash card in usb reader? logularjason Linux - Hardware 9 06-24-2006 03:11 AM
Suse 10.0 not detect USB Zip drive Donb SUSE / openSUSE 1 10-21-2005 03:51 PM
kinoppix 3.7 doesnot detect the usb flash drive nirVaan Linux - Newbie 2 06-02-2005 01:16 AM
How to auto-detect USB drive in RedHat 9? pelakh Red Hat 1 05-06-2004 01:02 PM
Failure to detect SanDisk Cruzer 256 USB Flash Drive on RH 8.0 sudz1979 Linux - Hardware 3 02-25-2004 01:10 PM > Forums > Non-*NIX Forums > Programming

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