Lines Matching refs:kernel
48 __export uint32_t parse_image_type(const char *kernel) in parse_image_type() argument
55 p = find_command(kernel); in parse_image_type()
56 len = p - kernel; in parse_image_type()
61 if (!strncmp(kernel + len - elen, ext->name, elen)) in parse_image_type()
72 static const char *get_extension(const char *kernel) in get_extension() argument
79 p = find_command(kernel); in get_extension()
80 len = p - kernel; in get_extension()
89 strncpy(str, kernel, len); in get_extension()
104 const char *apply_extension(const char *kernel, const char *ext) in apply_extension() argument
108 int len = strlen(kernel); in apply_extension()
115 p = find_command(kernel); in apply_extension()
117 len = p - kernel; in apply_extension()
120 memcpy(k, kernel, len); in apply_extension()
147 const char *kernel; in load_kernel() local
150 kernel = strdup(command_line); in load_kernel()
151 if (!kernel) in load_kernel()
155 me = find_label(kernel); in load_kernel()
162 args = find_command(kernel); in load_kernel()
189 char *p = (char *)find_command(kernel); in load_kernel()
193 type = parse_image_type(kernel); in load_kernel()
201 ext = get_extension(kernel); in load_kernel()
205 k = apply_extension(kernel, ext); in load_kernel()
209 free((void *)kernel); in load_kernel()
210 kernel = k; in load_kernel()
212 type = parse_image_type(kernel); in load_kernel()
216 execute(kernel, type, true); in load_kernel()
217 free((void *)kernel); in load_kernel()