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: Tue, 18 Nov 2008 17:09:04 -0800
Hi Ken,
Hi Chris,
I just want to let you know that I could specify if the start up disk
is connected through firewire bus. Thank you for your information!
Sincerely,
Ryota
2008/9/10 Ryota Tsukiashi <email@hidden>:
> Hi Chris,
>
> Thank you. I will try FSMegaInfo as well.
>
> Ryota
>
> 2008/9/10 Ken Thomases <email@hidden>:
>> On Sep 9, 2008, at 10:23 PM, Chris Suter wrote:
>>
>>> 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.
>>
>> The Disk Arbitration framework may be easier to use than IOKit.
>>
>> You might look at the FSMegaInfo sample code for inspiration regarding other
>> techniques:
>>
>> http://developer.apple.com/samplecode/FSMegaInfo/index.html
>>
>> Cheers,
>> Ken
>>
>>
>
_______________________________________________
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