• 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: GUID Partition Type and custom partition types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUID Partition Type and custom partition types


  • Subject: Re: GUID Partition Type and custom partition types
  • From: Jim O'Connor <email@hidden>
  • Date: Thu, 12 Jul 2007 10:18:30 -0500

Dan,

Thank you so much for the help! I was very confused by the fact that it SEEMED to work, just not for long.


Jim

On Jul 12, 2007, at 10:14 AM, Dan Markarian wrote:

Hey Jim,

<key>Content Hint</key>
<string>Company_NULL_Filtered_HFS 5EA7E2D2- DFD0-4A68-9E7A-3EB6E18DCB64</string>

This does not work. You have two options.

The simplest is to create two personalities:

<key>IOKitPersonalities</key>
<dict>
<key>Company_NULL_Filtered_HFS</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.company.iomediafilter.nullfilter</string>
<key>Content Hint</key>
<string>Company_NULL_Filtered_HFS 5EA7E2D2- DFD0-4A68-9E7A-3EB6E18DCB64</string>
<key>IOClass</key>
<string>com_ company_iomediafilter_nullfilter</string>
<key>IOMatchCategory</key>
<string>IOStorage</string>
<key>IOProviderClass</key>
<string>IOMedia</string>
</dict>
<key>5EA7E2D2-DFD0-4A68-9E7A-3EB6E18DCB64</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.company.iomediafilter.nullfilter</string>
<key>Content Hint</key>
<string>5EA7E2D2-DFD0-4A68-9E7A-3EB6E18DCB64</string>
<key>IOClass</key>
<string>com_ company_iomediafilter_nullfilter</string>
<key>IOMatchCategory</key>
<string>IOStorage</string>
<key>IOProviderClass</key>
<string>IOMedia</string>
</dict>
</dict>


The shortest is to use a feature of IOPropertyMatch:

	<key>IOKitPersonalities</key>
	<dict>
		<key>Company_NULL_Filtered_HFS</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>com.company.iomediafilter.nullfilter</string>
			<key>IOClass</key>
			<string>com_ company_iomediafilter_nullfilter</string>
			<key>IOMatchCategory</key>
			<string>IOStorage</string>
			<key>IOPropertyMatch</key>
			<array>
				<dict>
					<key>Content Hint</key>
					<string>Company_NULL_Filtered_HFS</string>
				</dict>
				<dict>
					<key>Content Hint</key>
					<string>5EA7E2D2-DFD0-4A68-9E7A-3EB6E18DCB64</string>
				</dict>
			</array>
			<key>IOProviderClass</key>
			<string>IOMedia</string>
		</dict>
	</dict>

Dan

On 11 Jul 2007, at 8:04 PM, Jim O'Connor wrote:

I want my filter to match on EITHER an Apple Partition Table or a Guid Partition Table.

I've set up my Info.plist like so (most of it is straight from the sample code, so I'll assume it is right)...

<key>IOKitPersonalities</key>
<dict>
<key>Company_NULL_Filtered_HFS</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.company.iomediafilter.nullfilter</string>
<key>Content Hint</key>
<string>Company_NULL_Filtered_HFS 5EA7E2D2- DFD0-4A68-9E7A-3EB6E18DCB64</string>
<key>IOClass</key>
<string>com_ company_iomediafilter_nullfilter</string>
<key>IOMatchCategory</key>
<string>IOStorage</string>
<key>IOProviderClass</key>
<string>IOMedia</string>
</dict>
</dict>


My understanding is that the space separated strings indicate an "or" type of condition. "Some of the keys may take a list of space- delimited values, which are generally examined in an OR fashion." from Driver Personalities and Matching Languages in IOKitFundamentals.

I build this KEXT, test it as the READ ME describes, using both an APT and GPT disk image and everything appears to be happy.

Then leave it alone for a while and when I come back I get:

kextload: NullFilter.kext loaded successfully
hdiutil: attach failed - no mountable file systems"

I remove either the GUID or the Company_NULL_Filtered_HFS from the info.plist and force it to rebuild and run the test again and the one which is in works and the one which is out doesn't.
Wait a minute for the kext to unload.
Put them both back into the hint and either type of disk will work.
Wait a while and neither will work.


There is something going on with the caching of the kext that is messing me up, I guess.

Is there any light to be shed on this? Is this the correct way to make a single KEXT handle either type of partition?


Thanks, Jim


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Filesystem-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: GUID Partition Type and custom partition types (From: Jim O'Connor <email@hidden>)
 >Re: GUID Partition Type and custom partition types (From: Dan Markarian <email@hidden>)

  • Prev by Date: Re: GUID Partition Type and custom partition types
  • Next by Date: Browsing custom networks and the Find
  • Previous by thread: Re: GUID Partition Type and custom partition types
  • Next by thread: Browsing custom networks and the Find
  • Index(es):
    • Date
    • Thread