36 lines
610 B
C
36 lines
610 B
C
#include "vxBoot/loader.h"
|
|
|
|
|
|
/* kernel image list */
|
|
struct ldimg *kernel_img_list = NULL;
|
|
|
|
|
|
/* loader_kernel_img_get() : get the image ID information */
|
|
struct ldimg *loader_kernel_img_get(int id)
|
|
{
|
|
struct ldimg *img;
|
|
|
|
img = kernel_img_list;
|
|
while (--id >= 0) {
|
|
if (img == NULL)
|
|
return NULL;
|
|
img = img->next;
|
|
}
|
|
return img;
|
|
}
|
|
|
|
/* loader_kernel_img_count() : count the number of kernel image found */
|
|
int loader_kernel_img_count(void)
|
|
{
|
|
struct ldimg *img;
|
|
int counter;
|
|
|
|
counter = 0;
|
|
img = kernel_img_list;
|
|
while (img != NULL) {
|
|
counter = counter + 1;
|
|
img = img->next;
|
|
}
|
|
return counter;
|
|
}
|