Home
last modified time | relevance | path

Searched refs:arg (Results 1 – 25 of 86) sorted by relevance

1234

/busybox-1.35.0/procps/
Dkill.c109 char *arg; in kill_main() local
130 arg = *++argv; in kill_main()
132 if (!arg || arg[0] != '-') { in kill_main()
140 if (arg[1] == 'l' && arg[2] == '\0') { in kill_main()
141 arg = *++argv; in kill_main()
142 if (!arg) { in kill_main()
149 if (isdigit(arg[0])) { in kill_main()
150 signo = bb_strtou(arg, NULL, 10); in kill_main()
152 bb_error_msg("unknown signal '%s'", arg); in kill_main()
162 signo = get_signum(arg); in kill_main()
[all …]
Dpwdx.c37 char *arg = *argv; in pwdx_main() local
42 if (is_prefixed_with(arg, "/proc/")) in pwdx_main()
43 arg += 6; in pwdx_main()
45 pid = bb_strtou(arg, NULL, 10); in pwdx_main()
47 bb_error_msg_and_die("invalid process id: '%s'", arg); in pwdx_main()
/busybox-1.35.0/coreutils/
Decho.c86 const char *arg; in echo_main() local
102 while ((arg = *++argv) != NULL) { in echo_main()
105 if (arg[0] != '-') in echo_main()
112 arg++; in echo_main()
116 if (*arg == 'n') in echo_main()
118 else if (*arg == 'e') in echo_main()
120 else if (*arg != 'E') { in echo_main()
125 } while (*++arg); in echo_main()
134 while ((arg = *pp) != NULL) { in echo_main()
135 buflen += strlen(arg) + 1; in echo_main()
[all …]
Dtr.c102 static unsigned expand(char *arg, char **buffer_p) in expand() argument
110 while (*arg) { in expand()
115 if (*arg == '\\') { in expand()
117 arg++; in expand()
118 z = arg; in expand()
120 arg = (char *)z; in expand()
121 arg--; in expand()
122 *arg = ac; in expand()
128 if (arg[1] == '-') { /* "0-9..." */ in expand()
129 ac = arg[2]; in expand()
[all …]
Dprintf.c80 typedef void FAST_FUNC (*converter)(const char *arg, void *result);
82 static int multiconvert(const char *arg, void *result, converter convert) in multiconvert() argument
84 if (*arg == '"' || *arg == '\'') { in multiconvert()
85 arg = utoa((unsigned char)arg[1]); in multiconvert()
88 convert(arg, result); in multiconvert()
90 bb_error_msg("invalid number '%s'", arg); in multiconvert()
96 static void FAST_FUNC conv_strtoull(const char *arg, void *result) in conv_strtoull() argument
102 if (arg[0] == '+') in conv_strtoull()
103 arg++; in conv_strtoull()
104 *(unsigned long long*)result = bb_strtoull(arg, NULL, 0); in conv_strtoull()
[all …]
Dchmod.c110 char *arg, **argp; in chmod_main() local
116 while ((arg = *++argp)) { in chmod_main()
119 if (arg[0] != '-') { in chmod_main()
120 arg = NULL; in chmod_main()
124 if (arg[1] && !strchr("-"OPT_STR, arg[1])) { in chmod_main()
125 arg[0] = 'a'; in chmod_main()
135 if (arg) arg[0] = '-'; in chmod_main()
/busybox-1.35.0/libbb/
Dbb_strtod.c15 double FAST_FUNC bb_strtod(const char *arg, char **endp)
21 if (arg[0] != '-' && arg[0] != '.' && NOT_DIGIT(arg[0]))
24 v = strtod(arg, &endptr);
47 char* FAST_FUNC bb_str_to_ts(struct timespec *ts, const char *arg)
50 ts->tv_sec = bb_strtou(arg, &arg, 10);
52 ts->tv_sec = bb_strtoul(arg, &arg, 10);
54 ts->tv_sec = bb_strtoull(arg, &arg, 10);
57 if (*arg != '.')
58 return arg;
62 return arg;
[all …]
Dbb_strtonum.c54 unsigned long long FAST_FUNC bb_strtoull(const char *arg, char **endp, int base) in bb_strtoull() argument
60 *endp = (char*) arg; in bb_strtoull()
64 if (!isalnum(arg[0])) return ret_ERANGE(); in bb_strtoull()
68 v = strtoull(arg, endp, base); in bb_strtoull()
72 long long FAST_FUNC bb_strtoll(const char *arg, char **endp, int base) in bb_strtoll() argument
79 *endp = (char*) arg; in bb_strtoll()
84 first = (arg[0] != '-' ? arg[0] : arg[1]); in bb_strtoll()
88 v = strtoll(arg, endp, base); in bb_strtoll()
93 unsigned long FAST_FUNC bb_strtoul(const char *arg, char **endp, int base) in bb_strtoul() argument
99 *endp = (char*) arg; in bb_strtoul()
[all …]
/busybox-1.35.0/util-linux/
Drenice.c53 char *arg; in renice_main() local
60 arg = *++argv; in renice_main()
63 if (arg && arg[0] == '-' && arg[1] == 'n') { in renice_main()
65 if (!arg[2]) in renice_main()
66 arg = *++argv; in renice_main()
68 arg += 2; in renice_main()
71 if (!arg) { /* No args? Then show usage. */ in renice_main()
76 adjustment = xatoi_range(arg, INT_MIN/2, INT_MAX/2); in renice_main()
78 while ((arg = *++argv) != NULL) { in renice_main()
80 if (arg[0] == '-' && arg[1]) { in renice_main()
[all …]
Dfatattr.c55 static unsigned decode_arg(const char *arg) in decode_arg() argument
58 while (*++arg) in decode_arg()
59 fl |= get_flag(*arg); in decode_arg()
71 char *arg = *++argv; in fatattr_main() local
73 if (!arg) in fatattr_main()
75 if (arg[0] != '-' && arg[0] != '+') in fatattr_main()
77 fl = decode_arg(arg); in fatattr_main()
78 if (arg[0] == '+') in fatattr_main()
Dmountpoint.c44 char *arg; in mountpoint_main() local
52 arg = argv[optind]; in mountpoint_main()
55 rc = (opt & OPT_x) ? stat(arg, &st) : lstat(arg, &st); in mountpoint_main()
74 char *p = xasprintf("%s/..", arg); in mountpoint_main()
83 const char *d = find_block_device(arg); in mountpoint_main()
91 printf("%s %s\n", d, arg); in mountpoint_main()
94 printf("%s is %sa mountpoint\n", arg, is_not_mnt ? "not " : ""); in mountpoint_main()
97 arg = p; in mountpoint_main()
103 bb_perror_msg(msg, arg); in mountpoint_main()
/busybox-1.35.0/scripts/
Decho.c110 const char *arg; in main() local
120 arg = *++argv; in main()
121 if (!arg) in main()
123 if (*arg != '-') in main()
130 p = arg + 1; in main()
140 p = arg + 1; in main()
155 fputs(arg, stdout); in main()
156 } else while ((c = *arg++)) { in main()
158 if (*arg == 'c') { in main()
166 if (*arg == '0') { in main()
[all …]
/busybox-1.35.0/networking/libiproute/
Dutils.c37 unsigned FAST_FUNC get_unsigned(char *arg, const char *errmsg) in get_unsigned() argument
42 if (*arg) { in get_unsigned()
43 res = strtoul(arg, &ptr, 0); in get_unsigned()
49 invarg_1_to_2(arg, errmsg); /* does not return */ in get_unsigned()
52 uint32_t FAST_FUNC get_u32(char *arg, const char *errmsg) in get_u32() argument
57 if (*arg) { in get_u32()
58 res = strtoul(arg, &ptr, 0); in get_u32()
64 invarg_1_to_2(arg, errmsg); /* does not return */ in get_u32()
67 uint16_t FAST_FUNC get_u16(char *arg, const char *errmsg) in get_u16() argument
72 if (*arg) { in get_u16()
[all …]
Dip_parse_common_args.c38 int arg; in ip_parse_common_args() local
53 arg = index_in_substrings(ip_common_commands, opt); in ip_parse_common_args()
54 if (arg < 0) in ip_parse_common_args()
56 if (arg == ARG_oneline) { in ip_parse_common_args()
61 if (arg == ARG_family) { in ip_parse_common_args()
67 arg = index_in_strings(families, *argv); in ip_parse_common_args()
68 if (arg < 0) in ip_parse_common_args()
72 arg -= ARG_IPv4; in ip_parse_common_args()
75 preferred_family = af_numbers[arg]; in ip_parse_common_args()
Dll_addr.c41 int FAST_FUNC ll_addr_a2n(unsigned char *lladdr, int len, char *arg) in ll_addr_a2n() argument
45 if (strchr(arg, '.')) { in ll_addr_a2n()
47 if (get_addr_1(&pfx, arg, AF_INET)) { in ll_addr_a2n()
48 bb_error_msg("\"%s\" is invalid lladdr", arg); in ll_addr_a2n()
60 char *cp = strchr(arg, ':'); in ll_addr_a2n()
65 if (sscanf(arg, "%x", &temp) != 1 || (temp < 0 || temp > 255)) { in ll_addr_a2n()
66 bb_error_msg("\"%s\" is invalid lladdr", arg); in ll_addr_a2n()
73 arg = cp; in ll_addr_a2n()
Drtm_map.c68 int FAST_FUNC rtnl_rtntype_a2n(int *id, char *arg) in rtnl_rtntype_a2n() argument
70 const smalluint key = index_in_substrings(keywords, arg) + 1; in rtnl_rtntype_a2n()
97 res = strtoul(arg, &end, 0); in rtnl_rtntype_a2n()
98 if (end == arg || *end || res > 255) in rtnl_rtntype_a2n()
105 int FAST_FUNC get_rt_realms(uint32_t *realms, char *arg) in get_rt_realms() argument
108 char *p = strchr(arg, '/'); in get_rt_realms()
113 if (rtnl_rtrealm_a2n(realms, arg)) { in get_rt_realms()
119 arg = p+1; in get_rt_realms()
121 if (*arg && rtnl_rtrealm_a2n(&realm, arg)) in get_rt_realms()
Drt_names.h12 extern int rtnl_rtprot_a2n(uint32_t *id, char *arg) FAST_FUNC;
13 extern int rtnl_rtscope_a2n(uint32_t *id, char *arg) FAST_FUNC;
14 extern int rtnl_rtrealm_a2n(uint32_t *id, char *arg) FAST_FUNC;
15 extern int rtnl_dsfield_a2n(uint32_t *id, char *arg) FAST_FUNC;
16 extern int rtnl_rttable_a2n(uint32_t *id, char *arg) FAST_FUNC;
22 extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg) FAST_FUNC;
Drt_names.c48 static int rtnl_a2n(rtnl_tab_t *tab, uint32_t *id, const char *arg, int base) in rtnl_a2n() argument
52 if (tab->cached_str && strcmp(tab->cached_str, arg) == 0) { in rtnl_a2n()
59 && strcmp(tab->tab[i], arg) == 0 in rtnl_a2n()
68 i = bb_strtou(arg, NULL, base); in rtnl_a2n()
118 int FAST_FUNC rtnl_rtprot_a2n(uint32_t *id, char *arg) in rtnl_rtprot_a2n() argument
121 return rtnl_a2n(rtnl_rtprot_tab, id, arg, 0); in rtnl_rtprot_a2n()
153 int FAST_FUNC rtnl_rtscope_a2n(uint32_t *id, char *arg) in rtnl_rtscope_a2n() argument
156 return rtnl_a2n(rtnl_rtscope_tab, id, arg, 0); in rtnl_rtscope_a2n()
170 int FAST_FUNC rtnl_rtrealm_a2n(uint32_t *id, char *arg) in rtnl_rtrealm_a2n() argument
173 return rtnl_a2n(rtnl_rtrealm_tab, id, arg, 0); in rtnl_rtrealm_a2n()
[all …]
/busybox-1.35.0/e2fsprogs/
Dchattr.c83 const char *arg = *argv; in decode_arg() local
84 char opt = *arg; in decode_arg()
98 while (*++arg) { in decode_arg()
105 if (*arg == 'R') { in decode_arg()
109 if (*arg == 'V') { in decode_arg()
113 if (*arg == 'f') { in decode_arg()
117 if (*arg == 'v') { in decode_arg()
124 if (*arg == 'p') { in decode_arg()
134 *fl |= get_flag(*arg); /* aborts on bad flag letter */ in decode_arg()
238 char *arg = *++argv; in chattr_main() local
[all …]
/busybox-1.35.0/console-tools/
Dsetlogcons.c47 } arg = { in setlogcons_main() local
53 arg.subarg = xatou_range(argv[1], 0, 63); in setlogcons_main()
61 devname = xasprintf("/dev/tty%u", arg.subarg); in setlogcons_main()
62 xioctl(xopen(devname, O_RDONLY), TIOCLINUX, &arg); in setlogcons_main()
/busybox-1.35.0/include/
Dxatonum.h127 unsigned long long bb_strtoull(const char *arg, char **endp, int base) FAST_FUNC;
128 long long bb_strtoll(const char *arg, char **endp, int base) FAST_FUNC;
132 unsigned long bb_strtoul(const char *arg, char **endp, int base) in bb_strtoul() argument
133 { return bb_strtoull(arg, endp, base); } in bb_strtoul()
135 long bb_strtol(const char *arg, char **endp, int base) in bb_strtol() argument
136 { return bb_strtoll(arg, endp, base); } in bb_strtol()
138 unsigned long bb_strtoul(const char *arg, char **endp, int base) FAST_FUNC;
139 long bb_strtol(const char *arg, char **endp, int base) FAST_FUNC;
144 unsigned bb_strtou(const char *arg, char **endp, int base) in bb_strtou() argument
145 { return bb_strtoull(arg, endp, base); } in bb_strtou()
[all …]
/busybox-1.35.0/shell/ash_test/ash-misc/
Dempty_args.right1 Null 0th arg:
4 Null 1st arg:
6 Null arg in exec:
Dempty_args.tests1 echo Null 0th arg:
4 echo Null 1st arg:
8 echo Null arg in exec:
/busybox-1.35.0/shell/hush_test/hush-misc/
Dempty_args.right1 Null 0th arg:
4 Null 1st arg:
6 Null arg in exec:
Dempty_args.tests1 echo Null 0th arg:
4 echo Null 1st arg:
8 echo Null arg in exec:

1234