Below is the code of main() of grub. Here I want to know about this line:
file = fopen(arg_v[1], "rb");
Here which file fopen is opening? What file this arg v[1] is pointing to?
int main(unsigned arg_c, char *arg_v[])
{
FILE *file;
if(arg_c < 2)
{
printf("Checks if file is Multiboot compatible\n");
return 1;
}
file = fopen(arg_v[1], "rb");
if(file == NULL)
{
printf("Can't open file '%s'\n", arg_v[1]);
return 2;
}
check_multiboot(arg_v[1], file);
fclose(file);
return 0;
}