COHERENT manpages
This page displays the COHERENT manpage for cohtune [Set a variable within a device driver].
List of available manpages
Index
cohtune -- Command Set a variable within a device driver cohtune driver tagfield "tagfield = value" The command cohtune sets the tagfield to value within the given device driver driver. You can then use the command idmkcoh to build a new kernel that incorporates your changes. When you boot the new kernel, your changes will have been made. cohtune works by modifying the file Space.c for driver. Each device driver has such a file, that sets user-definable dimensions of its operation. When you invoke the command idmkcoh to build a new kernel, COHERENT automatically checks whether a Space.c module that have changed, compiles it, and links it into the newly built kernel. idmkcoh also recompiles every Space.c whenever you change a tunable variable in the kernel, just to ensure that all drivers are synchronized with changes in the kernel. For example, the file /etc/conf/hai/Space.c gives the user-settable variable for the driver hai, which is COHERENT's host-adapter-independent SCSI driver. This file contains, among others, the variable HAI_TAPE. This variable is a bit-map; bit n is turned on if there is a SCSI tape device at SCSI ID n. If you have installed a SCSI tape as SCSI device 3, then type the following command: cohtune hai "HAI_TAPE" "int HAI_TAPE = 0x08" The value 0x08 turns on bit 3. As you can see, cohtune finds the line in /etc/conf/hai/Space.c that contains the string HAI_TAPE and is not commented out of the source, and replaces it with the line int HAI_TAPE = 0x08 You can read a driver's Space.c to see how you can configure it. Space.c also gives some useful clues as to how the driver works and how it is currently configured. You should never modify a Space.c by hand. If you do so, you run the risk of building a kernel that does not boot, or trashes your file system. See Also commands, device drivers, idenable, idmkcoh, idtune Notes cohtune cannot be used with STREAMS drivers. Note that cohtune peforms no checks whatsoever on the content of the string with which you replace tagfield It should only be used by people familiar with C programming, because setting invalid values may cause errors that are difficult to diagnose. Caveat utilitor. Because of the primitive nature of cohtune, we recommend that users not use it directly, but work instead through the configuration shell scripts supplied by the driver's developer (which typically live in directory /etc/conf/driver) that can interactively generate the correct sequence of cohtune commands.