LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-26-2012, 02:25 PM   #1
swarga
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Questions re: Removable Media


Hi all,

I'm writing a little app that automatically uploads mp3 files to my iPod. Obviously, things could really get screwed up if someone accidentally unplugs the iPod while its database is being updated. My questions are these:

1. Is there some API that my program can call to programmatically "lock" the iPod (i.e. prevent the eject command from unmounting the iPod)? Obviously nothing is going to stop someone from physically yanking the plug out, but at least if they try an eject and it reports failure they might get a clue.

2. Barring the lock, is there a way for my app to receive some sort of notification that the iPod has been ejected? I figure if the app can somehow be informed that the iPod is no longer mounted it can at least abort any further write attempts.

If it matters, my system is running Fedora 14.

Thanks for your help!
 
Old 01-26-2012, 04:39 PM   #2
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo Egypt
Distribution: CrunchBang,Linux Mint,Slackopuppy
Posts: 266

Rep: Reputation: 18
http://ifile.it/uo5ey4/__Linux_Devic...rd_Edition.pdf


http://ifile.it/zh5xo8/__USB_Mass_St...dded_Hosts.pdf
 
Old 01-26-2012, 04:54 PM   #3
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo Egypt
Distribution: CrunchBang,Linux Mint,Slackopuppy
Posts: 266

Rep: Reputation: 18
http://www.linuxquestions.org/linux/...ing_Libusb_API
 
Old 05-28-2012, 04:07 PM   #4
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo Egypt
Distribution: CrunchBang,Linux Mint,Slackopuppy
Posts: 266

Rep: Reputation: 18
In Linux every device is represented by file so the ipod will be a file in /dev ..check this out
http://linux.about.com/od/srl_howto/a/hwtsrl15t02.htm



http://en.wikipedia.org/wiki/File_locking
 
Old 12-31-2012, 09:13 AM   #5
kareempharmacist
Member
 
Registered: Jan 2012
Location: Cairo Egypt
Distribution: CrunchBang,Linux Mint,Slackopuppy
Posts: 266

Rep: Reputation: 18
did you manage to solve your problem and find out how to do it?
if yes ,please mark the thread as "solved"
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removable Drives and Media Skaperen Ubuntu 2 12-17-2009 10:35 AM
Fluxbox - removable media wadsworth Slackware 9 09-11-2009 11:31 PM
Removable Media zalibidas Slackware 2 01-24-2009 09:09 AM
Install without removable media MaizeNBlue2 Slackware 3 12-06-2006 02:40 PM
How to mount a removable media using C skie_knite007 Programming 1 10-02-2005 12:49 AM


All times are GMT -5. The time now is 06:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration