/* Note: If the character array is too small (or absent), the print buffer becomes a null device that discards anything written to it.  */
void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 size)
/* Note: If the character array is too small (or absent), the print buffer becomes a null device that discards anything written to it.  */
void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 size)
{
	pb->buf = raw;
	pb->crs = raw;
	pb->size = size;
	pb->echo = 0;
	if (size < TIPC_PB_MIN_SIZE) {
		pb->buf = NULL;
	} else if (raw) {
		pb->buf[0] = 0;
		pb->buf[size - 1] = ~0;
	}
}