Lines Matching +full:non +full:- +full:dual

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
55 /* true for blocking I/O and false for non-blocking I/O. */
78 /* the only non-EX_* prefixed exit code. */ in malloc_element()
92 .depth = -1,
93 .size = -1,
100 static const mqd_t fail = (mqd_t)-1;
140 warnx("queue name [%-.*s] must start with '/'.", NAME_MAX, queue); in sane_queue()
146 warnx("queue name [%-.*s] - only one '/' permitted.", in sane_queue()
153 warnx("queue name [%-.*s...] may not be longer than %d.", in sane_queue()
175 warnx("bad -b block format [%s] ignored.", text); in parse_block()
185 n1->text = content; in parse_content()
192 parse_long(text, &creation.depth, "-d", "depth"); in parse_depth()
202 &creation.group, "-g", "group"); in parse_group()
205 creation.group = entry->gr_gid; in parse_group()
220 warnx("impossible -m mode value [%s] ignored.", text); in parse_mode()
234 warnx("bad -p priority range [%s] ignored.", text); in parse_priority()
237 warnx("bad -p priority format [%s] ignored.", text); in parse_priority()
247 n1->text = queue; in parse_queue()
259 n1->text = queue; in parse_single_queue()
262 warnx("ignoring extra -q queue [%s].", queue); in parse_single_queue()
269 parse_long(text, &creation.size, "-s", "size"); in parse_size()
278 &creation.user, "-u", "user"); in parse_user()
281 creation.user = entry->pw_uid; in parse_user()
309 warnx("-d maximum queue depth not provided."); in validate_depth()
319 warnx("missing -q, or no sane queue name given."); in validate_queue()
340 warnx("-s maximum message size not provided."); in validate_size()
360 * index - current index into argv list.
361 * argc, argv - command line parameters.
362 * options - null terminated list of pointers to options.
373 const char **pattern = option->pattern; in parse_options()
384 option->parse(argv[index + 1]); in parse_options()
402 /* options - null terminated list of pointers to options. */
411 if (!option->validate()) in validate_options()
449 /* no need to re-apply mode. */ in create()
536 /* Return the display character for non-zero mode. */
538 dual(mode_t mode, char display) in dual() function
540 return (mode != 0 ? display : '-'); in dual()
547 static const char display[] = "-xSs"; in quad()
597 dual(mode & S_ISVTX, 's'), in info()
598 dual(mode & S_IRUSR, 'r'), in info()
599 dual(mode & S_IWUSR, 'w'), in info()
601 dual(mode & S_IRGRP, 'r'), in info()
602 dual(mode & S_IWGRP, 'w'), in info()
604 dual(mode & S_IROTH, 'r'), in info()
605 dual(mode & S_IWOTH, 'w'), in info()
606 dual(mode & S_IXOTH, 'x')); in info()
651 fprintf(stdout, "[%u]: %-*.*s\n", q_priority, result, result, text); in recv()
708 "usage:\n\tposixmqcontrol [rm|info|recv] -q <queue>\n" in usage()
709 "\tposixmqcontrol create -q <queue> -s <maxsize> -d <maxdepth> " in usage()
710 "[ -m <mode> ] [ -b <block> ] [-u <uid> ] [ -g <gid> ]\n" in usage()
711 "\tposixmqcontrol send -q <queue> -c <content> " in usage()
712 "[-p <priority> ]\n"); in usage()
748 static const char *names_queue[] = {"-q", "--queue", "-t", "--topic", NULL};
757 static const char *names_depth[] = {"-d", "--depth", "--maxmsg", NULL};
762 static const char *names_size[] = {"-s", "--size", "--msgsize", NULL};
767 static const char *names_block[] = {"-b", "--block", NULL};
773 "-c", "--content", "--data", "--message", NULL};
778 static const char *names_priority[] = {"-p", "--priority", NULL};
783 static const char *names_mode[] = {"-m", "--mode", NULL};
788 static const char *names_group[] = {"-g", "--gid", NULL};
793 static const char *names_user[] = {"-u", "--uid", NULL};
832 const char *queue = itq->text; in main()
850 const char *queue = itq->text; in main()
868 const char *queue = itq->text; in main()
872 const char *content = itc->text; in main()
887 const char *queue = STAILQ_FIRST(&queues)->text; in main()
902 const char *queue = itq->text; in main()