-- 123: /dev/disk/dsk1c COMPAQ HSV110 (C)COMPAQ IDENTIFIER=11 # hwmgr -get attributes -a dev_base_name=dsk1 -a phys_location 123: dev_base_name = dsk1 phys_location = IDENTIFIER=11 Above are two samples of the use of the hwmgr utility to query a system to determine the 'location' (i.e. IDENTIFIER=11) associated with a specific device base name. I am currently writing a program in 'C' for which I need a function which will programmatically obtain the above information. Loose Pseudo-code example of what I am looking for: struct hw_structure_definition *a a=some_routine_to_query_system_for_hw_info("dsk1") printf("%s\n",a->phys_location) Please note the above is pseudo-code - the text does not represent actual structure names, variable names or function names. I suspect that the functions I need are in existence but not documented in the normal man pages (perhaps in the "Writing Device Drivers" manual?? which I do not have a copy of for 5.1x stream) Over the phone HP support has indicated that they think it is going to involve some combination of the use of the table() function and the ioctl() function. They are getting back to me on the specifics and I am diligently reading through the man pages and querying my friends on tru64 managers list in the meanwhile. Searching around the /usr/include/io/cam directory I found some interesting function names that might relate to what I am looking for but without an associated man page I cannot be sure. Example: cam3.h xpt_get_phys_attribute(). If anyone knows a function/routine and its associated calling standard that would achieve the above I would be very appreciative. John Farmer, Senior Systems Programmer Tyco Healthcare/US Surgical 150 Glover Ave Norwalk, CT 06856Received on Mon Apr 11 2005 - 14:50:54 NZST
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT