string --
boot, configuration, and other system strings pseudo-device driver
Description
The kernel tables driver is a character special pseudo-device
providing access to various strings (such as console messages)
and system tables (such as all processes).
The tables are described in
tab(HW).
This manual page only describes the string devices shown in the
following table:
Name in
Minor number
Access
fixed size or
/dev/string
(decimal)
mtune(F) variable
boot
1
Read/write
512
pkg
2
Read-only
512
cfg
3
Read-only
MAX_CFGSIZE
prf
4
Read-only
PUTBUFSZ
The bootstring /dev/string/boot is the name of
the kernel booted and the arguments passed to that kernel
by
boot(HW).
It is built from a combination of user input and
/etc/default/boot.
The package string /dev/string/pkg
lists what the
btld(F)
packages linked into the kernel at boot-time.
The configuration string /dev/string/cfg
lists all initialized devices.
It is built by concatenating all the output of
printcfg(D3oddi) functions
of configured drivers.
The putbuf buffer
that can be viewed with the
crash(ADM)
utility
contains the most recent messages printed by the kernel.
This buffer is written to
the /dev/string/prf file.
Reading the strings is non-blocking and non-destructive.
Only the bootstring may be written to.
Only the following subset of the tabioctl(S)
commands are supported:
TAB_TABLE_SIZE
The current size of the string.
TAB_MAX_SIZE
The maximum possible size of the string.
Device drivers read the bootstring using the
getbsflag(D3oddi),
getbsvalue(D3oddi),
and
getbsword(D3oddi)
functions.
Diagnostics
The following codes may be returned in errno after an
error:
[ENXIO]
The minor device number is not defined;
an attempt was made to write
to a string starting at a position beyond its maximum size or to
read
bytes starting at a position beyond the current end of the string.
[ENODEV]
An attempt was made to open a read-only device for writing;
a tabioctl
command not supported by this string was attempted.
[EIO]
The string is corrupted or not present in this configuration
of the system.
[EINVAL]
An unknown ioctl command was attempted.
[EFAULT]
A read or write specified an invalid buffer
address or size.
[EAGAIN]
The write would block and
O_NONBLOCK is set for the file descriptor.
[EINTR]
The write was interrupted by a signal.
The following error message may be displayed on the console.
See
messages(M)
for general information about kernel error messages,
including a list of generic device driver errors.
CONFIG: string: Configuration buffer full (MAX_CFGSIZE = n
exceeded) on dev major/minor
No more characters could be written to one of the bootstring, package string, or
configuration string buffers.
Limitations
It is not possible to shrink the size of a string.
The previous version of the
string device differed in the following respects:
Pseudo-devices were exclusive-open
(only one open of each string was allowed at a time).
An attempt to open a string
that was already open always failed with error [EACCES].
This tab version of string
pseudo-devices does not support exclusive-open;
each string can be open multiple times.
An attempt to open a read-only string for writing
failed with error [EACCES].
This tab version fails with error
[ENODEV].
A write to a string device could not be interrupted.
A write to a tabstring may be
interrupted failing with error [EINTR].
Partial writes were sometimes previously reported as errors (usually
[EFAULT]) despite successfully adding or altering some
characters in the string.
The tabstring pseudo-device
returns the number of characters added or changed before
the error occurred.
No ioctl commands were available.
Files
/usr/include/sys/tab.h
defines the ioctl commands listed in the ``Description''
/dev/string
directory containing the string device special files
/dev/table
directory containing the special files described in the
tab(HW)
manual page
/usr/include/sys/tabconf.h
internal tab data structures and configuration definitions