the great adobe cs2 case-sensitive adventure, part 4: a new plan
I'm a little perturbed that breaking on open, stat, getattrlist and friends haven't yet revealed what file photoshop isn't finding. I tested a whole whack of 'em, though I suppose I could've been more exhaustive. it seems like I'll spend more time searching for system calls than for what photoshop is actually doing.
so it's time to change tactics. somewhere in the guts of the system, a filename is being converted into something a little more abstract. and on hfsx*, it's not, because a case-sensitive compare is happening. fortunately, those guts are very likely available for perusal.
and indeed, in hfs_MountHFSPlusVolume() in xnu*/bsd/hfs/hfs_vfsutils.c, we see the following:
tn1150 tells us all about this, and also talks about the case-insensitive unicode-compliant compare that's being called in CompareExtendedCatalogKeys. so my current plan is to build a copy of xnu (not so easy), instrument CompareExtendedCatalogKeys, and get that to dump out when the case-insensitive compare succeeds and the case-sensitive compare fails. cake.
so it's time to change tactics. somewhere in the guts of the system, a filename is being converted into something a little more abstract. and on hfsx*, it's not, because a case-sensitive compare is happening. fortunately, those guts are very likely available for perusal.
and indeed, in hfs_MountHFSPlusVolume() in xnu*/bsd/hfs/hfs_vfsutils.c, we see the following:
retval = MacToVFSError(BTOpenPath(VTOF(hfsmp->hfs_catalog_vp),
(KeyCompareProcPtr) CompareExtendedCatalogKeys));
...
if ((hfsmp->hfs_flags & HFS_X) &&
BTGetInformation(VTOF(hfsmp->hfs_catalog_vp), 0, &btinfo) == 0) {
if (btinfo.keyCompareType == kHFSBinaryCompare) {
hfsmp->hfs_flags |= HFS_CASE_SENSITIVE;
/* Install a case-sensitive key compare */
(void) BTOpenPath(VTOF(hfsmp->hfs_catalog_vp),
(KeyCompareProcPtr)cat_binarykeycompare);
}
}
tn1150 tells us all about this, and also talks about the case-insensitive unicode-compliant compare that's being called in CompareExtendedCatalogKeys. so my current plan is to build a copy of xnu (not so easy), instrument CompareExtendedCatalogKeys, and get that to dump out when the case-insensitive compare succeeds and the case-sensitive compare fails. cake.
0 Comments:
Post a Comment
<< Home