_PATH_DEV
if (strncmp(changer, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
changer += sizeof(_PATH_DEV) - 1;
if (asprintf(&tapedev, _PATH_DEV "%s",
if (unveil(_PATH_DEV, "r") == -1 && errno != ENOENT)
err(1, "unveil %s", _PATH_DEV);
if ((dirp = opendir(_PATH_DEV)) == NULL)
memcpy(buf + sizeof(_PATH_DEV) - 1, data.data,
if ((dp = opendir(_PATH_DEV)) == NULL)
if (dirp->d_namlen > len - sizeof(_PATH_DEV)) {
memcpy(buf + sizeof(_PATH_DEV) - 1, dirp->d_name,
if (len < sizeof(_PATH_DEV))
memcpy(buf, _PATH_DEV, sizeof(_PATH_DEV));
if (data.size > len - (sizeof(_PATH_DEV) - 1)) {
strlcpy(slave, _PATH_DEV, sizeof(slave));
slave[sizeof(_PATH_DEV) - 1] = 't';
if (strncmp(devnam, _PATH_DEV, sizeof(_PATH_DEV) - 1) != 0 ||
if (strcmp(devnam + sizeof(_PATH_DEV) - 1, tty) == 0) {
_PATH_DEV, prefix, path);
_PATH_DEV, prefix, path, 'a' + getrawpartition());
snprintf(buf, buflen, "%s%s%s", _PATH_DEV, iscooked ? "" : "r", path);
snprintf(buf, buflen, "%s%s%s%c", _PATH_DEV, iscooked ? "" : "r", path,
if (strlen(device) > sizeof(_PATH_DEV) - 1) {
snprintf(rpath, sizeof(rpath), "%sr%s", _PATH_DEV,
&device[sizeof(_PATH_DEV) - 1]);
if (unveil(_PATH_DEV, "rw") == -1)
err(1, "unveil %s", _PATH_DEV);
_PATH_DEV, (int)sizeof(utp->ut_line), utp->ut_line);
if (strchr(tty + sizeof(_PATH_DEV) - 1, '/')) {
snprintf(ttyn, sizeof ttyn, "%s%s", _PATH_DEV, argv[2]);
snprintf(devname, sizeof devname, "%s/%.*s", _PATH_DEV,
(void)snprintf(full_tty, sizeof(full_tty), "%s/%s", _PATH_DEV,
(void) strlcpy(ftty, _PATH_DEV, sizeof(ftty));
ftty[sizeof(_PATH_DEV)-1] = '\0';
if (chdir(_PATH_DEV) == -1) {
syslog(LOG_ERR, "chdir: %s: %m", _PATH_DEV);
snprintf(dev, sizeof(dev), _PATH_DEV "%s", dk);
snprintf(dev, sizeof(dev), _PATH_DEV "%s%c", dk,
CHECKe(zero = open(_PATH_DEV "zero", O_RDONLY));
CHECKe(null = open(_PATH_DEV "null", O_WRONLY));
strlcpy(name, _PATH_DEV, sizeof name);
} else if (strncmp(_PATH_DEV, specname, sizeof(_PATH_DEV) - 1) == 0 &&
specname[sizeof(_PATH_DEV) - 1] == 'r') {
snprintf(bdev, sizeof(bdev), "%s%s", _PATH_DEV,
&specname[sizeof(_PATH_DEV)]);
login_fbtab(sp->se_device + sizeof(_PATH_DEV) - 1, 0, 0);
devlen = sizeof(_PATH_DEV) - 1;
char *line = sp->se_device + sizeof(_PATH_DEV) - 1;
if (asprintf(&sp->se_device, "%s%s", _PATH_DEV, typ->ty_name) == -1)
if (strncmp(_PATH_DEV, dev, sizeof(_PATH_DEV) - 1)) {
(void)snprintf(devn, sizeof(devn), "%s%s", _PATH_DEV, dev);
len = sizeof(_PATH_DEV) - 1;
if (strncmp(_PATH_DEV, s1, len) == 0)
if (strncmp(_PATH_DEV, s2, len) == 0) {
len = sizeof(_PATH_DEV) - 1;
if (strncmp(_PATH_DEV, s1, len) == 0)
if (strncmp(_PATH_DEV, s2, len) == 0) {
len = sizeof(_PATH_DEV) - 1;
if (!strncmp(s1, _PATH_DEV, len))
if (!strncmp(s2, _PATH_DEV, len))
if (asprintf(&devpath, "%s%s", _PATH_DEV, name) == -1) {
(void)snprintf(path, sizeof path, "%s%s", _PATH_DEV, tep->ty_name);
if (asprintf(&tmp, "%s%s", _PATH_DEV, line_path) == -1)
(void)snprintf(tbuf, sizeof(tbuf), "%s%s", _PATH_DEV, w->tty);
if (!strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1))
if (strncmp(c->ttyname, _PATH_DEV, (sizeof _PATH_DEV) - 1) != 0)
if (strcmp(copy, c->ttyname + (sizeof _PATH_DEV) - 1) == 0)
char ttybuf[sizeof(_PATH_DEV) + UT_LINESIZE];
(void)strlcpy(ttybuf, _PATH_DEV, sizeof(ttybuf));
static char device[MAXNAMLEN] = _PATH_DEV;
(void) strlcpy(device + sizeof(_PATH_DEV) - 1, line,
sizeof(device) - (sizeof(_PATH_DEV) - 1));
if (strchr(device + sizeof(_PATH_DEV) - 1, '/')) {
if (unveil(_PATH_DEV, "w") == -1)
err(1, "unveil %s", _PATH_DEV);
if (unveil(_PATH_DEV, "r") == -1)
err(1, "unveil %s", _PATH_DEV);
char line[sizeof(_PATH_DEV) + sizeof (up->ut_line)];
strlcpy(line, _PATH_DEV, sizeof line);
(void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty);
(void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty);
if (!strncmp(argv[2], _PATH_DEV, sizeof(_PATH_DEV) - 1))
argv[2] += sizeof(_PATH_DEV) - 1;
if (unveil(_PATH_DEV, "r") == -1)
err(1, "unveil %s", _PATH_DEV);
if (chdir(_PATH_DEV))
err(1, "%s", _PATH_DEV);
if (strncmp(_PATH_DEV, dev, sizeof(_PATH_DEV) - 1)) {
(void)snprintf(devn, sizeof(devn), "%s%s", _PATH_DEV, dev);
_PATH_DEV, nm + 1);
if (strncmp(nm, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0 &&
nm[sizeof(_PATH_DEV) - 1] != 'r') {
snprintf(dev, sizeof(dev), "%sr%s", _PATH_DEV,
nm + sizeof(_PATH_DEV) - 1);
if (unveil(_PATH_DEV, "rw") == -1)
err(1, "unveil %s", _PATH_DEV);
static char device[MAXNAMLEN] = _PATH_DEV;
(void) strlcpy(device + sizeof(_PATH_DEV) - 1, utline,
sizeof(device) - (sizeof(_PATH_DEV) - 1));
if (strchr(device + sizeof(_PATH_DEV) - 1, '/')) {