Lines Matching refs:bootmodules
145 * \brief Parses bootmodules and stores info in
148 static errval_t parse_modules(char* bootmodules)
150 assert(bootmodules != NULL);
153 char* bm = strdup(bootmodules);
176 * \brief Open bootmodules file and read it in
182 // open bootmodules file and read it in
184 err = vfs_open("/bootmodules", &vh);
186 USER_PANIC_ERR(err, "unable to open /bootmodules");
192 USER_PANIC_ERR(err, "unable to stat /bootmodules");
195 char *bootmodules = malloc(info.size + 1);
196 if (bootmodules == NULL) {
198 "failed to allocate memory for bootmodules");
201 err = vfs_read(vh, bootmodules, info.size, &bootmodules_len);
203 USER_PANIC_ERR(err, "unable to read /bootmodules");
205 USER_PANIC_ERR(err, "/bootmodules is empty");
207 USER_PANIC_ERR(err, "unexpected short read of /bootmodules");
216 bootmodules[bootmodules_len] = '\0';
217 return bootmodules;
246 char* bootmodules = get_bootmodules();
247 errval_t err = parse_modules(bootmodules);
248 free(bootmodules);