* C programming language / query for hardware attributes question.
@ 2005-04-11 14:48 Farmer, John
0 siblings, 0 replies; only message in thread
From: Farmer, John @ 2005-04-11 14:48 UTC (permalink / raw)
Tru64 5.1A and/or 5.1B.
# hwmgr -view devices -cat disk
HWID: Device Name Mfg Model Location
----------------------------------------------------------------------------
--
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 06856
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-11 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-11 14:48 C programming language / query for hardware attributes question Farmer, John
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox