-   Linux - General (
-   -   Questions re: Removable Media (

swarga 01-26-2012 02:25 PM

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!

kareempharmacist 01-26-2012 04:39 PM

kareempharmacist 01-26-2012 04:54 PM

kareempharmacist 05-28-2012 04:07 PM

In Linux every device is represented by file so the ipod will be a file in /dev ..check this out

kareempharmacist 12-31-2012 09:13 AM

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

All times are GMT -5. The time now is 12:28 AM.