Split out blocklist retrieving from setup.c to
grub-core/osdep/blocklist.c and add windows implementation since generic version doesn't work on NTFS on Windows due to aggressive unflushable cache.
This commit is contained in:
parent
c06c75201c
commit
5a869940de
13 changed files with 602 additions and 288 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <grub/fshelp.h>
|
||||
#include <grub/charset.h>
|
||||
#include <grub/datetime.h>
|
||||
#include <grub/udf.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -800,6 +801,24 @@ fail:
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
grub_disk_addr_t
|
||||
grub_udf_get_cluster_sector (grub_disk_t disk, grub_uint64_t *sec_per_lcn)
|
||||
{
|
||||
grub_disk_addr_t ret;
|
||||
static struct grub_udf_data *data;
|
||||
|
||||
data = grub_udf_mount (disk);
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
ret = U32 (data->pds[data->pms[0]->type1.part_num].start);
|
||||
*sec_per_lcn = 1ULL << data->lbshift;
|
||||
grub_free (data);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char *
|
||||
read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue