Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

strchg(1) [osf1 man page]

strchg(1)						      General Commands Manual							 strchg(1)

strchg, strconf - Alters and queries stream configuration SYNOPSIS
strchg -h module1 [,module2,... modulen] strchg -p [-a | -u module] strchg -f file strconf [-t | -m module] The strchg and strconf commands modify and return information about the configuration of the Stream associated with the user's standard input. OPTIONS
The strchg command has three formats, which must be specified separately. These formats offer the following options: When used with -p, removes all of the STREAMS modules above the topmost driver; that is, the command only affects the uppermost Stream created for a multi- plexed driver, not any of the lower Streams. This option cannot be used with -u. Specifies a file that contains a list of STREAMS modules to be pushed on the standard input Stream for a desired configuration. The names of the modules must occupy separate lines in the file. The strchg command pushes any module that is desired but is not present on the Stream, and pops any module that is not desired and is present on the Stream. Pushes the STREAMS module or modules specified by the module argument or arguments on the standard input Stream. The com- mand pushes the STREAMS modules on the Stream in the order that they are specified; that is, module1 is pushed first, module2 is pushed second, and so forth. Pops STREAMS modules off the standard input Stream. When the -p option is specified without any other options, the command removes the topmost module (the module immediately below the Stream head) from the Stream. The -a and -u options cannot be used simultaneously with the -p option. When used with -p, pops all of the modules above the specified module off the Stream, leaving that mod- ule on it. This option cannot be used with -a. The strconf command options are the following: Prints the name of the topmost module on the standard input Stream, if this module exists. Confirms whether or not the specified module module is present on the Stream. DESCRIPTION
The strchg command pushes and pops STREAMS modules on and off the user's standard input Stream to achieve a desired configuration. The str- conf command queries the configuration of the Stream, then prints the names of the modules and the topmost device driver, or the name of the topmost module, or the name of a specific module. When the -f option is used, the strchg command first determines the current configuration of the standard input Stream, then pushes or pops the modules named in the file argument to fix it. The module that is named first is meant to be the one that is located below the Stream head, while the module named last is meant to be at the bottom of the Stream, closest to the device driver. This is the opposite of the order in which the strchg command pushes and pops modules when it is invoked with the -h option. To use the strchg command, you must either be the owner of the Stream or the superuser. Without options, the strconf command prints the names of all of the modules, if any, and the name of the topmost driver. Names are printed one per line, with the driver's name last. When the autopush mechanism is used in a system, the strconf command returns the names of the modules that were automatically pushed on the standard input Stream at the opening of the associated device. If the Stream configuration has been changed since the device was opened, the command prints the altered list of module names. If the -t option is used, the strconf command prints only the topmost module's name, if any exists. When the -m option is used, the command queries the standard input Stream for the module specified in the module argument. If this module is present on the Stream, it prints the message yes and returns a 0 (zero). If the module is not on the Stream, strchg prints no and returns a nonzero value. The -t and -m options cannot be used simultaneously. To use the strconf command, you must either have read permission or be the superuser. For both the strchg and strconf commands, note that if modules are pushed onto the user's standard input Stream in the wrong order, that Stream will not function as expected. For example, in the case of terminal lines (ttys), the line discipline module must be pushed in the correct place; otherwise, the terminal might not respond correctly to commands. EXIT STATUS
The strchg command returns 0 (zero) on success. When the command encounters an error, it returns a nonzero status and prints an error mes- sage. The command returns errors for such conditions as a usage error, bad module name, failure of an ioctl system call, and failure to open the file specified by the -f option. The strconf command returns 0 (zero) on success and a nonzero status for errors. It prints an error message for any errors. When the -m and -t options return successfully, this indicates that the named, or topmost, module is present. The error conditions that the command returns a status for include a usage error and a failure of an ioctl system call. EXAMPLES
To print out the names of the modules and driver present on the user's standard input Stream, enter: strconf To push the fictional line discipline module linedisp onto the user's standard input Stream, enter: strchg -h linedisp The ldterm module is pushed below the Stream head in the user's standard input Stream. To set up the standard input Stream (JIS) characters, and to do this using a previously created file called /$HOME/.mytty.conf that lists the modules, enter: strchg -f $HOME/.mytty.conf If the list of modules in the /$HOME/.mytty.conf file is as follows, the fictional lpass module will be pushed first, followed by the fictional linedisp module, followed by the fictional upass module. upass linedisp lpass SEE ALSO
Commands: autopush(8) Interfaces: streamio(7) strchg(1)
Man Page