2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/pupa-setup.c (setup): Convert the endianness of the length of a blocklist correctly. * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]: Use ioctl only if the OS file is a block device. (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is not very useful for normal files. * kern/main.c (pupa_set_root_dev): New function. (pupa_load_normal_mode): Likewise. (pupa_main): Call those above. * include/pupa/types.h (pupa_swap_bytes16): Cast the result to pupa_uint16_t. * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
This commit is contained in:
parent
a5ffe96617
commit
a13f92373c
6 changed files with 95 additions and 17 deletions
|
@ -129,7 +129,7 @@ setup (const char *prefix, const char *dir,
|
|||
if (block != first_block
|
||||
&& (pupa_le_to_cpu32 (prev->start)
|
||||
+ pupa_le_to_cpu16 (prev->len)) == sector)
|
||||
prev->len = pupa_le_to_cpu16 (prev->len) + 1;
|
||||
prev->len = pupa_cpu_to_le16 (pupa_le_to_cpu16 (prev->len) + 1);
|
||||
else
|
||||
{
|
||||
block->start = pupa_cpu_to_le32 (sector);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue