Lines Matching refs:buf
475 free(bflow->buf); in bootflow_free()
698 static int copy_in(char *buf, char *end, const char *arg, int len, in copy_in() argument
701 char *to = buf; in copy_in()
727 return to - buf; in copy_in()
730 int cmdline_set_arg(char *buf, int maxlen, const char *cmdline, in cmdline_set_arg() argument
747 for (to = buf, end = buf + maxlen; *from;) { in cmdline_set_arg()
800 if (to != buf) { in cmdline_set_arg()
809 if (!buf) { in cmdline_set_arg()
826 if (to != buf) in cmdline_set_arg()
852 if (!new_val || !buf) in cmdline_set_arg()
858 if (to != buf && to[-1] != ' ') in cmdline_set_arg()
861 log_debug("ret=%d, to: %s buf: %s\n", ret, to, buf); in cmdline_set_arg()
868 if (to > buf && to[-1] == ' ') in cmdline_set_arg()
875 return to - buf; in cmdline_set_arg()
881 char buf[2048]; in bootflow_cmdline_set_arg() local
885 ret = cmdline_set_arg(buf, sizeof(buf), bflow->cmdline, set_arg, in bootflow_cmdline_set_arg()
890 ret = bootflow_cmdline_set(bflow, buf); in bootflow_cmdline_set_arg()
891 if (*buf) { in bootflow_cmdline_set_arg()
892 cmd = strdup(buf); in bootflow_cmdline_set_arg()
934 char buf[50]; in bootflow_cmdline_auto() local
941 *buf = '\0'; in bootflow_cmdline_auto()
943 snprintf(buf, sizeof(buf), in bootflow_cmdline_auto()
948 snprintf(buf, sizeof(buf), in bootflow_cmdline_auto()
952 snprintf(buf, sizeof(buf), in bootflow_cmdline_auto()
956 if (!*buf) { in bootflow_cmdline_auto()
961 ret = bootflow_cmdline_set_arg(bflow, arg, buf, true); in bootflow_cmdline_auto()