idcheck(ADM)
idcheck --
return selected information about system configuration
Syntax
/etc/conf/bin/idcheck
Description
This command
returns selected information about the system configuration.
It is useful in add-on device Driver Software Package (DSP)
installation scripts to determine if a
particular device driver has already been installed,
or to verify that a particular interrupt vector, I/O
address or other selectable parameter is in fact available for use.
To check whether a vector is in use, use
vectorsinuse(ADM)
rather than idcheck.
idcheck -v vector may be used to
determine whether a vector is sharable.
(This option returns the type field (as defined in the
sdevice(F)
reference page) corresponding to the given vector.)
The various forms are:
idcheck -p device-name [-i dir] [-r]
idcheck -v vector [-i dir] [-r]
idcheck -d dma-channel [-i dir] [-r]
idcheck -a -l lower_address -u upper_address [-i dir] [-r]
idcheck -c -l lower_address -u upper_address [-i dir] [-r]
This command scans the System and Master modules and exits with
100 if an error occurs; 0 if no conflict exists,
a positive number greater than 0 and less than 100 if a conflict exists.
The command line options are:
-r-
Reports device name of any conflicting device on stdout.
-p device-name-
This option checks for the existence of four different components
of the DSP.
The exit code is the addition of the return codes from the four checks.
Add 1 to the exit code if the DSP directory under /etc/conf/pack.d exists.
Add 2 if the Master module has been installed.
Add 4 if the System module has been installed.
Add 8 if the Kernel was built with the System module.
Add 16 if a Driver.o is part of the DSP (vs. a stubs.c file).
-v vector-
This option returns the value of the
``type'' field in the mdevice file for the device
that is already using the vector.
Do not use this option to check whether a vector is in use;
some devices use interrupt 0, and this will cause idcheck to
return the same result as a free vector.
To check whether a vector is available, use
vectorsinuse
instead.
-d dma-channel-
Returns 1 if the DMA channel specified is being used.
-a-
This option checks whether the IOA region bounded
by ``lower'' and ``upper'' conflict with another DSP
(``lower'' and ``upper'' are specified with the -l
and -u options).
The exit code is based on the first conflicting device found.
The exit code is 1 if the IOA region overlaps with another device.
The exit code is 2 if the IOA region overlaps with another device
and that device has the ``O'' option specified in the ``type'' field
of the Master module.
The ``O'' option permits a driver to overlap the IOA region
of another driver.
-c-
Returns 1 if the CMA region bounded by ``lower'' and ``upper''
conflict with another DSP
(``lower'' and ``upper'' are specified with the -l
and -u options).
-l address-
Lower bound of address range specified in hex.
The leading ``0x'' should not be included.
-u address-
Upper bound of address range specified in hex.
The leading ``0x'' should not be included.
-i dir-
Specifies the directory in which the ID files
sdevice and mdevice reside.
The default directory is /etc/conf/cf.d.
Diagnostics
There are no error messages or checks for valid arguments to options.
idcheck interprets these arguments using the rules of
scanf(S)
and queries the sdevice and mdevice files.
For example, if a letter is used in the place of a digit,
scanf
will translate the letter to 0.
idcheck will then use this value in its query.
See also
idinstall(ADM),
mdevice(F),
sdevice(F)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003