[Linux1394-cvslog] rev 547 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-08-09 04:30:53
|
Author: bencollins Date: 2002-08-09 09:18:29 -0400 (Fri, 09 Aug 2002) New Revision: 547 Modified: trunk/nodemgr.c Log: Fix proc devices listing for some odd cases Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2002-08-09 09:18:29.000000000 -0400 @@ -133,16 +133,24 @@ /* Now the unit directories */ list_for_each (l, &ne->unit_directories) { struct unit_directory *ud = list_entry (l, struct unit_directory, node_list); + int printed = 0; // small hack + PUTF(" Unit Directory %d:\n", ud_count++); - if (ud->flags & UNIT_DIRECTORY_VENDOR_ID) + if (ud->flags & UNIT_DIRECTORY_VENDOR_ID) { PUTF(" Vendor/Model ID: %s [%06x]", ud->vendor_name ?: "Unknown", ud->vendor_id); - else if (ud->flags & UNIT_DIRECTORY_MODEL_ID) /* Have to put something */ - PUTF(" Vendor/Model ID: %s [%06x]", - ne->vendor_name ?: "Unknown", ne->vendor_id); - if (ud->flags & UNIT_DIRECTORY_MODEL_ID) + printed = 1; + } + if (ud->flags & UNIT_DIRECTORY_MODEL_ID) { + if (!printed) + PUTF(" Vendor/Model ID: %s [%06x]", + ne->vendor_name ?: "Unknown", ne->vendor_id); PUTF(" / %s [%06x]", ud->model_name ?: "Unknown", ud->model_id); - PUTF("\n"); + printed = 1; + } + if (printed) + PUTF("\n"); + if (ud->flags & UNIT_DIRECTORY_SPECIFIER_ID) PUTF(" Software Specifier ID: %06x\n", ud->specifier_id); if (ud->flags & UNIT_DIRECTORY_VERSION) |