Re: How to determine if the system is started up from firewire disk
Re: How to determine if the system is started up from firewire disk
- Subject: Re: How to determine if the system is started up from firewire disk
- From: "Ryota Tsukiashi" <email@hidden>
- Date: Wed, 10 Sep 2008 17:25:08 -0700
Hi Chris,
Thank you. I will try IOServiceGetMatchingService to get the imformation.
Ryota
2008/9/9 Chris Suter <email@hidden>:
>
>
> On Wed, Sep 10, 2008 at 10:10 AM, Ryota Tsukiashi <email@hidden>
> wrote:
>>
>> I am writing a cocoa application for our firweire device. I need to
>> know if the system is started up from firewire disk. For PowerPC with
>> Mac OSX 10.4/10.5, I have used information from "nvram boot-device".
>> For IntelMac with 10.4/10.5, I have used "nvram efi-boot-device". I am
>> not sure if it is a proper way, but it has been working OK.
>
> No, it's not the right way. That will only tell you what the start up disk
> is set to which isn't necessarily what you started from (for example, you
> could have booted by holding down the Option key).
> One way to do this is to use fsstat on "/" to get the BSD information and
> then use IOKit (IOServiceGetMatchingService) to find the device that refers
> to and then you might have to go up the hierarchy until you hit the level
> you want.
> There might be easier ways to do this; that's just the one I first thought
> of.
> -- Chris
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden