devctl_safe_quote_sb(9)

devctl_safe_quote_sb9

Insert a string, properly quoted, into a sbuf

Usage

#include <sys/devctl.h>

#include <sys/sbuf.h>

void

devctl_safe_quote_sb(struct sbuf *sb, const char *src);

Overview

Copy the string from src into sb. All backslash characters are doubled. All double quote characters ‘"’ are also preceded by a backslash. All other characters are copied without modification. The devctl(4) protocol requires quoted string to be quoted thus. This routine centralizes this knowledge.

Releases

15 releases since FreeBSD 13.0-RELEASE; the text changed 1 time.

  1. 13.0–13.2
  2. 13.3–16.0

Authors

This manual page was written by M. Warner Losh

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.