- while( kSuccess == DTIterateProperties( dtIter, &name)) {
-
- if( kSuccess != DTGetProperty( dtEntry, name, &prop, &propSize ))
- continue;
-
- if( copy) {
- nameKey = OSSymbol::withCString(name);
- data = OSData::withBytes(prop, propSize);
- } else {
- nameKey = OSSymbol::withCStringNoCopy(name);
- data = OSData::withBytesNoCopy(prop, propSize);
- }
- assert( nameKey && data );
-
- propTable->setObject( nameKey, data);
- data->release();
- nameKey->release();
-
- if( nameKey == gIODTNameKey ) {
- if( copy)
- sym = OSSymbol::withCString( (const char *) prop);
- else
- sym = OSSymbol::withCStringNoCopy( (const char *) prop);
- regEntry->setName( sym );
- sym->release();
- } else if( nameKey == gIODTUnitKey ) {
- // all OF strings are null terminated... except this one
- if( propSize >= (int) sizeof( location))
- propSize = sizeof( location) - 1;
- strncpy( location, (const char *) prop, propSize );
- location[ propSize ] = 0;
- regEntry->setLocation( location );
- propTable->removeObject( gIODTUnitKey );
- noLocation = false;
-
- } else if( noLocation && (0 == strcmp( name, "reg"))) {
- // default location - override later
- sprintf( location, "%lX", *((UInt32 *) prop) );
- regEntry->setLocation( location );
- }
- }
- DTDisposePropertyIterator( dtIter);
+ while( kSuccess == DTIterateProperties( dtIter, &name)) {
+
+ if( kSuccess != DTGetProperty( dtEntry, name, &prop, &propSize ))
+ continue;
+
+ if( copy) {
+ nameKey = OSSymbol::withCString(name);
+ data = OSData::withBytes(prop, propSize);
+ } else {
+ nameKey = OSSymbol::withCStringNoCopy(name);
+ data = OSData::withBytesNoCopy(prop, propSize);
+ }
+ assert( nameKey && data );
+
+ propTable->setObject( nameKey, data);
+ data->release();
+ nameKey->release();
+
+ if( nameKey == gIODTNameKey ) {
+ if( copy)
+ sym = OSSymbol::withCString( (const char *) prop);
+ else
+ sym = OSSymbol::withCStringNoCopy( (const char *) prop);
+ regEntry->setName( sym );
+ sym->release();
+
+ } else if( nameKey == gIODTUnitKey ) {
+ // all OF strings are null terminated... except this one
+ if( propSize >= (int) sizeof(location))
+ propSize = sizeof(location) - 1;
+ strncpy( location, (const char *) prop, propSize );
+ location[ propSize ] = 0;
+ regEntry->setLocation( location );
+ propTable->removeObject( gIODTUnitKey );
+ noLocation = false;
+
+ } else if(noLocation && (!strncmp(name, "reg", sizeof("reg")))) {
+ // default location - override later
+ snprintf(location, sizeof(location), "%X", *((uint32_t *) prop));
+ regEntry->setLocation( location );
+ }
+ }
+ DTDisposePropertyIterator( dtIter);