2003-11-17 Marco Gerards <metgerards@student.han.nl>
* conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu. (pupa_setup_SOURCES): Added util/i386/pc/getroot.c. (pupa_emu_SOURCES): New variable. (pupa_emu_LDFLAGS): Likewise. * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype. (pupa_ext2_fini) [PUPA_UTIL]: Likewise. * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise. (pupa_normal_fini) [PUPA_UTIL]: Likewise. * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>. (pupa_jmp_buf): New typedef. (pupa_setjmp) [PUPA_UTIL]: New macro. (pupa_longjmp) [PUPA_UTIL]: Likewise. * include/pupa/term.h (struct pupa_term): New member `refresh'. (pupa_refresh): New prototype. * include/pupa/util/getroot.h: New file. * kern/misc.c (pupa_vsprintf): Refresh the screen after updating it. * kern/rescue.c (pupa_rescue_get_command_line): Likewise. (pupa_rescue_cmd_cat): Likewise. (pupa_rescue_cmd_ls): Likewise. (pupa_rescue_cmd_testload): Likewise. (pupa_rescue_cmd_lsmod): Likewise. * normal/cmdline.c (pupa_cmdline_get): Likewise. * normal/menu.c (run_menu): Likewise. * kern/term.c (pupa_cls): Likewise. (pupa_refresh): New function. * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function. (pupa_normal_fini) [PUPA_UTIL]: Likewise. * util/console.c: New file. * util/i386/pc/getroot.c: New file. * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>. (pupa_putchar): New function. (pupa_refresh): Likewise. (xgetcwd): Function moved to ... (strip_extra_slashes): Likewise. (get_prefix): Likewise. * util/i386/pc/getroot.c: ... here. (find_root_device): Function moved and renamed to... * util/i386/pc/getroot.c (pupa_find_root_device): ... here. Changed all callers. * util/i386/pc/pupa-setup.c (guess_root_device): Function moved and renamed to... * util/i386/pc/getroot.c (pupa_guess_root_device): ... here. Changed all callers. * util/misc.c (pupa_memalign): New function. (pupa_mm_init_region): Likewise. (pupa_register_exported_symbols): Likewise. (pupa_putchar): Function removed. * util/pupa-emu.c: New file.
This commit is contained in:
parent
9a5c1adeaa
commit
1f7315a3de
19 changed files with 1027 additions and 233 deletions
|
@ -109,9 +109,11 @@ pupa_rescue_get_command_line (const char *prompt)
|
|||
pupa_putchar (c);
|
||||
}
|
||||
}
|
||||
pupa_refresh ();
|
||||
}
|
||||
|
||||
pupa_putchar ('\n');
|
||||
pupa_refresh ();
|
||||
}
|
||||
|
||||
/* Get the next word in STR and return a next pointer. */
|
||||
|
@ -183,6 +185,7 @@ pupa_rescue_cmd_cat (int argc, char *argv[])
|
|||
}
|
||||
|
||||
pupa_putchar ('\n');
|
||||
pupa_refresh ();
|
||||
pupa_file_close (file);
|
||||
}
|
||||
|
||||
|
@ -240,6 +243,7 @@ pupa_rescue_cmd_ls (int argc, char *argv[])
|
|||
{
|
||||
pupa_disk_dev_iterate (pupa_rescue_print_disks);
|
||||
pupa_putchar ('\n');
|
||||
pupa_refresh ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -274,6 +278,7 @@ pupa_rescue_cmd_ls (int argc, char *argv[])
|
|||
{
|
||||
(fs->dir) (dev, path, pupa_rescue_print_files);
|
||||
pupa_putchar ('\n');
|
||||
pupa_refresh ();
|
||||
}
|
||||
|
||||
fail:
|
||||
|
@ -383,6 +388,7 @@ pupa_rescue_cmd_testload (int argc, char *argv[])
|
|||
unsigned len __attribute__ ((unused)))
|
||||
{
|
||||
pupa_putchar ('.');
|
||||
pupa_refresh ();
|
||||
}
|
||||
|
||||
if (argc < 1)
|
||||
|
@ -457,7 +463,10 @@ pupa_rescue_cmd_testload (int argc, char *argv[])
|
|||
|
||||
for (i = 0; i < PUPA_DISK_SECTOR_SIZE; i++)
|
||||
pupa_putchar (buf[pos + i]);
|
||||
|
||||
|
||||
if (i)
|
||||
pupa_refresh ();
|
||||
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
@ -584,6 +593,8 @@ pupa_rescue_cmd_lsmod (int argc __attribute__ ((unused)),
|
|||
pupa_printf ("%s", dep->mod->name);
|
||||
}
|
||||
pupa_putchar ('\n');
|
||||
pupa_refresh ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue