This is the procedure which is invoked as a result of the write system call:
“write” (5722) calls “rdwr”, which (5755) calls “writei”, which (6287) calls “cdevsw[..].d write”, which translates (4675) to “lpwrite”.
“lpwrite” takes the non-null characters of a null terminated string recorded in the user area, and passes them to “lpoutput” (via “lpcanon”) one at a time.
The list of procedure calls which leads to the invocation of this procedure is similar to that for “lpopen”. A “form feed” character is output to clear the current page, and the “open” flag is reset.