• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Notifications when iPods are mounted...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifications when iPods are mounted...


  • Subject: Re: Notifications when iPods are mounted...
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 14 Jan 2006 13:21:43 +0100

Am 14.01.2006 um 06:58 schrieb Steve Checkoway:
About the easiest way to do this is to get the notification from NSWorkspace (or the Carbon event), get the mounted path to the device and call statfs(2) on that path. Then, if you look at the f_mntfromname member of the statfs struct, it should start with / dev/ (or _PATH_DEV as defined in <paths.h>). Remove that bit and you should have disk[#[s#]]. To get the io_object_t that you would use with the IOKit, you set up a matching dictionary using IOBSDNameMatching() followed a call to IOServiceGetMatchingServices () to get an io_iterator_t to iterate over the devices.

Pascal, Steve,

thanks, I'll try these suggestions. statfs() sounds like something I searched for high and low without ever coming up with anything. Maybe that's the missing link.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Notifications when iPods are mounted... (From: <email@hidden>)
 >Re: Notifications when iPods are mounted... (From: Eamon Ford <email@hidden>)
 >Re: Notifications when iPods are mounted... (From: Uli Kusterer <email@hidden>)
 >Re: Notifications when iPods are mounted... (From: Steve Checkoway <email@hidden>)

  • Prev by Date: NSTextView keydown alternative?
  • Next by Date: Re: Another newbie EXC_BAD_ACCESS in C
  • Previous by thread: Re: Notifications when iPods are mounted...
  • Next by thread: Re: Notifications when iPods are mounted...
  • Index(es):
    • Date
    • Thread