Implement grub_file tool and use it to implement generating of config
in separate root.
This commit is contained in:
parent
296f76068d
commit
ec824e0f2a
26 changed files with 1113 additions and 122 deletions
|
@ -74,15 +74,15 @@ static grub_ssize_t
|
|||
read_vli (grub_file_t file, grub_uint64_t *num)
|
||||
{
|
||||
grub_uint8_t buf[VLI_MAX_DIGITS];
|
||||
grub_ssize_t read;
|
||||
grub_ssize_t read_bytes;
|
||||
grub_size_t dec;
|
||||
|
||||
read = grub_file_read (file, buf, VLI_MAX_DIGITS);
|
||||
if (read < 0)
|
||||
read_bytes = grub_file_read (file, buf, VLI_MAX_DIGITS);
|
||||
if (read_bytes < 0)
|
||||
return -1;
|
||||
|
||||
dec = decode_vli (buf, read, num);
|
||||
grub_file_seek (file, file->offset - (read - dec));
|
||||
dec = decode_vli (buf, read_bytes, num);
|
||||
grub_file_seek (file, file->offset - (read_bytes - dec));
|
||||
return dec;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue