static DeviceState * qbus_find_dev ( BusState * bus , char * elem ) {
 DeviceState * dev ;
 QLIST_FOREACH ( dev , & bus -> children , sibling ) {
 if ( dev -> id && strcmp ( dev -> id , elem ) == 0 ) {
 return dev ;
 }
 }
 QLIST_FOREACH ( dev , & bus -> children , sibling ) {
 if ( strcmp ( dev -> info -> name , elem ) == 0 ) {
 return dev ;
 }
 }
 QLIST_FOREACH ( dev , & bus -> children , sibling ) {
 if ( dev -> info -> alias && strcmp ( dev -> info -> alias , elem ) == 0 ) {
 return dev ;
 }
 }
 return NULL ;
 }
static DeviceState * qbus_find_dev ( BusState * bus , char * elem ) {
 DeviceState * dev ;
 QLIST_FOREACH ( dev , & bus -> children , sibling ) {
 if ( dev -> id && strcmp ( dev -> id , elem ) == 0 ) {
 return dev ;
 }
 }
 QLIST_FOREACH ( dev , & bus -> children , sibling ) {
 if ( strcmp ( dev -> info -> name , elem ) == 0 ) {
 return dev ;
 }
 }
 QLIST_FOREACH ( dev , & bus -> children , sibling ) {
 if ( dev -> info -> alias && strcmp ( dev -> info -> alias , elem ) == 0 ) {
 return dev ;
 }
 }
 return NULL ;
 }