Lines Matching defs:string

102 #include <string.h>
365 parse(char *string, int flags)
377 (void)strlcpy(buf, string, sizeof(buf));
379 if ((cp = strchr(string, '=')) != NULL) {
387 if ((indx = findname(string, "top", &bufp, &toplist)) == -1)
403 if ((indx = findname(string, "second", &bufp, lp)) == -1)
420 (void)printf("%s: ", string);
425 (void)printf("%s = %s\n", string,
429 sysctl_forkstat(string, &bufp, mib, flags, &type);
432 len = sysctl_tty(string, &bufp, mib, flags, &type);
437 sysctl_nchstats(string, &bufp, mib, flags, &type);
440 len = sysctl_malloc(string, &bufp, mib, flags, &type);
452 warnx("use netstat to view %s", string);
457 warnx("use dmesg to view %s", string);
462 warnx("use ps to view %s information", string);
479 len = sysctl_seminfo(string, &bufp, mib, flags, &type);
484 len = sysctl_shminfo(string, &bufp, mib, flags, &type);
492 string);
495 len = sysctl_watchdog(string, &bufp, mib, flags,
501 len = sysctl_tc(string, &bufp, mib, flags,
509 warnx("use fstat to view %s information", string);
520 len = sysctl_audio(string, &bufp, mib, flags, &type);
525 len = sysctl_video(string, &bufp, mib, flags, &type);
530 len = sysctl_witness(string, &bufp, mib, flags, &type);
537 warnx("use pfctl to view %s information", string);
554 string);
558 len = sysctl_sensors(string, &bufp, mib, flags, &type);
563 len = sysctl_battery(string, &bufp, mib, flags, &type);
583 (void)printf("%s%s", string, equ);
595 (void)printf("%s: ", string);
600 (void)printf("%s%s", string, equ);
604 len = sysctl_swpenc(string, &bufp, mib, flags, &type);
618 warnx("use vmstat or systat to view %s information", string);
625 len = sysctl_inet(string, &bufp, mib, flags, &type);
648 string);
660 parse_baddynamic(mib, len, string,
666 len = sysctl_inet6(string, &bufp, mib, flags, &type);
680 string);
686 len = sysctl_unix(string, &bufp, mib, flags, &type);
692 len = sysctl_link(string, &bufp, mib, flags, &type);
698 len = sysctl_bpf(string, &bufp, mib, flags, &type);
704 len = sysctl_mpls(string, &bufp, mib, flags, &type);
710 len = sysctl_pipex(string, &bufp, mib, flags, &type);
717 warnx("use netstat to view %s information", string);
762 len = sysctl_bios(string, &bufp, mib, flags, &type);
774 len = sysctl_chipset(string, &bufp, mib, flags, &type);
783 len = sysctl_fs(string, &bufp, mib, flags, &type);
790 len = sysctl_vfs(string, &bufp, mib, flags, &type);
792 len = sysctl_vfsgen(string, &bufp, mib, flags, &type);
813 warnx("name %s in %s is unknown", bufp, string);
827 warnx("%s: value is %s: %s", string, errstr,
847 warnx("%s: hex string %s: invalid",
848 string, (char *)newval);
852 warnx("%s: hex string %s: too long",
853 string, (char *)newval);
869 warnx("%s: value is not available", string);
872 warnx("%s: specification is incomplete", string);
875 warnx("%s: type is unknown to this program", string);
881 warn("%s", string);
888 (void)printf("%s%s", string, equ);
904 (void)printf("%s%s", string, equ);
930 (void)printf("%s%s", string, equ);
944 (void)printf("%s%s%s", string, equ, ct);
946 (void)printf("%s%s%lld\n", string, equ,
956 (void)printf("%s%s%s\n", string, equ,
966 (void)printf("%s%s%s\n", string, equ,
977 (void)printf("%s%s", string, equ);
988 (void)printf("%s%s", string, equ);
996 (void)printf("%s%s", string, equ);
1001 (void)printf("%s: %u -> ", string,
1014 (void)printf("%s%s", string,
1042 printf("%s%s", string, equ);
1053 printf("%s%s", string, equ);
1063 printf("%s%s", string, equ);
1080 (void)printf("%s%s", string, equ);
1088 (void)printf("%s: %d -> ", string,
1101 (void)printf("%s%s", string, equ);
1113 (void)printf("%s: ", string);
1135 (void)printf("%s%s", string, equ);
1144 string, tmp);
1152 warnx("%s: unknown structure returned", string);
1157 warnx("%s: unknown type returned", string);
1185 parse_baddynamic(int mib[], size_t len, char *string, void **newvalp,
1205 printf("%s: ", string);
1347 sysctl_vfsgen(char *string, char **bufpp, int mib[], int flags, int *typep)
1354 listall(string, vfsvars);
1358 if ((indx = findname(string, "third", bufpp, vfsvars)) == -1)
1374 string, vfc.vfc_refcount,
1383 sysctl_vfs(char *string, char **bufpp, int mib[], int flags, int *typep)
1390 warnx("No variables defined for file system %s", string);
1394 listall(string, lp);
1397 if ((indx = findname(string, "third", bufpp, lp)) == -1)
1413 sysctl_fs(char *string, char **bufpp, int mib[], int flags, int *typep)
1418 listall(string, &fslist);
1421 if ((indx = findname(string, "third", bufpp, &fslist)) == -1)
1436 sysctl_bios(char *string, char **bufpp, int mib[], int flags, int *typep)
1442 listall(string, &bioslist);
1445 if ((indx = findname(string, "third", bufpp, &bioslist)) == -1)
1457 string, indx);
1463 warnx("%s: incomplete specification", string);
1468 warnx("%s: %s", string, errstr);
1487 sysctl_swpenc(char *string, char **bufpp, int mib[], int flags, int *typep)
1492 listall(string, &swpenclist);
1495 if ((indx = findname(string, "third", bufpp, &swpenclist)) == -1)
1803 sysctl_nchstats(char *string, char **bufpp, int mib[], int flags, int *typep)
1812 listall(string, &nchstatslist);
1815 if ((indx = findname(string, "third", bufpp, &nchstatslist)) == -1)
1819 warnx("fourth level name in %s is invalid", string);
1829 (void)printf("%s%s", string, equ);
1875 sysctl_tty(char *string, char **bufpp, int mib[], int flags, int *typep)
1880 listall(string, &ttylist);
1883 if ((indx = findname(string, "third", bufpp, &ttylist)) == -1)
1890 string);
1900 sysctl_forkstat(char *string, char **bufpp, int mib[], int flags, int *typep)
1909 listall(string, &forkstatlist);
1912 if ((indx = findname(string, "third", bufpp, &forkstatlist)) == -1)
1915 warnx("fourth level name in %s is invalid", string);
1925 (void)printf("%s%s", string, equ);
1959 sysctl_malloc(char *string, char **bufpp, int mib[], int flags, int *typep)
1968 listall(string, &kernmalloclist);
1971 if ((indx = findname(string, "third", bufpp, &kernmalloclist)) == -1)
1994 listall(string, &lp);
2029 listall(string, &lp);
2037 string);
2069 sysctl_chipset(char *string, char **bufpp, int mib[], int flags, int *typep)
2077 listall(string, &chipsetlist);
2080 if ((indx = findname(string, "third", bufpp, &chipsetlist)) == -1)
2084 printf("%s%s", string, equ);
2125 sysctl_inet(char *string, char **bufpp, int mib[], int flags, int *typep)
2131 listall(string, &inetlist);
2134 if ((indx = findname(string, "third", bufpp, &inetlist)) == -1)
2142 warnx("%s: no variables defined for this protocol", string);
2146 listall(string, lp);
2149 if ((indx = findname(string, "fourth", bufpp, lp)) == -1)
2157 listall(string, &ifqlist);
2161 if ((tindx = findname(string, "fifth", bufpp, lp)) == -1)
2261 sysctl_inet6(char *string, char **bufpp, int mib[], int flags, int *typep)
2267 listall(string, &inet6list);
2270 if ((indx = findname(string, "third", bufpp, &inet6list)) == -1)
2278 warnx("%s: no variables defined for this protocol", string);
2282 listall(string, lp);
2285 if ((indx = findname(string, "fourth", bufpp, lp)) == -1)
2293 listall(string, &ifqlist);
2297 if ((tindx = findname(string, "fifth", bufpp, lp)) == -1)
2318 sysctl_unix(char *string, char **bufpp, int mib[], int flags, int *typep)
2324 listall(string, &netunixlist);
2327 if ((indx = findname(string, "third", bufpp, &netunixlist)) == -1)
2338 listall(string, lp);
2341 if ((indx = findname(string, "fourth", bufpp, lp)) == -1)
2357 sysctl_link(char *string, char **bufpp, int mib[], int flags, int *typep)
2363 listall(string, &netlinklist);
2366 if ((indx = findname(string, "third", bufpp, &netlinklist)) == -1)
2374 warnx("%s: no variables defined for this protocol", string);
2378 listall(string, lp);
2381 if ((indx = findname(string, "fourth", bufpp, lp)) == -1)
2390 sysctl_bpf(char *string, char **bufpp, int mib[], int flags, int *typep)
2395 listall(string, &bpflist);
2398 if ((indx = findname(string, "third", bufpp, &bpflist)) == -1)
2410 sysctl_mpls(char *string, char **bufpp, int mib[], int flags, int *typep)
2416 listall(string, &mplslist);
2419 if ((indx = findname(string, "third", bufpp, &mplslist)) == -1)
2427 listall(string, &ifqlist);
2431 if ((tindx = findname(string, "fourth", bufpp, lp)) == -1)
2442 sysctl_pipex(char *string, char **bufpp, int mib[], int flags, int *typep)
2448 listall(string, &pipexlist);
2451 if ((indx = findname(string, "third", bufpp, &pipexlist)) == -1)
2459 listall(string, &ifqlist);
2463 if ((tindx = findname(string, "fourth", bufpp, lp)) == -1)
2476 sysctl_seminfo(char *string, char **bufpp, int mib[], int flags, int *typep)
2481 listall(string, &semlist);
2484 if ((indx = findname(string, "third", bufpp, &semlist)) == -1)
2495 sysctl_shminfo(char *string, char **bufpp, int mib[], int flags, int *typep)
2500 listall(string, &shmlist);
2503 if ((indx = findname(string, "third", bufpp, &shmlist)) == -1)
2514 sysctl_watchdog(char *string, char **bufpp, int mib[], int flags,
2520 listall(string, &watchdoglist);
2523 if ((indx = findname(string, "third", bufpp, &watchdoglist)) == -1)
2534 sysctl_tc(char *string, char **bufpp, int mib[], int flags,
2540 listall(string, &tclist);
2543 if ((indx = findname(string, "third", bufpp, &tclist)) == -1)
2554 sysctl_sensors(char *string, char **bufpp, int mib[], int flags, int *typep)
2577 string, snsrdev.xname);
2589 warnx("%s: incomplete specification", string);
2592 /* convert sensor device string to an integer */
2607 warnx("%s: sensor device not found: %s", string, devname);
2614 print_sensordev(string, mib, 3, &snsrdev);
2623 warnx("%s: incomplete specification", string);
2633 warnx("%s: %s", string, errstr);
2643 warnx("%s: sensor type not recognised: %s", string, typename);
2653 print_sensordev(string, mib, 4, &snsrdev);
2673 print_sensordev(char *string, int mib[], u_int mlen, struct sensordev *snsrdev)
2682 string, sensor_type_s[type]);
2694 snprintf(buf, sizeof(buf), "%s%u", string, numt);
2713 printf("%s%s", string, equ);
2876 sysctl_audio(char *string, char **bufpp, int mib[], int flags, int *typep)
2881 listall(string, &audiolist);
2884 if ((indx = findname(string, "third", bufpp, &audiolist)) == -1)
2895 sysctl_video(char *string, char **bufpp, int mib[], int flags, int *typep)
2900 listall(string, &videolist);
2903 if ((indx = findname(string, "third", bufpp, &videolist)) == -1)
2914 sysctl_witness(char *string, char **bufpp, int mib[], int flags, int *typep)
2919 listall(string, &witnesslist);
2922 if ((indx = findname(string, "third", bufpp, &witnesslist)) == -1)
2933 sysctl_battery(char *string, char **bufpp, int mib[], int flags,
2939 listall(string, &batterylist);
2942 if ((indx = findname(string, "third", bufpp, &batterylist)) == -1)
2953 findname(char *string, char *level, char **bufp, struct list *namelist)
2959 warnx("%s: incomplete specification", string);
2967 warnx("%s level name %s in %s is invalid", level, name, string);