| /freebsd-11-stable/lib/libcasper/services/cap_pwd/tests/ |
| HD | pwd_test.c | 241 const char *cmds[7], *fields[10], *names[6]; in test_cmds() local 279 cmds[0] = "setpwent"; in test_cmds() 280 cmds[1] = "getpwent"; in test_cmds() 281 cmds[2] = "getpwent_r"; in test_cmds() 282 cmds[3] = "getpwnam"; in test_cmds() 283 cmds[4] = "getpwnam_r"; in test_cmds() 284 cmds[5] = "getpwuid"; in test_cmds() 285 cmds[6] = "getpwuid_r"; in test_cmds() 286 CHECK(cap_pwd_limit_cmds(cappwd, cmds, 7) == 0); in test_cmds() 306 cmds[0] = "setpwent"; in test_cmds() [all …]
|
| /freebsd-11-stable/lib/libcasper/services/cap_grp/tests/ |
| HD | grp_test.c | 229 const char *cmds[7], *fields[4], *names[5]; in test_cmds() local 261 cmds[0] = "setgrent"; in test_cmds() 262 cmds[1] = "getgrent"; in test_cmds() 263 cmds[2] = "getgrent_r"; in test_cmds() 264 cmds[3] = "getgrnam"; in test_cmds() 265 cmds[4] = "getgrnam_r"; in test_cmds() 266 cmds[5] = "getgrgid"; in test_cmds() 267 cmds[6] = "getgrgid_r"; in test_cmds() 268 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == 0); in test_cmds() 289 cmds[0] = "setgrent"; in test_cmds() [all …]
|
| /freebsd-11-stable/tools/regression/capsicum/syscalls/ |
| HD | cap_ioctls_limit.c | 52 unsigned long cmds[2]; in ioctl_tests_0() local 62 cmds[0] = FIOCLEX; in ioctl_tests_0() 63 cmds[1] = FIONCLEX; in ioctl_tests_0() 64 CHECK(cap_ioctls_limit(fd, cmds, nitems(cmds)) == 0); in ioctl_tests_0() 65 cmds[0] = cmds[1] = 0; in ioctl_tests_0() 66 CHECK(cap_ioctls_get(fd, cmds, nitems(cmds)) == nitems(cmds)); in ioctl_tests_0() 67 CHECK((cmds[0] == FIOCLEX && cmds[1] == FIONCLEX) || in ioctl_tests_0() 68 (cmds[0] == FIONCLEX && cmds[1] == FIOCLEX)); in ioctl_tests_0() 69 cmds[0] = FIOCLEX; in ioctl_tests_0() 70 cmds[1] = FIONCLEX; in ioctl_tests_0() [all …]
|
| /freebsd-11-stable/sys/compat/freebsd32/ |
| HD | freebsd32_capability.c | 55 u_long *cmds; in freebsd32_cap_ioctls_limit() local 67 cmds = NULL; in freebsd32_cap_ioctls_limit() 70 error = copyin(uap->cmds, cmds32, sizeof(cmds32[0]) * ncmds); in freebsd32_cap_ioctls_limit() 75 cmds = malloc(sizeof(cmds[0]) * ncmds, M_FILECAPS, M_WAITOK); in freebsd32_cap_ioctls_limit() 77 cmds[i] = cmds32[i]; in freebsd32_cap_ioctls_limit() 81 return (kern_cap_ioctls_limit(td, uap->fd, cmds, ncmds)); in freebsd32_cap_ioctls_limit() 91 u_long *cmds; in freebsd32_cap_ioctls_get() local 97 cmds32 = uap->cmds; in freebsd32_cap_ioctls_get() 117 cmds = fdep->fde_ioctls; in freebsd32_cap_ioctls_get() 118 if (cmds32 != NULL && cmds != NULL) { in freebsd32_cap_ioctls_get() [all …]
|
| /freebsd-11-stable/sys/kern/ |
| HD | sys_capability.c | 340 u_long *cmds; in cap_ioctl_check() local 352 cmds = fdp->fd_ofiles[fd].fde_ioctls; in cap_ioctl_check() 354 if (cmds[i] == cmd) in cap_ioctl_check() 365 cap_ioctl_limit_check(struct filedesc *fdp, int fd, const u_long *cmds, in cap_ioctl_limit_check() argument 382 if (cmds[i] == ocmds[j]) in cap_ioctl_limit_check() 393 kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds) in kern_cap_ioctls_limit() argument 409 error = cap_ioctl_limit_check(fdp, fd, cmds, ncmds); in kern_cap_ioctls_limit() 414 fdp->fd_ofiles[fd].fde_ioctls = cmds; in kern_cap_ioctls_limit() 417 cmds = ocmds; in kern_cap_ioctls_limit() 421 free(cmds, M_FILECAPS); in kern_cap_ioctls_limit() [all …]
|
| /freebsd-11-stable/crypto/heimdal/lib/sl/ |
| HD | sl.c | 40 mandoc_template(SL_cmd *cmds, in mandoc_template() argument 70 for(c = cmds; c->name; ++c) { in mandoc_template() 83 for(c = cmds; c->name; ++c) { in mandoc_template() 109 sl_match (SL_cmd *cmds, char *cmd, int exactp) in sl_match() argument 114 for (c = cmds; c->name; ++c) { in sl_match() 132 sl_help (SL_cmd *cmds, int argc, char **argv) in sl_help() argument 137 mandoc_template(cmds, NULL); in sl_help() 143 for (c = cmds; c->name; ++c) { in sl_help() 157 c = sl_match (cmds, argv[1], 0); in sl_help() 203 sl_command(SL_cmd *cmds, int argc, char **argv) in sl_command() argument [all …]
|
| HD | sl.h | 58 int sl_command_loop (SL_cmd *cmds, const char *prompt, void **data); 59 int sl_command (SL_cmd *cmds, int argc, char **argv); 62 SL_cmd *sl_match (SL_cmd *cmds, char *cmd, int exactp); 63 void sl_slc_help (SL_cmd *cmds, int argc, char **argv);
|
| /freebsd-11-stable/contrib/bmake/ |
| HD | for.c | 361 for_substitute(Buffer *cmds, strlist_t *items, unsigned int item_no, char ech) in for_substitute() argument 371 Buf_AddBytes(cmds, strlen(item), item); in for_substitute() 380 Buf_AddBytes(cmds, len + 1, item - 1); in for_substitute() 384 Buf_AddByte(cmds, '\\'); in for_substitute() 386 Buf_AddByte(cmds, '\\'); in for_substitute() 387 Buf_AddByte(cmds, ch); in for_substitute() 401 Buffer cmds; in For_Iterate() local 426 Buf_Init(&cmds, len + 256); in For_Iterate() 440 Buf_AddBytes(&cmds, cp - cmd_cp, cmd_cp); in For_Iterate() 441 Buf_AddBytes(&cmds, 2, ":U"); in For_Iterate() [all …]
|
| /freebsd-11-stable/contrib/nvi/ex/ |
| HD | ex_usage.c | 73 for (cp = cmds; cp->name != NULL && in ex_usage() 89 if (cp != &cmds[C_VISUAL_EX] && in ex_usage() 90 cp != &cmds[C_VISUAL_VI]) in ex_usage() 92 if (cp == &cmds[C_VISUAL_EX]) in ex_usage() 93 cp = &cmds[C_VISUAL_VI]; in ex_usage() 95 cp = &cmds[C_VISUAL_EX]; in ex_usage() 101 for (cp = cmds; cp->name != NULL && !INTERRUPTED(sp); ++cp) { in ex_usage() 110 if (cp == &cmds[C_SCROLL]) in ex_usage()
|
| HD | ex.c | 418 n = cmds[C_DELETE].name; *s == *n; ++s, ++n); in ex_cmd() 424 ecp->rcmd = cmds[C_DELETE]; in ex_cmd() 460 ecp->cmd = &cmds[C_K]; in ex_cmd() 472 ecp->rcmd = cmds[C_SUBSTITUTE]; in ex_cmd() 491 skip_srch: if (ecp->cmd == &cmds[C_VISUAL_EX] && F_ISSET(sp, SC_VI)) in ex_cmd() 492 ecp->cmd = &cmds[C_VISUAL_VI]; in ex_cmd() 503 (ecp->cmd == &cmds[C_PRINT] || in ex_cmd() 504 ecp->cmd == &cmds[C_PRESERVE])) in ex_cmd() 522 if ((ecp->cmd == &cmds[C_SHIFTL] && *p == '<') || in ex_cmd() 523 (ecp->cmd == &cmds[C_SHIFTR] && *p == '>')) { in ex_cmd() [all …]
|
| HD | ex_edit.c | 87 if (F_ISSET(cmdp, E_NEWSCREEN) || cmdp->cmd == &cmds[C_VSPLIT]) in ex_edit() 120 if ((cmdp->cmd == &cmds[C_VSPLIT] && vs_vsplit(sp, new)) || in ex_N_edit() 121 (cmdp->cmd != &cmds[C_VSPLIT] && vs_split(sp, new, 0))) { in ex_N_edit()
|
| /freebsd-11-stable/usr.sbin/binmiscctl/ |
| HD | binmiscctl.c | 68 } cmds[] = { variable 152 for(i = 0; i < ( sizeof (cmds) / sizeof (cmds[0])); i++) { in usage() 153 fprintf(stderr, "%s:\n", cmds[i].desc); in usage() 154 fprintf(stderr, "\t%s %s %s\n\n", __progname, cmds[i].name, in usage() 155 cmds[i].args); in usage() 234 for(i = 0; i < ( sizeof (cmds) / sizeof (cmds[0])); i++) { in demux_cmd() 235 if (!strcasecmp(cmds[i].name, argv[0])) { in demux_cmd() 423 error = (*cmds[cmd].func)(argc, argv, &xbe_in); in main() 426 cmds[cmd].name); in main() 466 cmds[cmd].name); in main()
|
| /freebsd-11-stable/usr.bin/usbhidaction/ |
| HD | usbhidaction.c | 243 struct command *cmds = in main() local 245 if (cmds) { in main() 247 commands = cmds; in main() 284 struct command *cmd, *cmds; in parse_conf() local 293 cmds = NULL; in parse_conf() 312 freecommands(cmds); in parse_conf() 329 cmd->next = cmds; in parse_conf() 330 cmds = cmd; in parse_conf() 343 freecommands(cmds); in parse_conf() 359 freecommands(cmds); in parse_conf() [all …]
|
| /freebsd-11-stable/sys/ufs/ufs/ |
| HD | ufs_vfsops.c | 88 ufs_quotactl(mp, cmds, id, arg) in ufs_quotactl() argument 90 int cmds; 95 if ((cmds >> SUBCMDSHIFT) == Q_QUOTAON || 96 (cmds >> SUBCMDSHIFT) == Q_QUOTAOFF) 105 cmd = cmds >> SUBCMDSHIFT; 106 type = cmds & SUBCMDMASK;
|
| /freebsd-11-stable/sbin/etherswitchcfg/ |
| HD | etherswitchcfg.c | 80 struct cmds { struct 86 static struct cmds cmds[]; argument 655 for(i=0; cmds[i].name != NULL; i++) { in main() 656 if (cfg.mode == cmds[i].mode && strcmp(argv[0], cmds[i].name) == 0) { in main() 657 if (argc < (cmds[i].args + 1)) { in main() 658 printf("%s needs an argument\n", cmds[i].name); in main() 661 (cmds[i].f)(&cfg, argv); in main() 662 argc -= cmds[i].args; in main() 663 argv += cmds[i].args; in main() 667 if (cmds[i].name == NULL) { in main() [all …]
|
| /freebsd-11-stable/usr.sbin/sesutil/ |
| HD | sesutil.c | 69 } cmds[] = { variable 84 static const int nbcmds = nitems(cmds); 99 if (strcmp(subcmd, cmds[i].name) == 0) { in usage() 102 cmds[i].param, cmds[i].desc); in usage() 107 fprintf(out, " %-12s%s\n\t\t%s\n\n", cmds[i].name, in usage() 108 cmds[i].param, cmds[i].desc); in usage() 644 if (strcmp(argv[0], cmds[i].name) == 0) { in main() 645 cmd = &cmds[i]; in main()
|
| /freebsd-11-stable/crypto/openssl/apps/ |
| HD | engine.c | 196 STACK_OF(OPENSSL_STRING) *cmds = NULL; in util_verbose() 206 cmds = sk_OPENSSL_STRING_new_null(); in util_verbose() 208 if (!cmds) in util_verbose() 277 if (cmds) in util_verbose() 278 sk_OPENSSL_STRING_pop_free(cmds, identity); in util_verbose() 286 static void util_do_cmds(ENGINE *e, STACK_OF(OPENSSL_STRING) *cmds, in util_do_cmds() argument 289 int loop, res, num = sk_OPENSSL_STRING_num(cmds); in util_do_cmds() 298 cmd = sk_OPENSSL_STRING_value(cmds, loop); in util_do_cmds()
|
| /freebsd-11-stable/sys/dev/iwm/ |
| HD | if_iwm_notif_wait.c | 144 if (cmd == wait_entry->cmds[i]) { in iwm_notification_wait_notify() 176 struct iwm_notification_wait *wait_entry, const uint16_t *cmds, int n_cmds, in iwm_init_notification_wait() argument 185 memcpy(wait_entry->cmds, cmds, n_cmds * sizeof(uint16_t)); in iwm_init_notification_wait()
|
| /freebsd-11-stable/lib/libcapsicum/ |
| HD | capsicum_helpers.h | 51 unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ, FIODTYPE }; in caph_limit_stream() local 69 if (cap_ioctls_limit(fd, cmds, nitems(cmds)) < 0 && errno != ENOSYS) in caph_limit_stream()
|
| /freebsd-11-stable/contrib/gdb/gdb/cli/ |
| HD | cli-script.c | 1011 copy_command_lines (struct command_line *cmds) in copy_command_lines() argument 1015 if (cmds) in copy_command_lines() 1019 result->next = copy_command_lines (cmds->next); in copy_command_lines() 1020 result->line = xstrdup (cmds->line); in copy_command_lines() 1021 result->control_type = cmds->control_type; in copy_command_lines() 1022 result->body_count = cmds->body_count; in copy_command_lines() 1023 if (cmds->body_count > 0) in copy_command_lines() 1028 xmalloc (sizeof (struct command_line *) * cmds->body_count); in copy_command_lines() 1030 for (i = 0; i < cmds->body_count; i++) in copy_command_lines() 1031 result->body_list[i] = copy_command_lines (cmds->body_list[i]); in copy_command_lines() [all …]
|
| /freebsd-11-stable/usr.sbin/bhyve/ |
| HD | consport.c | 117 cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ }; in console_handler() local 144 if (cap_ioctls_limit(STDIN_FILENO, cmds, nitems(cmds)) == -1 && in console_handler()
|
| /freebsd-11-stable/lib/libedit/ |
| HD | parse.c | 68 } cmds[] = { variable 130 for (i = 0; cmds[i].name != NULL; i++) in FUN() 131 if (Strcmp(cmds[i].name, ptr) == 0) { in FUN() 132 i = (*cmds[i].func) (el, argc, argv); in FUN()
|
| /freebsd-11-stable/tests/sys/capsicum/ |
| HD | ioctls_test.c | 70 u_long cmds[] = { FIONREAD }; in ATF_TC_BODY() local 95 ATF_REQUIRE(cap_ioctls_limit(s[0], cmds, nitems(cmds)) == 0); in ATF_TC_BODY()
|
| /freebsd-11-stable/sys/contrib/octeon-sdk/ |
| HD | cvmx-cmd-queue.h | 344 … cvmx_cmd_queue_write(cvmx_cmd_queue_id_t queue_id, int use_locking, int cmd_count, uint64_t *cmds) in cvmx_cmd_queue_write() argument 354 if (cvmx_unlikely(cmds == NULL)) in cvmx_cmd_queue_write() 382 *ptr++ = *cmds++; in cvmx_cmd_queue_write() 403 *ptr++ = *cmds++; in cvmx_cmd_queue_write() 411 *ptr++ = *cmds++; in cvmx_cmd_queue_write()
|
| /freebsd-11-stable/contrib/netbsd-tests/bin/sh/dotcmd/ |
| HD | t_dotcmd.sh | 40 cmds='return break continue' 47 for cmd in ${cmds}
|