|
|
#1 |
|
Triple-A Player
Join Date: Jan 2007
Posts: 65
|
Hi All,
I m workin on MAC Intel having Os 10.4.10. I have an application in which i m opening the ipod with its name as /dev/rdisk2 and open it in O_WRONLY mode. But actually it return -1 while opening in write mode but if i open it in read mode then it is working. If any one knows how I can open it in my application with O_WRONLY then plz help me out. Thanks. |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Sep 2007
Location: San Jose, CA, USA.
Posts: 290
|
Vishal
I'm surprised by this. I don't write to /dev/xxx, I write to /Volumes/<nameofipod>. In fact I have an alias /iPod -> /Volumes/<nameofipod> and then in terminal, I can do: cd /iPod/Notes ls -alt ~ > ls.txt .... ya ya ya ... All terminal programs seem to be able to read and write to my iPod with my own code. Although I'm using a PowerBook G4 (PPC), I doubt if there's a significant difference between the PPC and the Intel Macs which would causes difficulties. And my code uses fopen("kdkdkd","w") - however I believe the implementation of fopen uses the O_xxxx stuff to which you refer. I'm even delighted to mention that myTouch also works fine! (so I can set the dates correctly). Have you tried to see if you can write to the iPod. For example: cd ~ ls -alt > /Volumes/<ipodname>/Notes/myLs.txt and see if the file in there. Hope that helps. Robin |
|
|
|
|
|
#3 |
|
Triple-A Player
Join Date: Jan 2007
Posts: 65
|
Hi Robin
Actually I m using /dev/rdisk because I doesnot want always to write a file to Ipod . sometime i just want to write 00 to a file . |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|