Lines Matching refs:arg
328 str2u32(char *arg, uint32_t *val)
334 t = strtoul(arg, &err, 0);
335 if (errno || (err==arg) || ((err != NULL) && *err)) {
345 str2u16(char *arg, uint16_t *val)
351 t = strtoul(arg, &err, 0);
352 if (errno || (err==arg) || ((err != NULL) && *err) || (t >= 0x10000)) {
361 str2u8(char *arg, uint8_t *val)
367 t = strtoul(arg, &err, 0);
368 if (errno || (err==arg) || ((err != NULL) && *err) || (t >= 0x100)) {
377 parse_arg(char *arg, char *buf, char *argv[])
387 if ((arg == NULL)) {
392 argl = strlen(arg);
403 memcpy(buf, arg, argl);
425 required_arg(char c, char *arg)
427 if (arg == NULL || *arg != '-')
436 is_empty_arg(char *arg)
439 if (arg != NULL) {
440 if (*arg) ret = 0;
800 parse_opt_board(char ch, char *arg)
803 DBG(1,"parsing board option: -%c %s", ch, arg);
810 if (required_arg(ch, arg))
813 board = find_board(arg);
815 ERR("invalid/unknown board specified: %s", arg);
838 parse_opt_image(char ch, char *arg)
867 argc = parse_arg(arg, buf, argv);