Google is committed to advancing racial equity for Black communities. See how.

zx_debug_write

NAME

Write data to the debug serial port.

SYNOPSIS

#include <zircon/syscalls.h>

zx_status_t zx_debug_write(const char* buffer, size_t buffer_size);

DESCRIPTION

zx_debug_write() attempts to write data of buffer_size bytes to the debug serial port.

To use the zx_debug_write() function, you must specify kernel.enable-serial-syscalls=true or kernel.enable-serial-syscalls=output-only on the kernel command line. Otherwise, the function returns ZX_ERR_NOT_SUPPORTED.

zx_debug_write is intended for diagnostic use. Data may be dropped or truncated, but the data from two different zx_debug_write calls will not be interleaved or reordered.

RIGHTS

None.

RETURN VALUE

Returns ZX_OK on success.

ERRORS

ZX_ERR_NOT_SUPPORTED kernel.enable-serial-syscalls is not set to true or output-only on the kernel command line.

ZX_ERR_INVALID_ARGS buffer is NULL.

SEE ALSO