560 |
return; |
return; |
561 |
} |
} |
562 |
|
|
563 |
pupa_dl_unref (mod); |
if (! pupa_dl_unref (mod)) |
564 |
|
pupa_dl_unload (mod); |
565 |
} |
} |
566 |
|
|
567 |
/* lsmod */ |
/* lsmod */ |
591 |
pupa_dl_iterate (print_module); |
pupa_dl_iterate (print_module); |
592 |
} |
} |
593 |
|
|
594 |
|
static void |
595 |
|
attempt_normal_mode (void) |
596 |
|
{ |
597 |
|
pupa_rescue_command_t cmd; |
598 |
|
|
599 |
|
for (cmd = pupa_rescue_command_list; cmd; cmd = cmd->next) |
600 |
|
{ |
601 |
|
if (pupa_strcmp ("normal", cmd->name) == 0) |
602 |
|
{ |
603 |
|
(cmd->func) (0, 0); |
604 |
|
break; |
605 |
|
} |
606 |
|
} |
607 |
|
} |
608 |
|
|
609 |
/* Enter the rescue mode. */ |
/* Enter the rescue mode. */ |
610 |
void |
void |
611 |
pupa_enter_rescue_mode (void) |
pupa_enter_rescue_mode (void) |
612 |
{ |
{ |
613 |
|
/* First of all, attempt to execute the normal mode. */ |
614 |
|
attempt_normal_mode (); |
615 |
|
|
616 |
|
pupa_printf ("Entering into rescue mode...\n"); |
617 |
|
|
618 |
pupa_rescue_register_command ("boot", pupa_rescue_cmd_boot, |
pupa_rescue_register_command ("boot", pupa_rescue_cmd_boot, |
619 |
"boot an operating system"); |
"boot an operating system"); |
620 |
pupa_rescue_register_command ("cat", pupa_rescue_cmd_cat, |
pupa_rescue_register_command ("cat", pupa_rescue_cmd_cat, |