Lines Matching defs:bm
234 boot_module_t *bm, *bmp;
241 for (bm = boot_modules; bm != NULL; bm = bm->bm_next)
242 if (bm->bm_type == type && strcmp(bm->bm_path, name) == 0)
245 bm = alloc(sizeof(boot_module_t));
248 if (bm == NULL || str == NULL) {
253 bm->bm_path = str;
254 bm->bm_next = NULL;
255 bm->bm_type = type;
257 boot_modules = bm;
262 bmp->bm_next = bm;
567 module_path(boot_module_t *bm, const char *kdev, const char *base_path)
573 name = bm->bm_path;
606 module_open(boot_module_t *bm, int mode, const char *kdev,
613 path = module_path(bm, kdev, base_path);
620 fd = open(bm->bm_path, mode);
622 printf("Loading %s ", bm->bm_path);
625 printf("WARNING: couldn't open %s", bm->bm_path);
626 if (strcmp(bm->bm_path, path) != 0)
680 boot_module_t *bm;
690 for (bm = boot_modules; bm; bm = bm->bm_next) {
691 fd = module_open(bm, 0, kdev, module_base, false);
693 bm->bm_len = -1;
699 printf("WARNING: couldn't stat %s\n", bm->bm_path);
701 bm->bm_len = -1;
705 bm->bm_len = st.st_size;
725 for (bm = boot_modules; bm; bm = bm->bm_next) {
726 if (bm->bm_len == -1)
728 fd = module_open(bm, 0, kdev, module_base, true);
733 if (len < bm->bm_len) {
735 printf("Loading %s ", bm->bm_path);
741 strncpy(bi->path, bm->bm_path, sizeof(bi->path) - 1);
744 switch (bm->bm_type) {