home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / update701 / root.16 / usr / lib / scoadmin / hotplug / hotplugGUI / hotplugGUI~
Text File  |  1998-08-18  |  75KB  |  1,648 lines

  1. #!/bin/osavtcl
  2. # Copyright (c) 1992-1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3. #                                                                         
  4. #        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5. #                   SANTA CRUZ OPERATION INC.                             
  6. #                                                                         
  7. #   The copyright notice above does not evidence any actual or intended   
  8. #   publication of such source code.                                      
  9.  
  10. #******************************************************************************
  11. #
  12. #    Copyright (C) 1992-1998 The Santa Cruz Operation, Inc.
  13. #        All Rights Reserved.
  14. #
  15. #    The information in this file is provided for the exclusive use of
  16. #    the licensees of The Santa Cruz Operation, Inc.  Such users have the
  17. #    right to use, modify, and incorporate this code into other products
  18. #    for purposes authorized by the license agreement provided they include
  19. #    this notice and the associated copyright notice with any such product.
  20. #    The information in this file is provided "AS IS" without warranty.
  21. #
  22. #===============================================================================
  23. #@package: SCO_HOTPLUG_GUI_MSGS SCO_HOTPLUG_GUI_MSGS
  24. proc SCO_HOTPLUG_GUI_MSGS {} {}
  25. global SCO_HOTPLUG_GUI_MSGS
  26. set SCO_HOTPLUG_GUI_MSGS(@catalog@) {hotplugGUI.cat@sa 1}
  27. set SCO_HOTPLUG_GUI_MSGS(MSG_APP_TITLE) {1 {Hot-Plug Manager}}
  28. set SCO_HOTPLUG_GUI_MSGS(MSG_FILE_MENU) {2 File}
  29. set SCO_HOTPLUG_GUI_MSGS(MSG_EXIT) {3 Exit}
  30. set SCO_HOTPLUG_GUI_MSGS(MSG_VIEW_LOGFILE) {4 {View HotPlug Log File}}
  31. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_MENU) {5 Operations}
  32. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_POWER_ON) {6 {Power On}}
  33. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_POWER_OFF) {7 {Power Off}}
  34. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_ATT_ON) {8 {Attention Indicator On}}
  35. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_ATT_OFF) {9 {Attention Indicator Off}}
  36. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_ADD_DRIVER) {10 {Add Driver}}
  37. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_RESUME_DRIVER) {11 {Resume Driver}}
  38. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_SUSPEND_DRIVER) {12 {Suspend Driver}}
  39. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_DELETE_DRIVER) {13 {Delete Driver}}
  40. set SCO_HOTPLUG_GUI_MSGS(MSG_VIEW_MENU) {14 View}
  41. set SCO_HOTPLUG_GUI_MSGS(MSG_VIEW_DETAILS) {15 {Detailed View}}
  42. set SCO_HOTPLUG_GUI_MSGS(MSG_VIEW_AUTOREFRESH) {16 {Set Auto Refresh}}
  43. set SCO_HOTPLUG_GUI_MSGS(MSG_VIEW_REFRESHNOW) {17 {Refresh Now}}
  44. set SCO_HOTPLUG_GUI_MSGS(MSG_OPTIONS_MENU) {18 Options}
  45. set SCO_HOTPLUG_GUI_MSGS(MSG_OPTIONS_PNTHELP) {19 {Point Help}}
  46. set SCO_HOTPLUG_GUI_MSGS(MSG_OPTIONS_PREFER) {20 Preferences}
  47. set SCO_HOTPLUG_GUI_MSGS(MSG_HELP_MENU) {21 Help}
  48. set SCO_HOTPLUG_GUI_MSGS(MSG_HELP_INDEX) {22 Index}
  49. set SCO_HOTPLUG_GUI_MSGS(MSG_HELP_ABOUT) {23 {About Hot-Plug Manager}}
  50. set SCO_HOTPLUG_GUI_MSGS(MSG_ON) {24 On}
  51. set SCO_HOTPLUG_GUI_MSGS(MSG_OFF) {25 Off}
  52. set SCO_HOTPLUG_GUI_MSGS(MSG_INTERVAL) {26 Interval}
  53. set SCO_HOTPLUG_GUI_MSGS(MSG_BUS_VIEW) {27 {Bus View Selection}}
  54. set SCO_HOTPLUG_GUI_MSGS(MSG_POWER_LABEL) {28 Power}
  55. set SCO_HOTPLUG_GUI_MSGS(MSG_ATT_LABEL) {29 Attention}
  56. set SCO_HOTPLUG_GUI_MSGS(MSG_INTERLOCK_LABEL) {30 Interlock}
  57. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_LABEL) {31 Slot}
  58. set SCO_HOTPLUG_GUI_MSGS(MSG_LEGEND_LABEL) {32 {Icon Legend}}
  59. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_ROOT) {33 {You must be root to run the Hot-Plug Manager.}}
  60. set SCO_HOTPLUG_GUI_MSGS(MSG_SELECT_DEVICE) {34 {Please select a device.}}
  61. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_POWER_ON) {35 {Turns power on to a slot.}}
  62. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_POWER_OFF) {36 {Turns power off to a slot.}}
  63. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_ATT_ON) {37 {Turns the Attention Indicator on to a slot.}}
  64. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_ATT_OFF) {38 {Turns the Attention Indicator off to a slot.}}
  65. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_ADD_DRIVER) {39 {Binds a driver to the selected device.}}
  66. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_RESUME_DRIVER) {40 {Resumes a suspended driver onto a compatible device.}}
  67. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_SUSPEND_DRIVER) {41 {Suspends a driver from the selected device.}}
  68. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_DELETE_DRIVER) {42 {Removes the selected driver from the suspended list.}}
  69. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_DETAILS) {43 {Shows detailed information on the selected slot/driver/device.}}
  70. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_SETREFRESH) {44 {Allows the user to set the Auto Refresh Rate.}}
  71. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_REFRESHNOW) {45 {Refreshes the display now.}}
  72. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_PNTHELP) {46 {Turns the short help dispay off/on.}}
  73. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_PREFER) {47 {Allows the user to turn display messages off/on.}}
  74. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_HELPINDEX) {48 {Help Index????.}}
  75. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_ABOUTHP) {49 {Displays version information about the Hot-Plug Manager.}}
  76. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_VIEWLOG) {50 {View the Hot-Plug events log file.}}
  77. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_EXIT) {51 {Exit the Hot-Plug Manager session.}}
  78. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_TOGGLE1) {52 {Display warning messages for hot-plug actions on empty slots.}}
  79. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_TOGGLE2) {53 {Display 'Are you sure?' dialog boxes when powering down a slot.}}
  80. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_TOGGLE3) {54 {Automatically power down a slot when all attached drivers have been removed.}}
  81. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_SUSPENDS) {55 {No Suspended drivers currently exist on this system.}}
  82. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_FIRST) {56 {Are you sure you want to turn power on to an empty slot?}}
  83. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_SECOND) {57 {Are you sure you want to power down the selected slot?}}
  84. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_THIRD) {58 {Are you sure you want to turn the Attention LED on to an empty slot?}}
  85. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_FOURTH) {59 {Are you sure you want to turn the Attention LED off to an empty slot?}}
  86. set SCO_HOTPLUG_GUI_MSGS(MSG_POWERON_LOG) {60 {Turning the power on to slot %d}}
  87. set SCO_HOTPLUG_GUI_MSGS(MSG_POWEROFF_LOG) {61 {Turning the power off to slot %d}}
  88. set SCO_HOTPLUG_GUI_MSGS(MSG_ATTON_LOG) {62 {Turning the Attention LED on to slot %d}}
  89. set SCO_HOTPLUG_GUI_MSGS(MSG_ATTOFF_LOG) {63 {Turning the Attention LED off to slot %d}}
  90. set SCO_HOTPLUG_GUI_MSGS(MSG_SUCCESS) {64 Successful}
  91. set SCO_HOTPLUG_GUI_MSGS(MSG_FAIL) {65 Failed}
  92. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_COMPATIBLE) {66 {There were no compatible devices found.}}
  93. set SCO_HOTPLUG_GUI_MSGS(MSG_SELECT_DEVICE) {67 {Select a Device}}
  94. set SCO_HOTPLUG_GUI_MSGS(MSG_SELECT_DRIVER) {68 {Select a Driver}}
  95. set SCO_HOTPLUG_GUI_MSGS(MSG_PREFER_HEADING) {69 Preferences}
  96. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_PCILIST) {70 {Slot and/or Device information.   Double click for details.}}
  97. set SCO_HOTPLUG_GUI_MSGS(MSG_SH_SUSPLIST) {71 {Suspended Drivers information.   Double click for details.}}
  98. set SCO_HOTPLUG_GUI_MSGS(MSG_POWER_ETC_CHARM_LABEL) {72 {Power   Attention   Interlock   Slot}}
  99. set SCO_HOTPLUG_GUI_MSGS(MSG_WARNING) {73 WARNING}
  100. set SCO_HOTPLUG_GUI_MSGS(MSG_ERROR) {74 ERROR}
  101. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND) {75 {View the Icon Legend}}
  102. set SCO_HOTPLUG_GUI_MSGS(MSG_ASYNC_CARD_INSERTED) {76 {An asynchronous event occurred: A card was inserted on slot %d}}
  103. set SCO_HOTPLUG_GUI_MSGS(MSG_ASYNC_CARD_REMOVED) {77 {An asynchronous event occurred: A card was removed from slot %d}}
  104. set SCO_HOTPLUG_GUI_MSGS(MSG_ASYNC_INTERLOCK_OPEN) {78 {An asynchronous event occurred: The interlock was opened on slot %d}}
  105. set SCO_HOTPLUG_GUI_MSGS(MSG_ASYNC_INTERLOCK_CLOSE) {79 {An asynchronous event occurred: The interlock was closed on slot %d}}
  106. set SCO_HOTPLUG_GUI_MSGS(MSG_LOG_EVENTS) {80 {Hot Plug Log Events}}
  107. set SCO_HOTPLUG_GUI_MSGS(MSG_SET_REFRESH) {81 {Auto Refresh Interval}}
  108. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DETAILS) {82 {Detailed Slot %d Information}}
  109. set SCO_HOTPLUG_GUI_MSGS(MSG_DRIVER_DETAILS) {83 {Detailed Driver Information}}
  110. set SCO_HOTPLUG_GUI_MSGS(MSG_NIC_MSG) {84 {Make sure you run the NIC Configuration utility (netcfg) after powering up this NIC card.}}
  111. set SCO_HOTPLUG_GUI_MSGS(MSG_NIC_RESUME) {85 {Make sure you run the NIC Configuration utility (netcfg) after resuming this NIC driver.}}
  112. set SCO_HOTPLUG_GUI_MSGS(MSG_INFO) {86 Information}
  113. set SCO_HOTPLUG_GUI_MSGS(MSG_LOAD_DRIVER) {87 {The driver you are trying to bind has not been loaded. Please load the driver before attempting a bind operation.}}
  114. set SCO_HOTPLUG_GUI_MSGS(MSG_ISBOOT) {88 {The device you have chosen is a boot controller device. The Hot Plug Manager Utility prevents a Power Off or Suspend operation from taking place on such a device.}}
  115. set SCO_HOTPLUG_GUI_MSGS(MSG_BUS_DET_TITLE) {89 {Hot Plug PCI Bus Information - Detailed View}}
  116. set SCO_HOTPLUG_GUI_MSGS(MSG_BUS_DET_BUSNUM) {90 {PCI Bus Number:}}
  117. set SCO_HOTPLUG_GUI_MSGS(MSG_BUS_DET_SPEED_CAPABLE) {91 {Bus Speed Capability:}}
  118. set SCO_HOTPLUG_GUI_MSGS(MSG_BUS_DET_CURRENT_SPEED) {92 {Current Bus Speed:}}
  119. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_TITLE) {93 {Hot Plug Slot Information - Detailed View}}
  120. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_ID) {94 {Slot Identifier:}}
  121. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_POWER) {95 {Power Indicator:}}
  122. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_ATTENTION) {96 {Attention Indicator:}}
  123. set SCO_HOTPLUG_GUI_MSGS(MSG_DRIVER_NAME) {97 {Driver Name:}}
  124. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_INTERLOCK) {98 {Interlock Opened or Closed:}}
  125. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_SPEED_CAPABLE) {99 {Adapter Card Speed Capability:}}
  126. set SCO_HOTPLUG_GUI_MSGS(MSG_SLOT_DET_POWER_REQS) {100 {Power Requirements:}}
  127. set SCO_HOTPLUG_GUI_MSGS(MSG_DEVDRV_DET_TITLE) {101 {Device/Device Driver Information - Detailed View}}
  128. set SCO_HOTPLUG_GUI_MSGS(MSG_DEV_DET_INFO) {102 {Device %d Information}}
  129. set SCO_HOTPLUG_GUI_MSGS(MSG_DEV_DESCRIPTION) {103 {Device Description:}}
  130. set SCO_HOTPLUG_GUI_MSGS(MSG_RMKEY) {104 {Resource Manager Key:}}
  131. set SCO_HOTPLUG_GUI_MSGS(MSG_CAPABILITIES) {105 {Driver Capabilities:}}
  132. set SCO_HOTPLUG_GUI_MSGS(MSG_SUSPEND_LISTBOX_LABEL) {106 {Suspended Driver Instances}}
  133. set SCO_HOTPLUG_GUI_MSGS(MSG_SUSP_DET_TITLE) {107 {Suspended Driver Information - Detailed View}}
  134. set SCO_HOTPLUG_GUI_MSGS(MSG_SUSP_DET_PREVIOUS_BUS) {108 {Previous Bus:}}
  135. set SCO_HOTPLUG_GUI_MSGS(MSG_SUSP_DET_PREVIOUS_SLOT) {109 {Previous Slot:}}
  136. set SCO_HOTPLUG_GUI_MSGS(MSG_GENERAL_FAULT) {110 {A general fault occurred on the selected slot.}}
  137. set SCO_HOTPLUG_GUI_MSGS(MSG_POWER_FAULT) {111 {A power fault occurred on the selected slot.}}
  138. set SCO_HOTPLUG_GUI_MSGS(MSG_CONFIG_FAULT) {112 {A configuration fault occurred on the selected slot.}}
  139. set SCO_HOTPLUG_GUI_MSGS(MSG_FREQ_MISMATCH) {113 {There was a mismatch in frequencies on the selected slot.}}
  140. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_POWER_ON) {114 {Power On}}
  141. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_ATTENTION_ON) {115 {Attention LED On}}
  142. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_POWER_OFF) {116 {Power Off/Attention LED Off}}
  143. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_INTERLOCK_OPEN) {117 {Interlock Open}}
  144. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_INTERLOCK_CLOSED) {118 {Interlock Closed}}
  145. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_INTERLOCK_NOT_SUPPORTED) {119 {Interlock Not Supported}}
  146. set SCO_HOTPLUG_GUI_MSGS(MSG_ICON_LEGEND_CARD_PRESENT) {120 {Card Present}}
  147. set SCO_HOTPLUG_GUI_MSGS(MSG_EMPTY_SLOT) {121 {Empty Slot}}
  148. set SCO_HOTPLUG_GUI_MSGS(MSG_BOUND) {122 Bound}
  149. set SCO_HOTPLUG_GUI_MSGS(MSG_UNBOUND) {123 Unbound}
  150. set SCO_HOTPLUG_GUI_MSGS(MSG_SUSPENDED_ID) {124 {Suspended ID:}}
  151. set SCO_HOTPLUG_GUI_MSGS(MSG_HOTPLUG_ACTIONS) {125 {Add Resume Suspend Delete}}
  152. set SCO_HOTPLUG_GUI_MSGS(MSG_ADD) {126 Add}
  153. set SCO_HOTPLUG_GUI_MSGS(MSG_SUSPEND) {127 Suspend}
  154. set SCO_HOTPLUG_GUI_MSGS(MSG_DELETE) {128 Delete}
  155. set SCO_HOTPLUG_GUI_MSGS(MSG_RESUME) {129 Resume}
  156. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_HOTPLUG_SLOTS) {130 {There were no Hot Plug slots found on this system.}}
  157. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_INIT) {131 {No Hot Plug controller driver(s) configured in the system.}}
  158. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_MEMORY) {132 {Not enough memory}}
  159. set SCO_HOTPLUG_GUI_MSGS(MSG_OP_NOT_SUPPORTED) {133 {The operation is not supported by the associated driver.}}
  160. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_SUCH_OPTION) {134 {No such Hot Plug operation exists.}}
  161. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_MODULE_NAMES) {135 {No module names exist for this device.}}
  162. set SCO_HOTPLUG_GUI_MSGS(MSG_DEVICE) {136 Device}
  163. set SCO_HOTPLUG_GUI_MSGS(MSG_NO_EXPANSION_BRD) {137 {No expansion board present.}}
  164. set SCO_HOTPLUG_GUI_MSGS(MSG_25WATT_BRD) {138 {Expansion board present, 25W maximum.}}
  165. set SCO_HOTPLUG_GUI_MSGS(MSG_15WATT_BRD) {139 {Expansion board present, 15W maximum.}}
  166. set SCO_HOTPLUG_GUI_MSGS(MSG_75WATT_BRD) {140 {Expansion board present, 7.5W maximum.}}
  167. set SCO_HOTPLUG_GUI_MSGS(MSG_CLUSTER_NODENUM) {141 {Cluster node number:}}
  168. set SCO_HOTPLUG_GUI_MSGS(MSG_LOG_REMOVING_DRIVER) {142 {Removing driver %s.}}
  169. set SCO_HOTPLUG_GUI_MSGS(MSG_LOG_RESUMING_DRIVER) {143 {Resuming a driver on slot %d.}}
  170. set SCO_HOTPLUG_GUI_MSGS(MSG_LOG_SUSPENDING_DRIVER) {144 {Suspending driver on slot %d.}}
  171. set SCO_HOTPLUG_GUI_MSGS(MSG_LOG_BINDING_DRIVER) {145 {Binding a driver to a device on slot %d.}}
  172. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_DEVICE) {146 {Unknown device}}
  173. set SCO_HOTPLUG_GUI_MSGS(MSG_NON_VGA) {147 {Old implementation; non VGA-compatible device}}
  174. set SCO_HOTPLUG_GUI_MSGS(MSG_VGA) {148 {Old implementation; VGA-compatible device}}
  175. set SCO_HOTPLUG_GUI_MSGS(MSG_SCSI_BUS_CTRL) {149 {Mass storage device; SCSI bus controller}}
  176. set SCO_HOTPLUG_GUI_MSGS(MSG_IDE_BUS_CTRL) {150 {Mass storage device; IDE bus controller}}
  177. set SCO_HOTPLUG_GUI_MSGS(MSG_FLOPPY_CTRL) {151 {Mass storage device; Floppy disk controller}}
  178. set SCO_HOTPLUG_GUI_MSGS(MSG_IPI_BUS_CTRL) {152 {Mass storage device; IPI bus controller}}
  179. set SCO_HOTPLUG_GUI_MSGS(MSG_RAID_CTRL) {153 {Mass storage device; RAID controller}}
  180. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_MASS_STORAGE) {154 {Unidentified Mass storage device}}
  181. set SCO_HOTPLUG_GUI_MSGS(MSG_ETHERNET_CTRL) {155 {Network device; Ethernet controller}}
  182. set SCO_HOTPLUG_GUI_MSGS(MSG_TOKEN_RING_CTRL) {156 {Network device; Token Ring controller}}
  183. set SCO_HOTPLUG_GUI_MSGS(MSG_FDDI_CTRL) {157 {Network device; FDDI controller}}
  184. set SCO_HOTPLUG_GUI_MSGS(MSG_ATM_CTRL) {158 {Network device; ATM controller}}
  185. set SCO_HOTPLUG_GUI_MSGS(MSG_VGA_CTRL) {159 {Display device; VGA-compatible controller}}
  186. set SCO_HOTPLUG_GUI_MSGS(MSG_NETWORK_DEVICE) {160 {Network device}}
  187. set SCO_HOTPLUG_GUI_MSGS(MSG_XGA_CTRL) {161 {Display device; XGA controller}}
  188. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_DISPLAY_DEVICE) {162 {Unidentified Display device}}
  189. set SCO_HOTPLUG_GUI_MSGS(MSG_MULTI_VIDEO_CTRL) {163 {Multimedia device; Video controller}}
  190. set SCO_HOTPLUG_GUI_MSGS(MSG_AUDIO_CTRL) {164 {Multimedia device; Audio controller}}
  191. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_MULTIMEDIA) {165 {Unidentified Multimedia device}}
  192. set SCO_HOTPLUG_GUI_MSGS(MSG_FLASH_MEM) {166 {Flash Memory controller}}
  193. set SCO_HOTPLUG_GUI_MSGS(MSG_RAM_MEM_CTRL) {167 {RAM Memory controller}}
  194. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_MEM_CTRL) {168 {Unidentified Memory controller}}
  195. set SCO_HOTPLUG_GUI_MSGS(MSG_HOST_BRIDGE) {169 {Host Bridge device}}
  196. set SCO_HOTPLUG_GUI_MSGS(MSG_ISA_BRIDGE) {170 {ISA Bridge device}}
  197. set SCO_HOTPLUG_GUI_MSGS(MSG_EISA_BRIDGE) {171 {EISA Bridge device}}
  198. set SCO_HOTPLUG_GUI_MSGS(MSG_MCA_BRIDGE) {172 {MCA Bridge device}}
  199. set SCO_HOTPLUG_GUI_MSGS(MSG_PCIPCI_BRIDGE) {173 {PCI-to-PCI Bridge device}}
  200. set SCO_HOTPLUG_GUI_MSGS(MSG_PCMCIA_BRIDGE) {174 {PCMCIA Bridge device}}
  201. set SCO_HOTPLUG_GUI_MSGS(MSG_NUBUS_BRIDGE) {175 {NuBus Bridge device}}
  202. set SCO_HOTPLUG_GUI_MSGS(MSG_CARDBUS_BRIDGE) {176 {CardBus Bridge device}}
  203. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_BRIDGE) {177 {Unidentified Bridge device}}
  204. set SCO_HOTPLUG_GUI_MSGS(MSG_COMM_SERIAL_CTRL) {178 {Communications device; Serial controller}}
  205. set SCO_HOTPLUG_GUI_MSGS(MSG_COMM_PARALLEL_PORT) {179 {Communications device; Parallel Port}}
  206. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_COMM_DEVICE) {180 {Unidentified Communications device}}
  207. set SCO_HOTPLUG_GUI_MSGS(MSG_PIC) {181 {System Peripheral; PIC}}
  208. set SCO_HOTPLUG_GUI_MSGS(MSG_DMA_CTRL) {182 {System Peripheral; DMA controller}}
  209. set SCO_HOTPLUG_GUI_MSGS(MSG_TIMER) {183 {System Peripheral; Timer}}
  210. set SCO_HOTPLUG_GUI_MSGS(MSG_RTC_CTRL) {184 {System Peripheral; RTC controller}}
  211. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_SYS_PERIPHERAL) {185 {Unidentified System Peripheral}}
  212. set SCO_HOTPLUG_GUI_MSGS(MSG_KEYBOARD_CTRL) {186 {Input device; Keyboard controller}}
  213. set SCO_HOTPLUG_GUI_MSGS(MSG_DIGITIZER) {187 {Input device; Digitizer (pen)}}
  214. set SCO_HOTPLUG_GUI_MSGS(MSG_MOUSE_CTRL) {188 {Input device; Mouse controller}}
  215. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_INPUT_DEVICE) {189 {Unidentified Input device}}
  216. set SCO_HOTPLUG_GUI_MSGS(MSG_DOCKING_STATION) {190 {Generic Docking Station}}
  217. set SCO_HOTPLUG_GUI_MSGS(MSG_UNKNOWN_DOCKING_STATION) {191 {Unidentified Docking Station}}
  218. set SCO_HOTPLUG_GUI_MSGS(MSG_386PROC) {192 {Processor type: 386}}
  219. set SCO_HOTPLUG_GUI_MSGS(MSG_486PROC) {193 {Processor type: 486}}
  220. set SCO_HOTPLUG_GUI_MSGS(MSG_PENTIUM_PROC) {194 {Processor type: Pentium}}
  221. set SCO_HOTPLUG_GUI_MSGS(MSG_ALPHA_PROC) {195 {Processor type: Alpha}}
  222. set SCO_HOTPLUG_GUI_MSGS(MSG_POWERPC_PROC) {196 {Processor type: PowerPC}}
  223. set SCO_HOTPLUG_GUI_MSGS(MSG_COPROC) {197 {Processor type: Co-processor}}
  224. set SCO_HOTPLUG_GUI_MSGS(MSG_FIREWIRE) {198 {Serial Bus controller; FireWire (IEEE 1394)}}
  225. set SCO_HOTPLUG_GUI_MSGS(MSG_ACCESS_BUS) {199 {Serial Bus controller; ACCESS.bus}}
  226. set SCO_HOTPLUG_GUI_MSGS(MSG_SSA_BUS) {200 {Serial Bus controller; SSA}}
  227. set SCO_HOTPLUG_GUI_MSGS(MSG_USB_BUS) {201 {Serial Bus controller; Universal Serial Bus (USB)}}
  228. set SCO_HOTPLUG_GUI_MSGS(MSG_FIBRE_CHANNEL) {202 {Serial Bus controller; Fibre Channel}}
  229. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_DEVHPCI) {203 {/dev/hpci not open}}
  230. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_OPENDIR) {204 {drvmap directory open}}
  231. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_DBOPEN) {205 {resmgr database open}}
  232. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_FOPEN) {206 {drvmap file open}}
  233. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_POPEN) {207 Open}
  234. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_STAT) {208 {stat failed for drvmap file}}
  235. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_EXIST) {209 {No data found}}
  236. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_PROTO) {210 {Data mismatch}}
  237. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_COMPAT) {211 {The device and driver are not compatible.}}
  238. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_AUTOCONF) {212 {The specified driver is not autoconfigurable.}}
  239. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_MASK) {213 {Mask not relevant}}
  240. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_ROMASK) {214 {Mask invalid}}
  241. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_FLAG) {215 {Flag invalid}}
  242. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_SOCKETEMPTY) {216 {Socket empty}}
  243. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_SOCKETPWR) {217 {Socket power}}
  244. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_SOCKETLOCK) {218 {Socket interlock}}
  245. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_SOCKETBUSY) {219 {Socket busy}}
  246. set SCO_HOTPLUG_GUI_MSGS(MSG_HPSL_ERR_DEFAULT) {220 {Invalid entry}}
  247. set SCO_HOTPLUG_GUI_MSGS(MSG_YES) {221 Yes}
  248. set SCO_HOTPLUG_GUI_MSGS(MSG_NO) {222 No}
  249. set SCO_HOTPLUG_GUI_MSGS(MSG_CLOSED) {223 Closed}
  250. set SCO_HOTPLUG_GUI_MSGS(MSG_OPENED) {224 Opened}
  251. loadlibindex /usr/lib/sysadm.tlib
  252. set GUI_PATH [exec dirname $argv0]
  253. ####################  GLOBALS   ##########################################################
  254. set ASYNC_ONGOING FALSE
  255. set RefreshSetting 1 
  256. set TOG1_STATE FALSE
  257. set TOG2_STATE FALSE
  258. set TOG3_STATE FALSE
  259. ####################  GLOBALS   ########################################################
  260. proc SetViewType {cbs} {
  261.   global EXE_FILE GUI_PATH PCI USB PCMCIA LogPrepend
  262.   set TogglePicked [keylget cbs selectedWidget]
  263.   if {$TogglePicked == $PCI} {
  264.     set EXE_FILE "$GUI_PATH/PCIBE"
  265.     set LogPrepend "PCI:"
  266.   } elseif {$TogglePicked == $USB} {
  267.     set EXE_FILE "./USBBE"
  268.     set LogPrepend "USB:"
  269.   } else {
  270.     set EXE_FILE "./PCMBE"
  271.     set LogPrepend "PCMCIA:"
  272.   }
  273.   GettingStarted
  274. }
  275. proc CheckRoot {} \
  276. {
  277.   set user [id effective user]
  278.   if { $user != "root"} {
  279.     ShowErrorMessage "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_NO_ROOT]" 
  280.     Quit
  281.   }
  282. }
  283. proc GetTimeStamp {cbs} {
  284.   set stamp [exec /usr/bin/date]
  285.   return $stamp
  286. }
  287. proc PowerCB {REQUEST cbs} { 
  288.   global SelectedItem form TOG1_STATE TOG2_STATE REALSLOT
  289.   set scanStr ""
  290.   foreach i $SelectedItem {
  291.     set scanStr "$scanStr $i"
  292.   }
  293.   set SLOT 0
  294.   scan [lindex $scanStr 7] " Slot %d Card Present: %s" SLOT bCard 
  295.   switch -exact -- $REQUEST {
  296.      "1" {
  297.             if {($bCard == "No") && ($TOG1_STATE == "1")} {
  298.               set MSGDialog [VtQuestionDialog $form.MSGDialog \
  299.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_WARNING]" \
  300.                      -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_FIRST]" \
  301.                      -okCallback "TurnPowerOnOff $REQUEST"]
  302.               VtShow $MSGDialog
  303.             } else {
  304.               TurnPowerOnOff $REQUEST $cbs
  305.             }
  306.          }
  307.      "2" {
  308.             if {($TOG2_STATE == "1") || (($bCard == "No") && ($TOG1_STATE == "1"))} {
  309.               set MSGDialog [VtQuestionDialog $form.MSGDialog \
  310.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_WARNING]" \
  311.                      -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_SECOND]" \
  312.                      -okCallback "TurnPowerOnOff $REQUEST"]
  313.               VtShow $MSGDialog
  314.             } else {
  315.               TurnPowerOnOff $REQUEST $cbs
  316.             }
  317.          }
  318.      "11" {
  319.             if {($bCard == "No") && ($TOG1_STATE == "1")} {
  320.               set MSGDialog [VtQuestionDialog $form.MSGDialog \
  321.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_WARNING]" \
  322.                      -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_THIRD]" \
  323.                      -okCallback "TurnPowerOnOff $REQUEST"]
  324.               VtShow $MSGDialog
  325.             } else {
  326.               TurnPowerOnOff $REQUEST $cbs
  327.             }
  328.           }
  329.      "12" {
  330.             if {($bCard == "No") && ($TOG1_STATE == "1")} {
  331.               set MSGDialog [VtQuestionDialog $form.MSGDialog \
  332.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_WARNING]" \
  333.                      -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_FOURTH]" \
  334.                      -okCallback "TurnPowerOnOff $REQUEST"]
  335.               VtShow $MSGDialog
  336.             } else {
  337.               TurnPowerOnOff $REQUEST $cbs 
  338.             }
  339.          }       
  340.      default {
  341.               ShowErrorMessage "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_NO_SUCH_OPTION]"
  342.              }
  343.   }
  344.  DisableMenuOptions $cbs
  345. }
  346. proc TurnPowerOnOff {REQUEST cbs} {
  347.   global EXE_FILE MSG Position ASYNC_ONGOING LogFile REALSLOT SLOT_ON LogPrepend form PCIList 
  348.   set msg ""
  349.   switch -exact -- $REQUEST {
  350.      "1" { set msg "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_POWERON_LOG $REALSLOT]"} 
  351.      "2" { set msg "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_POWEROFF_LOG $REALSLOT]"}
  352.      "11" { set msg "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ATTON_LOG $REALSLOT]"}
  353.      "12" { set msg "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ATTOFF_LOG $REALSLOT]"}
  354.      default { set msg "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_NO_SUCH_OPTION]"}
  355.   }
  356.   while {$ASYNC_ONGOING} {
  357.   }
  358.     set Time [GetTimeStamp cbs]
  359.     seek $LogFile 0 end
  360.     VtLock
  361.     catch { exec $EXE_FILE $REQUEST $Position "" ""} retval
  362.     if { [lindex $retval 0] == "FAILURE"} {
  363.       ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]" 
  364.       puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  [IntlLocalizeMsg [lrange $retval 1 9999]]"
  365.     } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  366.       ShowErrorMessage [lrange $retval 1 9999] 
  367.       puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  [lrange $retval 1 9999]"
  368.     } elseif { [lindex $retval 0] == "WARNING"} {
  369.       set InfoMsg [VtInformationDialog $form.InfoMsg -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_INFO]" \
  370.                     -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_NIC_MSG]" \
  371.                     -ok]
  372.       VtShow $InfoMsg
  373.       set MSG [lrange $retval 1 9999]
  374.       FormatPCIListBox 
  375.       puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUCCESS]  $msg"
  376.     } else {
  377.       set MSG $retval
  378.       FormatPCIListBox 
  379.       puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUCCESS]  $msg"
  380.     } 
  381.     VtUnLock 
  382.   DisableMenuOptions {cbs}
  383. }
  384. proc ShowErrorMessage {msg} { 
  385.    global form
  386.    set ERRDLG [VtErrorDialog $form.ERRDLG -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ERROR]" \
  387.                      -message $msg -ok]
  388.    VtShow $ERRDLG
  389. }  
  390. proc DisableMenuOptions {cbs} {
  391.    global ON OFF ResumeDriver SuspendDriver Delete SuspDrvList PCIList Add ATT_ON ATT_OFF
  392.    global Details
  393.    VtSetSensitive $ResumeDriver FALSE
  394.    VtSetSensitive $SuspendDriver FALSE
  395.    VtSetSensitive $Delete FALSE
  396.    VtListDeselectItem $SuspDrvList -all
  397.    VtSetSensitive $ON FALSE
  398.    VtSetSensitive $Add FALSE
  399.    VtSetSensitive $OFF FALSE
  400.    VtDrawnListDeselectItem $PCIList -all
  401.    VtSetSensitive $ATT_ON FALSE
  402.    VtSetSensitive $ATT_OFF FALSE
  403.    VtSetSensitive $Details FALSE
  404. }
  405. proc DeleteDriver {cbs} {
  406.   global EXE_FILE Position RMKEY MSG LogFile ASYNC_ONGOING LogPrepend SuspDrvList
  407.   set SelectedItem [VtListGetSelectedItem $SuspDrvList -byItemList]
  408.   set DriverName [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  409.   set SUSPID     [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  410.   set scanStr ""
  411.   foreach i $SelectedItem {
  412.     set scanStr "$scanStr $i"
  413.   }
  414.   scan $scanStr " $DriverName %s $SUSPID %d" driver suspid 
  415.   while {$ASYNC_ONGOING} {
  416.   }
  417.   set DeleteStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_LOG_REMOVING_DRIVER $driver]
  418.   VtLock
  419.   set Time [GetTimeStamp cbs]
  420.   set DELETE 8 
  421.   catch { exec $EXE_FILE $DELETE "" $driver $suspid} retval 
  422.   if { [lindex $retval 0] == "FAILURE" } {
  423.     ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]" 
  424.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $DeleteStr" 
  425.   } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  426.     ShowErrorMessage [lrange $retval 1 9999] 
  427.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $DeleteStr" 
  428.   } else {
  429.     set MSG $retval
  430.     FormatPCIListBox 
  431.     FormatSuspDrvListBox
  432.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUCCESS] $DeleteStr" 
  433.   }  
  434.   DisableMenuOptions {cbs}
  435.   VtUnLock
  436. }
  437. proc ResumeDriver {SuspId POS KEY cbs} {
  438.   global SuspDrvList EXE_FILE ASYNC_ONGOING MSG REALSLOT 
  439.   global LogFile bPCIList RMKEY Position LogPrepend form
  440.   set SuspDriverName ""
  441.   set DriverName [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  442.   set SUSPID     [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  443.   set SlotLabel  [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL]
  444.   set DeviceLabel [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DEVICE]
  445.   set DriverSelection [keylget cbs selection]
  446.   if {$bPCIList} {
  447.     set SuspId 0
  448.     scan $DriverSelection " $DriverName %s $SUSPID %d" SuspDriverName SuspId 
  449.   } else {
  450.     scan $DriverSelection " $SlotLabel %d $DeviceLabel %d" REALSLOT junk
  451.     set RMKEY $KEY
  452.     set Position $POS
  453.   }
  454.   while {$ASYNC_ONGOING} {
  455.   }
  456.   set ResumeLogStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_LOG_RESUMING_DRIVER $REALSLOT]
  457.   VtLock
  458.   set Time [GetTimeStamp cbs]
  459.   set RESUME 5 
  460.   catch { exec $EXE_FILE $RESUME $Position $SuspId $RMKEY } retval
  461.   if { [lindex $retval 0] == "FAILURE" } {
  462.     ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  463.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $ResumeLogStr" 
  464.   } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  465.     ShowErrorMessage [lrange $retval 1 9999]
  466.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $ResumeLogStr" 
  467.   } else {
  468.     set MSG $retval
  469.     FormatPCIListBox 
  470.     FormatSuspDrvListBox
  471.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUCCESS]  $ResumeLogStr" 
  472.   }
  473.   DisableMenuOptions {cbs}
  474.   VtUnLock
  475. }
  476. proc SuspendDriver {cbs} {
  477.   global LogPrepend ASYNC_ONGOING EXE_FILE Position TOG3_STATE MSG RMKEY REALSLOT LogFile
  478.   while {$ASYNC_ONGOING} {
  479.   }
  480.   set SuspendLogStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_LOG_SUSPENDING_DRIVER $REALSLOT]
  481.   VtLock
  482.   set Time [GetTimeStamp cbs]
  483.   set SUSPEND 6
  484.   catch { exec $EXE_FILE $SUSPEND $Position "" $RMKEY} Suspend_retval 
  485.   if { [lindex $Suspend_retval 0] == "FAILURE" } {
  486.     ShowErrorMessage "[IntlLocalizeMsg [lrange $Suspend_retval 1 9999]]"
  487.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $SuspendLogStr"
  488.   } elseif { [lindex $Suspend_retval 0] == "HPCI_FAILURE" } {
  489.     ShowErrorMessage [lrange $Suspend_retval 1 9999]
  490.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $SuspendLogStr"
  491.   } elseif { [lindex $Suspend_retval 0] == "BOOT" } {
  492.     ShowErrorMessage "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ISBOOT]"
  493.   } else { 
  494.     set GETBINDINGS 16
  495.     catch { exec $EXE_FILE $GETBINDINGS $Position ""} retval 
  496.     if {($retval == 0) && ($TOG3_STATE == "1")} {
  497.       catch { exec $EXE_FILE "2" $Position "" } retval  
  498.       set MSG $retval
  499.     } else {
  500.       set MSG $Suspend_retval
  501.     }
  502.     FormatPCIListBox 
  503.     FormatSuspDrvListBox
  504.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUCCESS]  $SuspendLogStr"
  505.   }
  506.   DisableMenuOptions {cbs}
  507.   VtUnLock
  508. }
  509. proc GetModNames {cbs} {
  510.   global PCIList ASYNC_ONGOING EXE_FILE form RMKEY
  511.   while {$ASYNC_ONGOING} {
  512.   }
  513.   set selectedItemIndex [VtDrawnListGetSelectedItem $PCIList -byPositionList]
  514.   set selectedItemStr [VtDrawnListGetSelectedItem $PCIList -byItemList]
  515.   set IsDriver [string first [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL] $selectedItemStr]
  516.   if {$IsDriver != -1} {
  517.     set MSGDialog [VtMessageDialog $form.MSGDialog \
  518.                    -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SELECT_DEVICE]" -ok]
  519.     VtShow $MSGDialog
  520.   } else {
  521.     set MODNAMES 13
  522.     catch { exec $EXE_FILE $MODNAMES "" "" $RMKEY } retval 
  523.     if {[lindex $retval 0] == "FAILURE"} {
  524.       ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  525.     } elseif {[lindex $retval 0] == "EMPTY"} {
  526.       ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  527.     } elseif {[lindex $retval 0] == "HPCI_FAILURE"} {
  528.       ShowErrorMessage [lrange $retval 1 9999]
  529.     } else {
  530.       set numNames [lindex $retval 0]
  531.       set Names [lrange $retval 1 9999]
  532.       GetDriverChoice $Names $numNames 
  533.     }
  534.   }
  535. }
  536. proc GetSuspNames {cbs} {
  537.   global ASYNC_ONGOING EXE_FILE form RMKEY bSuspList bPCIList
  538.   if {$bSuspList} {
  539.     BuildCompatibleDriverList cbs
  540.   } else {
  541.     while {$ASYNC_ONGOING} {
  542.     }
  543.     set Name ""
  544.     set SUSPNAMES 15
  545.     catch { exec $EXE_FILE $SUSPNAMES "" "" $RMKEY } retval 
  546.     if {[lindex $retval 0] == "FAILURE"} {
  547.       ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  548.     } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  549.       ShowErrorMessage [lrange $retval 1 9999]
  550.     } elseif {[lindex $retval 0] == "EMPTY"} {
  551.       ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  552.     } else {
  553.       set DrvStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  554.       set SuspStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  555.       set ActualCount [lindex $retval 0] 
  556.       set LoopCount [expr {$ActualCount * 2}]
  557.       for {set i 1} {$i <= $LoopCount} {incr i +2} {
  558.       set j $i
  559.       incr j 
  560.              set Name "$Name $DrvStr [lindex $retval $i] $SuspStr [lindex $retval $j] ."
  561.       }
  562.       GetSuspDriverChoice $Name $ActualCount 
  563.     }
  564.   }
  565. }
  566. proc BuildCompatibleDriverList {cbs} {
  567.   global SuspDrvList EXE_FILE ASYNC_ONGOING form NameList KeyPosList
  568.   set scanStr ""
  569.   set suspid ""
  570.   set SelectedItem [VtListGetSelectedItem $SuspDrvList -byItemList]
  571.   set DriverName [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  572.   set SUSPID     [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  573.   set SlotLabel [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL]
  574.   set DeviceLabel [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DEVICE]
  575.   foreach i $SelectedItem {
  576.     set scanStr "$scanStr $i"
  577.   }
  578.   scan $scanStr " $DriverName %s $SUSPID %d" driver suspid 
  579.   while {$ASYNC_ONGOING} {
  580.   }
  581.   set CHKCOMPAT 17
  582.   catch { exec $EXE_FILE $CHKCOMPAT "" "$driver" ""} retval 
  583.   set DrvName ""
  584.   set NameList ""
  585.   set KeyPosList ""
  586.   foreach i $retval {
  587.     if {$i != "."} {
  588.       set DrvName "$DrvName $i"
  589.     } else {
  590.       lappend KeyPosList "[lrange $DrvName 2 4]"
  591.       set DrvName "$SlotLabel [lindex $DrvName 0] $DeviceLabel [lindex $DrvName 1]"
  592.       lappend NameList $DrvName
  593.       set DrvName ""
  594.     }
  595.   }
  596.   if {$NameList == ""} {
  597.     set msgbox [VtMessageDialog $form.msgbox -message "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_NO_COMPATIBLE]" \
  598.                 -ok]
  599.     VtShow $msgbox
  600.     DisableMenuOptions $cbs
  601.   } else {
  602.     set Select [lindex $NameList 0]
  603.     set DeviceNames [VtSelectionDialog $form.DeviceNames -itemList $NameList -selection $Select \
  604.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SELECT_DEVICE]" -ok -cancel \
  605.                      -okCallback "FindKey_and_PositionCB $suspid" -userData $KeyPosList]
  606.     VtShow $DeviceNames
  607.   }
  608. }
  609. proc FindKey_and_PositionCB {suspid cbs} {
  610.   ### FOR SOME REASON IF I TRY TO PASS NAMELIST AND TEMP IN AS ARGUMENTS TO THIS FUNCTION
  611.   ### THEY ARE NOT FORMATTED THE SAME WAY AS WHEN THEY ARE DECLARED GLOBALLY. 
  612.   global NameList KeyPosList
  613.   set SELECT [keylget cbs selection]
  614.   set STR ""
  615.   set SubList ""
  616.   set j [llength $NameList]
  617.   incr j -1
  618.   for {set i $j} {$i >= 0} {incr i -1} {
  619.     if {$SELECT == [lindex $NameList $i]} {
  620.       set SubList [lindex $KeyPosList $i]
  621.       break
  622.     }
  623.   }
  624.   foreach i $SubList {
  625.     set STR "$STR $i"  
  626.   }
  627.   ResumeDriver $suspid [lindex $STR 1] [lindex $STR 0] $cbs
  628. }
  629. proc GetSuspDriverChoice {ModNames count} {
  630.   global form 
  631.   set DrvName ""
  632.   set num 0
  633.   set NameList ""
  634.   while {$num < $count} {
  635.     foreach i $ModNames {
  636.       if {$i != "."} {
  637.         set DrvName "$DrvName $i"
  638.       } else {
  639.         lappend NameList $DrvName
  640.         incr num
  641.         set DrvName ""
  642.       }
  643.     }
  644.   }
  645.   set junk "9999"
  646.   set DrvName [lindex $NameList 0]
  647.   set DriverNames [VtSelectionDialog $form.DriverNames -itemList $NameList -selection $DrvName \
  648.                    -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SELECT_DRIVER]" -ok -cancel \
  649.                    -okCallback "ResumeDriver $junk $junk $junk"]
  650.   VtShow $DriverNames
  651. }
  652. proc BindDriver {cbs} {
  653.   global form MSG ASYNC_ONGOING EXE_FILE RMKEY Position LogFile REALSLOT LogPrepend
  654.   set DriverSelection [keylget cbs selection]
  655.   while {$ASYNC_ONGOING} {
  656.   }
  657.   set BindStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_LOG_BINDING_DRIVER $REALSLOT]
  658.   VtLock
  659.   set Time [GetTimeStamp cbs]
  660.   seek $LogFile 0 end
  661.   set BIND 7       
  662.   catch { exec $EXE_FILE $BIND $Position $DriverSelection $RMKEY} retval 
  663.   if { [lindex $retval 0] == "FAILURE" } {
  664.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $BindStr"
  665.     ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  666.   } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  667.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FAIL]  $BindStr"
  668.     ShowErrorMessage [lrange $retval 1 9999]
  669.   } else {
  670.     set MSG $retval
  671.     FormatPCIListBox 
  672.     puts $LogFile "$LogPrepend $Time   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUCCESS]  $BindStr"
  673.   } 
  674.   VtUnLock
  675.   DisableMenuOptions {cbs}
  676. }
  677. proc GetDriverChoice {ModNames count} {
  678.   global form 
  679.   set DrvName ""
  680.   set num 0
  681.   set NameList ""
  682.   while {$num < $count} {
  683.     foreach i $ModNames {
  684.       if {$i != "."} {
  685.         set DrvName "$i"
  686.       } else {
  687.         lappend NameList $DrvName
  688.         incr num
  689.         set DrvName ""
  690.       }
  691.     }
  692.   }
  693.   set DrvName [lindex $NameList 0]
  694.   set DriverNames [VtSelectionDialog $form.DriverNames -itemList $NameList -selection $DrvName \
  695.                    -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SELECT_DRIVER]" -ok -cancel \
  696.                    -okCallback BindDriver] 
  697.   VtShow $DriverNames
  698. }
  699. proc ProcessClickCB {cbs} {
  700.   global ON SelectedItem Position IsPort RMKEY Add Details PCIList SuspDrvList Delete
  701.   global Delete ResumeDriver SuspendDriver OFF ATT_ON ATT_OFF REALSLOT bSuspList bPCIList CHARM
  702.   set scanStr ""
  703.   set Position ""
  704.   set RMKEY ""
  705.   set SelectedItem ""
  706.   set bSuspList FALSE
  707.   set bPCIList TRUE
  708.   set widget [keylget cbs widget]
  709.   set SelectedItem [VtDrawnListGetSelectedItem $widget -byItemList]
  710.   foreach i $SelectedItem {
  711.     set scanStr "$scanStr $i"
  712.   }
  713.   if { [string first [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL] $SelectedItem] != -1 } {
  714.      set IsDeviceEntry 0
  715.   } else {
  716.      set IsDeviceEntry 1
  717.   }
  718.   if {$SelectedItem != ""} {
  719.     VtSetSensitive $Details TRUE
  720.     VtSetSensitive $Delete FALSE
  721.     VtListDeselectItem $SuspDrvList -all
  722.     if { $IsDeviceEntry == 1 } {
  723.         set IsPort FALSE
  724.         set Position [lindex $scanStr 2]
  725.         set REALSLOT [lindex $scanStr 3]
  726.         set RMKEY [lindex $scanStr 4]
  727.         VtSetSensitive $ON FALSE 
  728.         VtSetSensitive $OFF FALSE
  729.         VtSetSensitive $ATT_ON FALSE
  730.         VtSetSensitive $ATT_OFF FALSE
  731.         DoExtraButtonWork $IsPort $scanStr
  732.         set Sensitivity [VtGetValues $SuspDrvList -sensitive]
  733.         if { $Sensitivity } {
  734.           FindSuspendedHBAInstance $Position
  735.      }
  736.     DisableNICAdd $Position $RMKEY
  737.     } else {
  738.         set IsPort TRUE
  739.         set Position [lindex $scanStr 5]
  740.         set REALSLOT [lindex $scanStr 6]
  741.         set DATAStr [lindex $scanStr 7]
  742.         VtSetSensitive $Add FALSE
  743.         VtSetSensitive $ResumeDriver FALSE
  744.         VtSetSensitive $SuspendDriver FALSE
  745.         DoExtraButtonWork $IsPort $DATAStr
  746.     }
  747.   }
  748. }
  749. proc DisableNICAdd {Position key} {
  750.   global Add EXE_FILE 
  751.   set DISABLENICADD 22
  752.   catch { exec $EXE_FILE $DISABLENICADD $Position "" $key} retval 
  753.   if { $retval == "TRUE"} {
  754.     VtSetSensitive $Add FALSE
  755.   }
  756. }
  757. proc FindSuspendedHBAInstance {Position} {
  758.   global Add EXE_FILE 
  759.   set FINDSUSPEND 3
  760.   catch { exec $EXE_FILE $FINDSUSPEND $Position "" ""} retval 
  761.   if { $retval == "TRUE"} {
  762.     VtSetSensitive $Add FALSE
  763.   }
  764. }
  765. proc DoExtraButtonWork {IsPort Str} {
  766.  global ON OFF ATT_ON ATT_OFF EXE_FILE Add SuspendDriver SuspDrvList ResumeDriver Position Delete
  767.  set SLOT 0
  768.  set Sensitivity [VtGetValues $SuspDrvList -sensitive]
  769.  if {$IsPort} {
  770.     scan $Str " Slot %d Card Present: %s Power: %s Attn: %s Interlock: %s" SLOT bCard bPower bAttn bInterlock
  771.     set GETBINDINGS 16
  772.     catch { exec $EXE_FILE $GETBINDINGS $Position ""} retval 
  773.     if {$bInterlock == "Open"} {
  774.       VtSetSensitive $ON FALSE
  775.     } elseif {$bPower == "Off"} {
  776.       VtSetSensitive $ON TRUE
  777.       VtSetSensitive $OFF FALSE
  778.     } elseif {($bPower == "On") && ($retval > 0)} {
  779.       VtSetSensitive $ON FALSE
  780.       VtSetSensitive $OFF FALSE
  781.     } elseif {($bPower == "On") && ($retval <= 0)} {
  782.       VtSetSensitive $ON FALSE
  783.       VtSetSensitive $OFF TRUE
  784.     }
  785.     if {$bAttn == "Off"} {
  786.       VtSetSensitive $ATT_ON TRUE 
  787.       VtSetSensitive $ATT_OFF FALSE
  788.     } else {
  789.       VtSetSensitive $ATT_OFF TRUE
  790.       VtSetSensitive $ATT_ON FALSE
  791.     }
  792.   } else {
  793.       set NewStr [lindex $Str 1]
  794.       if {[string first [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_BOUND] $NewStr] == -1} {
  795.         VtSetSensitive $Add TRUE
  796.         VtSetSensitive $SuspendDriver FALSE
  797.       } else {
  798.         VtSetSensitive $Add FALSE
  799.         VtSetSensitive $SuspendDriver TRUE
  800.       }
  801.       if {($Sensitivity) && ([string first [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_BOUND] $NewStr])} {
  802.         VtSetSensitive $ResumeDriver TRUE
  803.       } else {
  804.         VtSetSensitive $ResumeDriver FALSE
  805.       }
  806.   }
  807. }
  808. proc FormatPCIListBox {} {
  809.   global DevArray PortArray PortCount ListString MSG PCIList 
  810.   set ListString ""
  811.   set PortNumber $PortCount 
  812.   set PortIndex 0
  813.   set DevIndex 0
  814.   VtDrawnListDeleteItem $PCIList -all
  815.   set i [llength $MSG]
  816.   set index 0
  817.   while {$i >= 0} {
  818.     set temp [lindex $MSG $index]
  819.     if {$temp != "."} {
  820.       set ListString "$ListString $temp"
  821.       incr i -1
  822.       incr index
  823.     } else {
  824.       if {[lindex $ListString 0] == "Slot"} {
  825.         incr PortNumber -1
  826.         incr PortIndex
  827.         set DevIndex 0
  828.         set PortArray($PortIndex) $ListString
  829.       } else {
  830.         incr DevIndex
  831.         set RealIndex "Port $PortIndex Dev $DevIndex"
  832.         set DevArray($RealIndex) $ListString
  833.       }
  834.       set ListString ""
  835.       incr i -1
  836.       incr index
  837.     }
  838.   }
  839.   DrawPCILB cbs
  840.   foreach index [array names PortArray] {
  841.     unset PortArray($index)
  842.   }
  843.   foreach index [array names DevArray] {
  844.     unset DevArray($index)
  845.   }
  846. }
  847. proc DrawPCILB {cbs} {
  848.   global EXE_FILE CHARM PCIList PortArray DevArray PortCount RMKEY
  849.   set SLOT 0
  850.   set SlotLabel [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL]
  851.   for {set i $PortCount} {$i > 0} {incr i -1} {
  852.     set fieldList ""
  853.     set PortDevIndex 0
  854.     scan $PortArray($i) " Slot %d Card Present: %s Power: %s Attn: %s Interlock: %s" SLOT bCard bPower bAttn bInterlock
  855.     if {$bPower == "Off"} {
  856.       append fieldList " \"2\" "
  857.     } else {
  858.       append fieldList " \"3\" "
  859.     }
  860.     if {$bAttn == "Off"} {
  861.       append fieldList " \"2\" "
  862.     } else {
  863.       append fieldList " \"0\" "
  864.     }
  865.     if {$bInterlock == "Open"} {
  866.       append fieldList " \"5\" "
  867.     } elseif {$bInterlock == "Closed"} {
  868.       append fieldList " \"6\" "
  869.     } else {
  870.       append fieldList " \"7\" "
  871.     }
  872.     set SlotDisplay $PortArray($i)
  873.     set temp [ctoken SlotDisplay " "]
  874.     set SlotNum [ctoken SlotDisplay " "]
  875.     if { !$CHARM } {
  876.       if {$bCard == "Yes"} {
  877.         append fieldList " \"1\"  \"$SlotLabel $SlotNum\"  \"$i\"  \"$SLOT\" \"$PortArray($i)\" "
  878.       } else {
  879.         append fieldList " \"4\"  \"$SlotLabel $SlotNum\"  \"$i\"  \"$SLOT\" \"$PortArray($i)\" "
  880.       }
  881.     } else {
  882.       append fieldList " \"NO_ICON\"  \"$SlotLabel $SlotNum\"  \"$i\"  \"$SLOT\" \"$PortArray($i)\" "
  883.     }
  884.     if { $CHARM } {
  885.       VtDrawnListAddItem $PCIList \
  886.              -formatList {{ICON 1 1} {ICON 1 8} {ICON 1 12} {ICON 0 5} {STRING 8 0} {DATA} {DATA} {DATA}} \
  887.              -fieldList $fieldList \
  888.              -position 0
  889.     } else {
  890.       VtDrawnListAddItem $PCIList \
  891.              -formatList {{ICON 1 8} {ICON 1 67} {ICON 1 47} {ICON 1 50} {STRING 9 0} {DATA} {DATA} {DATA}} \
  892.              -fieldList $fieldList \
  893.              -position 0
  894.     }
  895.     if {[array size DevArray] != 0} {
  896.       for_array_keys DevIndex DevArray {
  897.         scan $DevIndex "Port %d" PortMatch
  898.         if {$PortMatch == $i} {
  899.           incr PortDevIndex
  900.           set PortDevArray($PortDevIndex) $DevArray($DevIndex)
  901.         }
  902.       }
  903.       set DrvName [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  904.       set Bound   [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_BOUND]
  905.       set Unbound [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_UNBOUND]
  906.       set Array_length [array size PortDevArray]
  907.       set j 1
  908.       while {$j <= $Array_length} {
  909.         set fieldList ""
  910.         scan $PortDevArray($j) " Device %d info: rmkey: %d Driver Name: %s" Dnum key DName
  911.         set CLASSCODE 18
  912.         catch { exec $EXE_FILE $CLASSCODE "" "" $key} Descr 
  913.         set ClassCode "[IntlLocalizeMsg $Descr]"
  914.         if {$j == $Array_length} {
  915.           if { !$CHARM } {
  916.             append fieldList " \"CONNECT_L "
  917.           } else {
  918.             append fieldList " \"NO_ICON "
  919.           }
  920.           if {$DName == "None"} {
  921.             append fieldList " 9\" "
  922.             append fieldList " \"$Unbound $ClassCode\" \"$i\" \"$SLOT\" \"$key\" "
  923.           } else {
  924.             append fieldList " 8\" "
  925.             append fieldList " \"$Bound $ClassCode --> $DrvName $DName\" \"$i\" \"$SLOT\" \"$key\" "
  926.           }
  927.         } else {
  928.           append fieldList " \"CONNECT_T "
  929.           if {$DName == "None"} {
  930.             append fieldList " 9\" "
  931.             append fieldList " \"$Unbound $ClassCode\" \"$i\" \"$SLOT\" \"$key\" "
  932.           } else {
  933.             append fieldList " 8\" "
  934.             append fieldList " \"$Bound $ClassCode --> $DrvName $DName\" \"$i\" \"$SLOT\" \"$key\" "
  935.           }
  936.         }
  937.         if { $CHARM } {
  938.           VtDrawnListAddItem $PCIList \
  939.                     -formatList {{ICON 0 30} {STRING 80} {DATA} {DATA} {DATA}} \
  940.                     -fieldList $fieldList \
  941.                     -position 0
  942.           incr j
  943.         } else {
  944.           VtDrawnListAddItem $PCIList \
  945.                     -formatList {{ICON 2 255} {STRING 110} {DATA} {DATA} {DATA}} \
  946.                     -fieldList $fieldList \
  947.                     -position 0
  948.           incr j
  949.         }
  950.       }
  951.       foreach k [array names PortDevArray] {
  952.         unset PortDevArray($k)
  953.       }
  954.     }
  955.   }
  956. }
  957. proc FormatSuspDrvListBox {} {
  958.   global SuspDrvList EXE_FILE ON OFF ATT_ON ATT_OFF Add
  959.   set retval ""
  960.   set ListString ""
  961.   set DrvName ""
  962.   set num 0
  963.   set count 0
  964.   set Names ""
  965.   VtListDeleteItem $SuspDrvList -all
  966.   set SUSPENDLIST 15 
  967.   catch { exec $EXE_FILE $SUSPENDLIST "" "" ""} retval 
  968.   if { [lindex $retval 0] == "EMPTY" } {
  969.     VtListAddItem $SuspDrvList -item "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_NO_SUSPENDS]"
  970.     VtSetSensitive $SuspDrvList FALSE
  971.   } else {
  972.     VtSetSensitive $SuspDrvList TRUE
  973.     set DrvStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  974.     set SuspStr [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  975.     set numNames [lindex $retval 0] 
  976.     set LoopCount [expr {$numNames * 2}]
  977.     for {set i 1} {$i <= $LoopCount} {incr i +2} {
  978.             set j $i
  979.             incr j
  980.             set Names "$DrvStr [lindex $retval $i] $SuspStr [lindex $retval $j]"
  981.             VtListAddItem $SuspDrvList -item $Names -position 0
  982.             set Names ""
  983.     }
  984.   }
  985. }
  986. proc FindChange_and_LogIt {newStr oldStr} {
  987.   global PortCount
  988.   set newScanStr ""
  989.   set oldScanStr ""
  990.   set count 0
  991.   foreach i $newStr {
  992.     if {$i != "."} {
  993.       set newScanStr "$newScanStr $i"
  994.     } else {
  995.       if {[lindex $newScanStr 0] == "Slot"} {
  996.         incr count
  997.         set newStrArray($count) $newScanStr
  998.       }
  999.       set newScanStr ""
  1000.     }
  1001.   }
  1002.   set count 0
  1003.   foreach i $oldStr {
  1004.     if {$i != "."} {
  1005.       set oldScanStr "$oldScanStr $i"
  1006.     } else {
  1007.       if {[lindex $oldScanStr 0] == "Slot"} {
  1008.         incr count
  1009.         set oldStrArray($count) $oldScanStr
  1010.       }
  1011.       set oldScanStr ""
  1012.     }
  1013.   }
  1014.   for {set i 1} {$i <= $PortCount} {incr i} {
  1015.     scan $newStrArray($i) " Slot %d Card Present: %s Power: %s Attn: %s Interlock: %s" slotnum a b c d
  1016.     scan $oldStrArray($i) " Slot %d Card Present: %s Power: %s Attn: %s Interlock: %s" slotnum e f g h
  1017.     if {$a != $e} {
  1018.       if { $a == "Yes" } {
  1019.         return [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ASYNC_CARD_INSERTED $slotnum] 
  1020.       } else {
  1021.         return [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ASYNC_CARD_REMOVED $slotnum] 
  1022.       }
  1023.     } elseif { $d != $h } {
  1024.         if { $d == "Open" } {
  1025.           return [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ASYNC_INTERLOCK_OPEN $slotnum] 
  1026.         } else {
  1027.           return [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ASYNC_INTERLOCK_CLOSE $slotnum] 
  1028.         }
  1029.     }
  1030.   }
  1031.  proc CheckEvents {Slot} {
  1032.  global TIMEOUT form EXE_FILE ASYNC_ONGOING PCIList MSG RefreshSetting LogFile LogPrepend
  1033.  set CHECKEVENTS 4
  1034.  catch { exec $EXE_FILE $CHECKEVENTS  "" "" ""} retval
  1035.  if {[lindex $retval 0] == "FAILURE"} { 
  1036.     ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  1037.  } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  1038.     ShowErrorMessage [lrange $retval 1 9999]
  1039.  } else {
  1040.     if { $MSG != $retval } {
  1041.       set LogEntry [FindChange_and_LogIt $retval $MSG]
  1042.       set MSG $retval
  1043.       VtLock
  1044.       set ASYNC_ONGOING TRUE
  1045.       VtDrawnListDeleteItem $PCIList -all
  1046.       FormatPCIListBox 
  1047.       FormatSuspDrvListBox
  1048.       set Time [GetTimeStamp cbs]
  1049.       seek $LogFile 0 end
  1050.       puts $LogFile "$LogPrepend $Time   $LogEntry"
  1051.       VtUnLock
  1052.       set ASYNC_ONGOING FALSE
  1053.     } 
  1054.  }
  1055.  set RealRefresh [expr $RefreshSetting * 1000]
  1056.  VtAddTimeOut  -interval $RealRefresh -callback CheckEvents 
  1057. }
  1058.  proc SetRefresh {cbs} {
  1059.    global form RefreshSetting ScaleForm
  1060.    set tempSetting $RefreshSetting
  1061.    set ScaleForm [VtFormDialog $form.ScaleForm -okCallback Destroy \
  1062.                   -cancelCallback "SaveOldValue $tempSetting" \
  1063.                   -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SET_REFRESH]" \
  1064.                   -MOTIF_width 450 ] 
  1065.    set Scale [VtScale $ScaleForm.Scale  -max 15 -min 1 -length 48 \
  1066.               -rightSide FORM -leftSide FORM -callback GetValue ]
  1067.    VtSetValues $Scale -value $RefreshSetting
  1068.    VtShow $ScaleForm
  1069.  } 
  1070. proc SaveOldValue {OldSetting cbs} {
  1071.  global RefreshSetting
  1072.  set widget [keylget cbs widget]
  1073.  set RefreshSetting $OldSetting
  1074.  VtDestroyDialog $widget
  1075.  proc GetValue {cbs} {
  1076.   global RefreshSetting 
  1077.   set RefreshSetting [keylget cbs value]
  1078.  }
  1079.  proc Destroy {cbs} {
  1080.   global ScaleForm LogFile RefreshSetting 
  1081.   set widget [keylget cbs widget]
  1082.   VtDestroyDialog $widget
  1083.  } 
  1084.  proc RefreshNow {cbs} {
  1085.  global MSG ASYNC_ONGOING EXE_FILE form
  1086.  while {$ASYNC_ONGOING} {
  1087.  }
  1088.  set REFRESHNOW 14
  1089.  catch { exec $EXE_FILE $REFRESHNOW "" "" ""} retval 
  1090.  if { [lindex $retval 0] == "FAILURE"} {
  1091.    ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  1092.  } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  1093.    ShowErrorMessage [lrange $retval 1 9999]
  1094.  } else {
  1095.    set MSG $retval
  1096.    FormatPCIListBox
  1097.    FormatSuspDrvListBox
  1098.  }
  1099.  DisableMenuOptions {cbs}
  1100. }
  1101.  proc Quit {cbs} {
  1102.      VtClose
  1103.      exit 0
  1104.  }
  1105.  proc ViewLog {cbs} {
  1106.    global CHARM form LogFile 
  1107.    set MinorForm [VtFormDialog $form.MinorForm -okCallback Destroy \
  1108.                   -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_LOG_EVENTS]" \
  1109.                   -MOTIF_width 660 ] 
  1110.    if { $CHARM } {
  1111.      set TextBox [VtList $MinorForm.list -columns 70 -rows 12 -font smallPlainFont]
  1112.    } else {
  1113.      set TextBox [VtList $MinorForm.list -columns 100 -rows 20 -font smallPlainFont]
  1114.    }
  1115.    seek $LogFile 0 start
  1116.    while {[gets $LogFile line] >= 0} {
  1117.      VtListAddItem $TextBox -item $line -position 0
  1118.    }
  1119.    VtListSelectItem $TextBox -position 0
  1120.    VtShow $MinorForm
  1121.  }
  1122.  proc ShowDetails {cbs} {
  1123.    global form CHARM IsPort RMKEY EXE_FILE app LogFile Position bPCIList SuspDrvList PCIList Details 
  1124.    set IsSuspend FALSE
  1125.     ## The following test is to see if the ShowDetails call is coming from the user pressing the 
  1126.     ## ENTER button while the listbox has the focus. We need to see if the user has made a 
  1127.     ## selection yet. If no selection has been made and the user pressed the ENTER button while
  1128.     ## the PCIList box had the focus, then we put up an error message telling him to make a 
  1129.     ## selection. If the ShowDetails call is coming from the Details menu bar then proceed as 
  1130.     ## normal.
  1131.     set widget [keylget cbs widget]
  1132.     set ItemPos 0 
  1133.     if { $widget == $PCIList } {
  1134.       set ItemPos [VtDrawnListGetSelectedItem $widget -byPositionList]
  1135.       ProcessClickCB $cbs
  1136.         } elseif { $widget == $SuspDrvList } {
  1137.           set ItemPos [VtListGetSelectedItem $widget -byPositionList]
  1138.           SuspCB $cbs
  1139.         } elseif { $widget == $Details } {
  1140.       set ItemPos [VtDrawnListGetSelectedItem $PCIList -byPositionList]
  1141.           if { $ItemPos == 0 } {
  1142.             set ItemPos [VtListGetSelectedItem $SuspDrvList -byPositionList]
  1143.           }
  1144.         }
  1145.    set DETAILS 9
  1146.    set SlotLabel [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL]
  1147.    set DeviceLabel [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DEVICE]
  1148.    set AlterCapableStr 0
  1149.     if { $ItemPos != 0 } {
  1150.      if {$bPCIList} {
  1151.        if {$IsPort} {
  1152.          catch { exec $EXE_FILE $DETAILS $Position "" ""} retval 
  1153.          set TITLE [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_DET_TITLE]
  1154.        } else {
  1155.          catch { exec $EXE_FILE $DETAILS $Position "" $RMKEY} retval 
  1156.          set TITLE "$SlotLabel [lindex $retval 0] $DeviceLabel [lindex $retval 1]"
  1157.        }
  1158.      } else {
  1159.        set IsSuspend TRUE
  1160.        set scanStr ""
  1161.        set DriverName [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  1162.        set SUSPID     [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  1163.        set SelectedItem [VtListGetSelectedItem $SuspDrvList -byItemList]
  1164.        foreach i $SelectedItem {
  1165.          set scanStr "$scanStr $i"
  1166.        }
  1167.        scan $scanStr " $DriverName %s $SUSPID %d" driver suspid 
  1168.        catch { exec $EXE_FILE $DETAILS "" $driver $suspid} retval
  1169.        set TITLE "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSP_DET_TITLE]"
  1170.      } 
  1171.      set parent [keylget cbs widget]
  1172.      if { $CHARM } {
  1173.        set MinorForm [VtFormDialog $parent.MinorForm -okCallback Destroy -title $TITLE \
  1174.                       -MOTIF_width 650 ]
  1175.        set TextBox [VtList $MinorForm.TextBox -columns 70 -rows 12 -font smallPlainFont \
  1176.                     -scrollBar TRUE]
  1177.      } else {
  1178.        set MinorForm [VtFormDialog $parent.MinorForm -okCallback Destroy -title $TITLE \
  1179.                       -MOTIF_width 410 ]
  1180.        set TextBox [VtList $MinorForm.TextBox -columns 65 -rows 20 -font largePlainFont ]
  1181.      }
  1182.      if {[lindex $retval 0] == "FAILURE"} {
  1183.        ShowErrorMessage "[IntlLocalizeMsg [lrange $retval 1 9999]]"
  1184.      } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  1185.        ShowErrorMessage [lrange $retval 1 9999]
  1186.      } else {
  1187.        if { $IsSuspend } {
  1188.             if { [lindex $retval 0] == "NIC" } {
  1189.               set AlterCapableStr 1
  1190.             }
  1191.          set DetailsFile [open "/tmp/DriverDetail.log" r]
  1192.        } elseif { $IsPort } {
  1193.          set DetailsFile [open "/tmp/PortDetail.log" r]
  1194.        } else {
  1195.          set DetailsFile [open "/tmp/DeviceDetail.log" r]
  1196.        }
  1197.        seek $DetailsFile 0 start
  1198.        set Str ""
  1199.        while {[gets $DetailsFile line] >= 0} {
  1200.          if { [clength $line] == 0 } {
  1201.            VtListAddItem $TextBox -item " " -position 0
  1202.          } else {
  1203.              set delimiter [ctoken line " "]
  1204.              set variable [ctoken line "\n"] 
  1205.              if { $variable == "Closed" } {
  1206.                  set variable [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_CLOSED]
  1207.              } elseif { $variable == "Opened" } {
  1208.                  set variable [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OPENED]
  1209.              } elseif { $variable == "On" } {
  1210.                  set variable [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ON]
  1211.              } elseif { $variable == "Off" } {
  1212.                  set variable [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OFF]
  1213.                  } elseif { [string first SCO_HOTPLUG_GUI $variable] != -1 } {
  1214.                  set variable [string  trimleft $variable " "]
  1215.                  set variable "[IntlLocalizeMsg $variable]"
  1216.                   if { $AlterCapableStr == 1 } {
  1217.                      set variable [lrange $variable 0 2]
  1218.                      set AlterCapableStr 0
  1219.                   }
  1220.              } 
  1221.              set Str "[IntlLocalizeMsg $delimiter] $variable" 
  1222.              VtListAddItem $TextBox -item $Str -position 0
  1223.          }
  1224.        }
  1225.      }
  1226.      VtShow $MinorForm
  1227.    } else {
  1228.    }
  1229. }
  1230. proc SuspCB {cbs} {
  1231.  global PCIList SuspDrvList ATT_ON ATT_OFF ON OFF SuspendDriver ResumeDriver Add Delete 
  1232.  global bSuspList bPCIList CHARM EXE_FILE
  1233.  set bSuspList TRUE
  1234.  set bPCIList FALSE
  1235.  VtDrawnListDeselectItem $PCIList -all
  1236.  VtSetSensitive $ATT_ON False
  1237.  VtSetSensitive $ATT_OFF False
  1238.  VtSetSensitive $ON False
  1239.  VtSetSensitive $OFF False
  1240.  VtSetSensitive $SuspendDriver False
  1241.  VtSetSensitive $Add False
  1242.  set LIST [VtDrawnListGetItem $PCIList -all]
  1243.  if {[string first [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_UNBOUND] $LIST] != -1} {
  1244.    VtSetSensitive $ResumeDriver TRUE
  1245.  } else {
  1246.    VtSetSensitive $ResumeDriver FALSE
  1247.  }
  1248.  set SelectedItem [VtListGetSelectedItem $SuspDrvList -byItemList]
  1249.  set DriverName [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_DRIVER_NAME]
  1250.  set SUSPID     [IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPENDED_ID]
  1251.  set scanStr ""
  1252.  foreach i $SelectedItem {
  1253.    set scanStr "$scanStr $i"
  1254.  }
  1255.  scan $scanStr " $DriverName %s $SUSPID %d" driver suspid 
  1256.  set CHECKNIC 21
  1257.  catch { exec $EXE_FILE $CHECKNIC "" $driver $suspid} retval 
  1258.  if { $retval == "TRUE" } {
  1259.     VtSetSensitive $Delete FALSE
  1260.  } else {
  1261.    VtSetSensitive $Delete TRUE
  1262.  }
  1263. }
  1264. proc SaveToggleStates {cbs} {
  1265.   global TOG1 TOG2 TOG3 TOG1_STATE TOG2_STATE TOG3_STATE 
  1266.   set widget [keylget cbs widget]
  1267.   set TOG1_STATE [VtGetValues $TOG1 -set]
  1268.   set TOG2_STATE [VtGetValues $TOG2 -set]
  1269.   set TOG3_STATE [VtGetValues $TOG3 -set]
  1270.   VtDestroyDialog $widget
  1271. }
  1272. proc ShowPrefer {cbs} {
  1273.    global form TOG1_STATE TOG2_STATE TOG3_STATE TOG1 TOG2 TOG3
  1274.    set PreferDlg [VtFormDialog $form.PreferDlg -okCallback SaveToggleStates \
  1275.                   -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_HEADING]" \
  1276.                   -MOTIF_width 600 -cancelCallback Destroy -ok -cancel ]
  1277.    set CheckBox [VtCheckBox $PreferDlg.CheckBox]
  1278.    set TOG1 [VtToggleButton $CheckBox.tog1 -set $TOG1_STATE \
  1279.              -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_TOGGLE1]" \
  1280.                  -width 100]
  1281.    set TOG2 [VtToggleButton $CheckBox.tog2 -set $TOG2_STATE \
  1282.              -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_TOGGLE2]" \
  1283.                  -width 100]
  1284.    set TOG3 [VtToggleButton $CheckBox.tog3 -set $TOG3_STATE \
  1285.              -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_PREFER_TOGGLE3]" \
  1286.                  -width 100]
  1287.    VtShow $PreferDlg
  1288. proc DisplayIconLegend {cbs} {
  1289.   global form CHARM
  1290.   set IconDlg [VtFormDialog $form.IconDlg -okCallback Destroy -ok \
  1291.                                          -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND]" ]
  1292.   if { $CHARM } {
  1293.     set IconLegendList [VtDrawnList $IconDlg.IconLegendList -columns 50 -rows 8 \
  1294.                         -CHARM_iconList { "O" \
  1295.                                 "" \
  1296.                                 "X" \
  1297.                                 "O" \
  1298.                                 "" \
  1299.                                 "I" \
  1300.                                 "C" \
  1301.                                 "X" }]
  1302.   } else {
  1303.     set IconLegendList [VtDrawnList $IconDlg.IconLegendList -columns 50 -rows 8 \
  1304.                         -iconList { ./yellow.px \
  1305.                         ./card.px \
  1306.                         ./graydot.px \
  1307.                         ./slot.pm \
  1308.                         ./greendot.px \
  1309.                         ./unlocked.xpm \
  1310.                         ./locked.xpm \
  1311.                                     ./exout.px}]
  1312.   }
  1313.  VtDrawnListAddItem  $IconLegendList \
  1314.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1315.             -fieldList "{4} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_POWER_ON]}" \
  1316.             -position 0
  1317.  VtDrawnListAddItem  $IconLegendList \
  1318.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1319.             -fieldList "{2} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_POWER_OFF]}" \
  1320.             -position 0
  1321.  VtDrawnListAddItem  $IconLegendList \
  1322.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1323.             -fieldList "{0} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_ATTENTION_ON]}" \
  1324.             -position 0
  1325.  VtDrawnListAddItem  $IconLegendList \
  1326.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1327.             -fieldList "{5} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_INTERLOCK_OPEN]}" \
  1328.             -position 0
  1329.  VtDrawnListAddItem  $IconLegendList \
  1330.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1331.             -fieldList "{6} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_INTERLOCK_CLOSED]}" \
  1332.             -position 0
  1333.  VtDrawnListAddItem  $IconLegendList \
  1334.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1335.             -fieldList "{7} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_INTERLOCK_NOT_SUPPORTED]}" \
  1336.             -position 0
  1337.  VtDrawnListAddItem  $IconLegendList \
  1338.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1339.             -fieldList "{1} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND_CARD_PRESENT]}" \
  1340.             -position 0
  1341.  VtDrawnListAddItem  $IconLegendList \
  1342.             -formatList {{ICON 1 0} {STRING 100 10}} \
  1343.             -fieldList "{3} {[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_EMPTY_SLOT]}" \
  1344.             -position 0
  1345.   VtShow $IconDlg
  1346. }
  1347. proc GettingStarted {} \
  1348. {
  1349.   global form PCIList MSG PortCount EXE_FILE RefreshSetting
  1350.   set COUNTPORTS 20
  1351.   set PortCount 0
  1352.   catch {exec $EXE_FILE $COUNTPORTS "" "" ""} retval
  1353.   if {[lindex $retval 0] == "FAILURE"} {
  1354.     set MSGDialog [VtMessageDialog $form.MSGDialog -message "[IntlLocalizeMsg [lrange $retval 1 9999]]" \
  1355.                    -okCallback Quit -cancelCallback Quit \
  1356.                    -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ERROR]" ]
  1357.     VtShow $MSGDialog
  1358.   } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  1359.     set MSGDialog [VtMessageDialog $form.MSGDialog -message "[lrange $retval 1 9999]" \
  1360.                    -okCallback Quit -cancelCallback Quit \
  1361.                    -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ERROR]" ]
  1362.     VtShow $MSGDialog
  1363.   } else {   
  1364.     set PortCount $retval
  1365.     set STARTUP 10
  1366.     set port 1
  1367.     catch {exec $EXE_FILE $STARTUP $port "" ""} retval
  1368.     if {[lindex $retval 0] == "FAILURE"} {
  1369.       set MSGDialog [VtMessageDialog $form.MSGDialog -message "[IntlLocalizeMsg [lrange $retval 1 9999]]" \
  1370.                      -okCallback Quit -cancelCallback Quit \
  1371.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ERROR]"]
  1372.       VtShow $MSGDialog
  1373.     } elseif { [lindex $retval 0] == "HPCI_FAILURE" } {
  1374.       set MSGDialog [VtMessageDialog $form.MSGDialog -message "[lrange $retval 1 9999]" \
  1375.                      -okCallback Quit -cancelCallback Quit \
  1376.                      -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ERROR]"]
  1377.       VtShow $MSGDialog
  1378.     } else {
  1379.       set MSG $retval
  1380.       FormatPCIListBox 
  1381.       FormatSuspDrvListBox
  1382.       DisableMenuOptions cbs
  1383.       VtSetSensitive $PCIList TRUE
  1384.          set TIMEOUT [ VtAddTimeOut -interval 1000 -callback CheckEvents ]
  1385.     }
  1386.   } 
  1387. }
  1388. #################################################################################################
  1389. #################################### MAIN MAIN MAIN #############################################
  1390. #################################################################################################
  1391.  #####  Set the Menu Bar options for the Interface #####
  1392. set app [VtOpen Hotplug HotplugUI]
  1393. set CHARM [VtInfo -charm]
  1394. set UserName [exec /usr/ucb/hostname]
  1395. set form [VtFormDialog $app.mainform \
  1396.           -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_APP_TITLE]: $UserName" \
  1397.           -MOTIF_width 700 \
  1398.           -wmShadowThickness 0 \
  1399.           -marginWidth 0 \
  1400.           -marginHeight 0 \
  1401.           -height 500 \
  1402.           -xmArgs "XmNresizable 0" ] 
  1403. SaCharmSetMaxFormDimensions $form 0
  1404. ############################################################################################
  1405. ############################################################################################
  1406.  if { $CHARM } {
  1407.    set menubar [VtMenuBar $form.menubar -spacing 7 \
  1408.                 -helpMenuItemList {INDEX ON_VERSION} ]
  1409.  } else {
  1410.    set menubar [VtMenuBar $form.menubar -spacing 20 \
  1411.                 -helpMenuItemList {INDEX ON_VERSION} ]
  1412.  }
  1413.  VtSetAppValues $app -versionString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_APP_TITLE] v.1.0"
  1414.  #######################################################################
  1415.  #######################################################################
  1416.  set fm [WsPulldown $menubar.Filemenu -label "[ IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_FILE_MENU ]" -mnemonic F]
  1417.    set HPLog [WsPushButton $fm.HPLog -label "[ IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_VIEW_LOGFILE ]" \
  1418.               -callback ViewLog \
  1419.               -shortHelpCallback SaShortHelpCB \
  1420.               -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_VIEWLOG]" \
  1421.               -mnemonic V \
  1422.                   -width 50 \
  1423.                   -recomputeSize FALSE]
  1424.    VtSeparator $fm.sp -leftSide FORM -rightSide FORM
  1425.    set ByeBye [WsPushButton $fm.ByeBye -label "[ IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_EXIT ]"  \
  1426.                -callback Quit \
  1427.                -shortHelpCallback SaShortHelpCB \
  1428.                -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_EXIT]" \
  1429.                -mnemonic x \
  1430.                     -width 50 \
  1431.                    -recomputeSize FALSE]
  1432.  #######################################################################
  1433.  #######################################################################
  1434.  set om [WsPulldown $menubar.operations -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_MENU]" -mnemonic O]
  1435.    set SLOT_ON 1
  1436.    set ON [WsPushButton $om.ON -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_POWER_ON]" \
  1437.              -callback "PowerCB $SLOT_ON"  \
  1438.                  -sensitive FALSE -mnemonic n \
  1439.              -shortHelpCallback SaShortHelpCB \
  1440.              -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_POWER_ON]" \
  1441.                  -width 50 \
  1442.                  -recomputeSize FALSE]
  1443.    set SLOT_OFF 2
  1444.    set OFF [WsPushButton $om.OFF -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_POWER_OFF]" \
  1445.                                  -callback "PowerCB $SLOT_OFF" \
  1446.                  -sensitive FALSE -mnemonic f \
  1447.                                  -shortHelpCallback SaShortHelpCB \
  1448.                                  -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_POWER_OFF]" \
  1449.                                             -width 50 \
  1450.                                             -recomputeSize FALSE]
  1451.    VtSeparator $om.sp -leftSide FORM -rightSide FORM
  1452.    set SET_ATT 11
  1453.    set ATT_ON [WsPushButton $om.ATTON -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_ATT_ON]" \
  1454.                       -callback "PowerCB $SET_ATT" -sensitive FALSE \
  1455.                       -mnemonic t \
  1456.                       -shortHelpCallback SaShortHelpCB \
  1457.                       -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_ATT_ON]" \
  1458.                              -width 50 \
  1459.                              -recomputeSize FALSE]
  1460.    set CLEAR_ATT 12               
  1461.    set ATT_OFF [WsPushButton $om.ATTOFF -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_ATT_OFF]" \
  1462.                       -callback "PowerCB $CLEAR_ATT" -sensitive FALSE \
  1463.                       -mnemonic e \
  1464.                       -shortHelpCallback SaShortHelpCB \
  1465.                       -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_ATT_OFF]" \
  1466.                              -width 50 \
  1467.                              -recomputeSize FALSE]
  1468.    VtSeparator $om.sp1 -leftSide FORM -rightSide FORM
  1469.    set Add [WsPushButton $om.ADD \
  1470.                      -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_ADD_DRIVER]" -sensitive FALSE \
  1471.                      -callback GetModNames -mnemonic A \
  1472.                      -shortHelpCallback SaShortHelpCB \
  1473.                      -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_ADD_DRIVER]" \
  1474.                             -width 50 \
  1475.                             -recomputeSize FALSE]
  1476.    set ResumeDriver [WsPushButton $om.ResumeDriver \
  1477.                      -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_RESUME_DRIVER]" \
  1478.                          -callback GetSuspNames -mnemonic R \
  1479.                      -shortHelpCallback SaShortHelpCB \
  1480.                      -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_RESUME_DRIVER]" \
  1481.                             -width 50 \
  1482.                             -recomputeSize FALSE]
  1483.    VtSeparator $om.sp2 -leftSide FORM -rightSide FORM
  1484.    set SuspendDriver [WsPushButton $om.SuspendDriver \
  1485.                       -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_SUSPEND_DRIVER]"  -mnemonic S \
  1486.                       -callback SuspendDriver \
  1487.                       -shortHelpCallback SaShortHelpCB \
  1488.                       -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_SUSPEND_DRIVER]" \
  1489.                              -width 50 \
  1490.                              -recomputeSize FALSE]
  1491.    set Delete [WsPushButton $om.Delete \
  1492.                -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OP_DELETE_DRIVER]" -mnemonic D \
  1493.            -callback DeleteDriver \
  1494.                -shortHelpCallback SaShortHelpCB \
  1495.                -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_DELETE_DRIVER]" \
  1496.                     -width 50 \
  1497.                     -recomputeSize FALSE]
  1498.  ########################################################################
  1499.  ########################################################################
  1500.  set View [WsPulldown $menubar.View  -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_VIEW_MENU]" -mnemonic V]
  1501.    set Details [WsPushButton $View.Details \
  1502.                 -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_VIEW_DETAILS]" \
  1503.             -sensitive TRUE -callback ShowDetails -mnemonic D \
  1504.                 -shortHelpCallback SaShortHelpCB \
  1505.                 -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_DETAILS]" \
  1506.                      -width 50 \
  1507.                      -recomputeSize FALSE]
  1508.    VtSeparator $View.sp4 -leftSide FORM -rightSide FORM
  1509.    set REFRESH [WsPulldown $View.REFRESH -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_VIEW_AUTOREFRESH]" \
  1510.                 -mnemonic S \
  1511.                 -shortHelpCallback SaShortHelpCB \
  1512.                 -shortHelpString  "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_SETREFRESH]" \
  1513.                      -width 50 \
  1514.                      -recomputeSize FALSE]
  1515.      set AROn [WsPushButton $REFRESH.AROn -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ON]" ]
  1516.      set AROff [WsPushButton $REFRESH.AROff -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OFF]" \
  1517.                 -sensitive FALSE ]
  1518.      VtSeparator $View.sp7 -leftSide FORM -rightSide FORM
  1519.      set Interval [WsPushButton $REFRESH.Interval -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_INTERVAL]" \
  1520.                    -callback SetRefresh \
  1521.                          -width 50 \
  1522.                          -recomputeSize FALSE]
  1523.    set REFRESHNOW [WsPushButton $View.REFRESHNOW \
  1524.                    -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_VIEW_REFRESHNOW]" -callback RefreshNow \
  1525.                    -mnemonic R \
  1526.                    -shortHelpCallback SaShortHelpCB \
  1527.                    -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_REFRESHNOW]" \
  1528.                          -width 50 \
  1529.                          -recomputeSize FALSE]
  1530.    VtSeparator $View.sp8 -leftSide FORM -rightSide FORM
  1531.    set ICONLEGEND [WsPushButton $View.ICONLEGEND \
  1532.                    -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_LEGEND_LABEL]" \
  1533.                    -mnemonic I \
  1534.                    -shortHelpCallback SaShortHelpCB \
  1535.                    -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ICON_LEGEND]" \
  1536.                    -callback DisplayIconLegend \
  1537.                          -width 50 \
  1538.                          -recomputeSize FALSE]
  1539.  #########################################################################
  1540.  #########################################################################
  1541.  set Options [WsPulldown $menubar.Options -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OPTIONS_MENU]" \
  1542.               -mnemonic p ]
  1543.    SaShortHelpLoad app
  1544.    SaShortHelpMenuOptions $Options
  1545.    VtSeparator $Options.sp6 -leftSide FORM -rightSide FORM
  1546.    set Prefer [WsPushButton $Options.Prefer \
  1547.                -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_OPTIONS_PREFER]" -mnemonic P \
  1548.                -callback ShowPrefer \
  1549.                -shortHelpCallback SaShortHelpCB \
  1550.                -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_PREFER]" \
  1551.                     -width 50 \
  1552.                     -recomputeSize FALSE]
  1553.  #########################################################################
  1554.  #########################################################################
  1555.  set RadioFrame [VtFrame $form.RadioFrame -shadowType ETCHED_OUT \
  1556.                  -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_BUS_VIEW]" -topSide $menubar -hidden TRUE]
  1557.  set ToggleBox [VtRadioBox $RadioFrame.ToggleBox -numColumns 3 \
  1558.                 -callback SetViewType -hidden TRUE]
  1559.  set PCI [VtToggleButton $ToggleBox.PCI -label "Hot Plug PCI Bus" -value 1 -hidden TRUE]
  1560.  set USB [VtToggleButton $ToggleBox.USB -label "Hot Plug USB Bus" -sensitive FALSE -hidden TRUE]
  1561.  set PCMCIA [VtToggleButton $ToggleBox.PCMCIA -label "Hot Plug PCMCIA Bus" -sensitive FALSE -hidden TRUE]
  1562.  ##########################################################
  1563.  ##########################################################
  1564.  if { $CHARM } {
  1565.    set PowerLabel [VtLabel $form.PowerLabel \
  1566.                    -topSide $menubar \
  1567.                    -CHARM_label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_POWER_ETC_CHARM_LABEL]" \
  1568.                    -labelCenter -leftSide FORM \
  1569.                    -CHARM_topOffset 0 \
  1570.                    -CHARM_leftOffset 1 ]
  1571.  } else {
  1572.    set PowerLabel [VtLabel $form.PowerLabel -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_POWER_LABEL]" \
  1573.                  -topSide $menubar -labelLeft -leftSide FORM -width 80]
  1574.    set AttLabel [VtLabel $form.AttLabel -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_ATT_LABEL]" \
  1575.                  -topSide $menubar -leftSide $PowerLabel -labelCenter -width 80]
  1576.    set InterlockLabel [VtLabel $form.InterlockLabel \
  1577.                        -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_INTERLOCK_LABEL]" \
  1578.                        -topSide $menubar -leftSide $AttLabel -labelCenter -width 80]
  1579.    set SlotLabel [VtLabel $form.SlotLabel \
  1580.                   -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SLOT_LABEL]" -topSide $menubar \
  1581.                   -leftSide $InterlockLabel -labelCenter -width 80]
  1582. }
  1583.  if { $CHARM } {
  1584.    set PCIList [VtDrawnList $form.list -columns 50 -rows 9 \
  1585.                 -rightSide FORM -topSide $PowerLabel \
  1586.             -callback ProcessClickCB \
  1587.                 -defaultCallback ShowDetails \
  1588.                 -shortHelpCallback SaShortHelpCB \
  1589.                 -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_PCILIST]" \
  1590.                 -CHARM_iconList { "O" \
  1591.                         "" \
  1592.                         "X" \
  1593.                         "O" \
  1594.                         "" \
  1595.                         "I" \
  1596.                         "C" \
  1597.                         "X" }]
  1598.  } else {
  1599.    set PCIList [VtDrawnList $form.list -columns 100 -rows 20 \
  1600.                 -rightSide FORM -topSide $PowerLabel \
  1601.                 -bottomSide 65 -horizontalScrollBar TRUE \
  1602.             -callback ProcessClickCB \
  1603.                 -defaultCallback ShowDetails \
  1604.                 -shortHelpCallback SaShortHelpCB \
  1605.                 -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_PCILIST]" \
  1606.                 -iconList { ./yellow.px \
  1607.                 ./card.px \
  1608.                 ./graydot.px \
  1609.                 ./greendot.px \
  1610.                 ./slot.pm \
  1611.                 ./unlocked.xpm \
  1612.                 ./locked.xpm \
  1613.                             ./exout.px}]
  1614.   }
  1615.  ##########################################################
  1616.  ##########################################################
  1617.  if { $CHARM } {
  1618.    set SuspLabel [VtLabel $form.SuspLabel -label "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPEND_LISTBOX_LABEL]" \
  1619.                    -labelCenter -leftSide FORM \
  1620.                    -CHARM_topOffset 0 \
  1621.                    -CHARM_leftOffset 1 ]
  1622.    set SuspDrvList [VtList $form.list2 -columns 50 -rows 2 \
  1623.                 -callback SuspCB \
  1624.                     -defaultCallback ShowDetails \
  1625.                     -rightSide FORM -topSide $SuspLabel \
  1626.                     -shortHelpCallback SaShortHelpCB \
  1627.                     -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_SUSPLIST]"]
  1628.  } else {
  1629.    set frame2 [VtFrame $form.frame2 -shadowType ETCHED_IN -title "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SUSPEND_LISTBOX_LABEL]" ]
  1630.    set SuspDrvList [VtList $form.frame2.list -columns 50 -rows 4 \
  1631.                 -scrollBar TRUE -callback SuspCB \
  1632.                     -defaultCallback ShowDetails \
  1633.                     -leftSide FORM  -rightSide FORM \
  1634.                     -shortHelpCallback SaShortHelpCB \
  1635.                     -shortHelpString "[IntlLocalizeMsg SCO_HOTPLUG_GUI_MSG_SH_SUSPLIST]"]
  1636.  }
  1637.  set sbar [SaStatusBar $form.sbar 1]
  1638.  set LogFile [open "/var/adm/log/hotplug.log" a+]
  1639. VtShow $form
  1640.   CheckRoot
  1641.   set LogPrepend "PCI:"
  1642.   set EXE_FILE "$GUI_PATH/PCIBE"
  1643.   GettingStarted 
  1644. VtMainLoop
  1645.