refactor: rename vlnk to hlnk in GRUB2 reference sources
Apply vlnk→hlnk, VLNK→HLNK, Vlnk→Hlnk rename to all 7 reference header and source files. These are the project-side copies used for cross-referencing — the build applies the same transformation to the vendored tarball at compile time.
This commit is contained in:
@@ -123,8 +123,8 @@ typedef struct hiperiso_os_param
|
||||
* hiso_reserved[3]: hiso_iso_format 0:iso9660 1:udf
|
||||
* hiso_reserved[4]: hiso_windows_cd_prompt
|
||||
* hiso_reserved[5]: hiso_linux_remount
|
||||
* hiso_reserved[6]: hiso_vlnk
|
||||
* hiso_reserved[7~10]: hiso_disk_sig[4] used for vlnk
|
||||
* hiso_reserved[6]: hiso_hlnk
|
||||
* hiso_reserved[7~10]: hiso_disk_sig[4] used for hlnk
|
||||
* hiso_reserved[11]: hiso_win_uefi_max_res
|
||||
*
|
||||
*/
|
||||
@@ -164,7 +164,7 @@ typedef struct hiperiso_secure_data
|
||||
}hiperiso_secure_data;
|
||||
|
||||
|
||||
typedef struct hiperiso_vlnk
|
||||
typedef struct hiperiso_hlnk
|
||||
{
|
||||
hiperiso_guid guid; // HIPERISO_GUID
|
||||
grub_uint32_t crc32; // crc32
|
||||
@@ -172,14 +172,14 @@ typedef struct hiperiso_vlnk
|
||||
grub_uint64_t part_offset; // in bytes
|
||||
char filepath[384];
|
||||
grub_uint8_t reserved[96];
|
||||
}hiperiso_vlnk;
|
||||
}hiperiso_hlnk;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
// compile assert check : sizeof(hiperiso_os_param) must be 512
|
||||
COMPILE_ASSERT(1,sizeof(hiperiso_os_param) == 512);
|
||||
COMPILE_ASSERT(2,sizeof(hiperiso_secure_data) == 4096);
|
||||
COMPILE_ASSERT(3,sizeof(hiperiso_vlnk) == 512);
|
||||
COMPILE_ASSERT(3,sizeof(hiperiso_hlnk) == 512);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ static int hiperiso_browser_iterate_dir(const char *filename, const struct grub_
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (grub_file_is_vlnk_suffix(filename, len))
|
||||
if (grub_file_is_hlnk_suffix(filename, len))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -433,9 +433,9 @@ static int hiperiso_browser_iterate_dir(const char *filename, const struct grub_
|
||||
{
|
||||
grub_snprintf(node->menuentry, sizeof(node->menuentry),
|
||||
"menuentry \"%-10s %s\" --class=%s {\n"
|
||||
" vt_set_fake_vlnk \"(%s)%s/%s\" %s %llu\n"
|
||||
" vt_set_fake_hlnk \"(%s)%s/%s\" %s %llu\n"
|
||||
" %s_common_menuentry\n"
|
||||
" vt_reset_fake_vlnk\n"
|
||||
" vt_reset_fake_hlnk\n"
|
||||
"}\n",
|
||||
grub_get_human_size(fsize, GRUB_HUMAN_SIZE_SHORT), filename, g_menu_class[type],
|
||||
g_menu_device, g_menu_path_buf, filename, g_menu_prefix[type], (ulonglong)fsize,
|
||||
@@ -445,9 +445,9 @@ static int hiperiso_browser_iterate_dir(const char *filename, const struct grub_
|
||||
{
|
||||
grub_snprintf(node->menuentry, sizeof(node->menuentry),
|
||||
"menuentry \"%s\" --class=%s {\n"
|
||||
" vt_set_fake_vlnk \"(%s)%s/%s\" %s %llu\n"
|
||||
" vt_set_fake_hlnk \"(%s)%s/%s\" %s %llu\n"
|
||||
" %s_common_menuentry\n"
|
||||
" vt_reset_fake_vlnk\n"
|
||||
" vt_reset_fake_hlnk\n"
|
||||
"}\n",
|
||||
filename, g_menu_class[type],
|
||||
g_menu_device, g_menu_path_buf, filename, g_menu_prefix[type], (ulonglong)fsize,
|
||||
|
||||
@@ -911,7 +911,7 @@ typedef struct hiperiso_video_mode
|
||||
typedef struct file_fullpath
|
||||
{
|
||||
char path[256];
|
||||
int vlnk_add;
|
||||
int hlnk_add;
|
||||
}file_fullpath;
|
||||
|
||||
typedef struct theme_list
|
||||
@@ -1185,7 +1185,7 @@ grub_err_t hiperiso_cmd_sel_winpe_wim(grub_extcmd_context_t ctxt, int argc, char
|
||||
grub_err_t hiperiso_cmd_unix_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
int hiperiso_get_disk_guid(const char *filename, grub_uint8_t *guid, grub_uint8_t *signature);
|
||||
grub_err_t hiperiso_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t hiperiso_cmd_unix_check_vlnk(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t hiperiso_cmd_unix_check_hlnk(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t hiperiso_cmd_unix_replace_conf(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t hiperiso_cmd_unix_replace_grub_conf(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t hiperiso_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
@@ -1252,7 +1252,7 @@ struct g_hiperiso_map{
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
typedef struct hiperiso_vlnk_part
|
||||
typedef struct hiperiso_hlnk_part
|
||||
{
|
||||
grub_uint32_t disksig;
|
||||
grub_uint64_t partoffset;
|
||||
@@ -1261,8 +1261,8 @@ typedef struct hiperiso_vlnk_part
|
||||
grub_device_t dev;
|
||||
grub_fs_t fs;
|
||||
int probe;
|
||||
struct hiperiso_vlnk_part *next;
|
||||
}hiperiso_vlnk_part;
|
||||
struct hiperiso_hlnk_part *next;
|
||||
}hiperiso_hlnk_part;
|
||||
|
||||
|
||||
typedef struct browser_mbuf
|
||||
@@ -1324,7 +1324,7 @@ extern int g_filt_trash_dir;
|
||||
extern int g_hiso_file_flt[HISO_FILE_FLT_BUTT];
|
||||
extern const char *g_menu_class[img_type_max];
|
||||
extern char g_iso_path[256];
|
||||
int hiperiso_add_vlnk_file(char *dir, const char *name);
|
||||
int hiperiso_add_hlnk_file(char *dir, const char *name);
|
||||
grub_err_t hiperiso_cmd_browser_dir(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t hiperiso_cmd_browser_disk(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
int hiperiso_get_fs_type(const char *fs);
|
||||
|
||||
@@ -2735,13 +2735,13 @@ int hiperiso_plugin_get_persistent_chunklist(const char *isopath, int index, hip
|
||||
|
||||
path = node->backendpath[index].path;
|
||||
|
||||
if (node->backendpath[index].vlnk_add == 0)
|
||||
if (node->backendpath[index].hlnk_add == 0)
|
||||
{
|
||||
len = grub_strlen(path);
|
||||
if (len > 9 && grub_strncmp(path + len - 9, ".vlnk.dat", 9) == 0)
|
||||
if (len > 9 && grub_strncmp(path + len - 9, ".hlnk.dat", 9) == 0)
|
||||
{
|
||||
hiperiso_add_vlnk_file(NULL, path);
|
||||
node->backendpath[index].vlnk_add = 1;
|
||||
hiperiso_add_hlnk_file(NULL, path);
|
||||
node->backendpath[index].hlnk_add = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ int g_mod_new_len = 0;
|
||||
char *g_mod_new_data = NULL;
|
||||
|
||||
int g_mod_search_magic = 0;
|
||||
int g_unix_vlnk_boot = 0;
|
||||
int g_unix_hlnk_boot = 0;
|
||||
|
||||
int g_ko_fillmap_len = 0;
|
||||
char *g_ko_fillmap_data = NULL;
|
||||
@@ -302,9 +302,9 @@ static int hiperiso_freebsd_append_conf(char *buf, const char *isopath, const ch
|
||||
hiso_ssprintf(buf, pos, "hint.hiperiso.0.alias=\"%s\"\n", alias);
|
||||
}
|
||||
|
||||
if (g_unix_vlnk_boot)
|
||||
if (g_unix_hlnk_boot)
|
||||
{
|
||||
hiso_ssprintf(buf, pos, "hint.hiperiso.0.vlnk=%d\n", 1);
|
||||
hiso_ssprintf(buf, pos, "hint.hiperiso.0.hlnk=%d\n", 1);
|
||||
}
|
||||
|
||||
val = hiperiso_get_env("HISO_UNIX_REMOUNT");
|
||||
@@ -369,7 +369,7 @@ grub_err_t hiperiso_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
g_unix_vlnk_boot = 0;
|
||||
g_unix_hlnk_boot = 0;
|
||||
g_mod_search_magic = 0;
|
||||
g_conf_new_len = 0;
|
||||
g_mod_new_len = 0;
|
||||
@@ -384,7 +384,7 @@ grub_err_t hiperiso_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **
|
||||
HIPERISO_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
grub_err_t hiperiso_cmd_unix_check_vlnk(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
grub_err_t hiperiso_cmd_unix_check_hlnk(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
grub_file_t file;
|
||||
|
||||
@@ -398,7 +398,7 @@ grub_err_t hiperiso_cmd_unix_check_vlnk(grub_extcmd_context_t ctxt, int argc, ch
|
||||
file = grub_file_open(args[0], HIPERISO_FILE_TYPE);
|
||||
if (file)
|
||||
{
|
||||
g_unix_vlnk_boot = file->vlnk;
|
||||
g_unix_hlnk_boot = file->hlnk;
|
||||
grub_file_close(file);
|
||||
}
|
||||
|
||||
@@ -773,9 +773,9 @@ grub_err_t hiperiso_cmd_unix_replace_grub_conf(grub_extcmd_context_t ctxt, int a
|
||||
hiso_ssprintf(extcfg, len, ";kfreebsd_module_elf %s", args[0]);
|
||||
}
|
||||
|
||||
if (g_unix_vlnk_boot)
|
||||
if (g_unix_hlnk_boot)
|
||||
{
|
||||
hiso_ssprintf(extcfg, len, ";set kFreeBSD.hint.hiperiso.0.vlnk=%d", 1);
|
||||
hiso_ssprintf(extcfg, len, ";set kFreeBSD.hint.hiperiso.0.hlnk=%d", 1);
|
||||
}
|
||||
|
||||
val = hiperiso_get_env("HISO_UNIX_REMOUNT");
|
||||
|
||||
@@ -689,7 +689,7 @@ grub_err_t hiperiso_cmd_raw_chain_data(grub_extcmd_context_t ctxt, int argc, cha
|
||||
|
||||
if (grub_strncmp(args[0], g_iso_path, grub_strlen(g_iso_path)))
|
||||
{
|
||||
file->vlnk = 1;
|
||||
file->hlnk = 1;
|
||||
}
|
||||
|
||||
img_chunk_size = g_img_chunk_list.cur_chunk * sizeof(hiperiso_img_chunk);
|
||||
|
||||
@@ -1804,12 +1804,12 @@ static void hiperiso_windows_fill_virt_data( grub_uint64_t isosize, hiperiso_
|
||||
return;
|
||||
}
|
||||
|
||||
static int hiperiso_windows_drive_map(hiperiso_chain_head *chain, int vlnk)
|
||||
static int hiperiso_windows_drive_map(hiperiso_chain_head *chain, int hlnk)
|
||||
{
|
||||
int hd1 = 0;
|
||||
grub_disk_t disk;
|
||||
|
||||
debug("drive map begin <%p> <%d> ...\n", chain, vlnk);
|
||||
debug("drive map begin <%p> <%d> ...\n", chain, hlnk);
|
||||
|
||||
disk = grub_disk_open("hd1");
|
||||
if (disk)
|
||||
@@ -1823,11 +1823,11 @@ static int hiperiso_windows_drive_map(hiperiso_chain_head *chain, int vlnk)
|
||||
debug("failed to open disk %s\n", "hd1");
|
||||
}
|
||||
|
||||
if (vlnk)
|
||||
if (hlnk)
|
||||
{
|
||||
if (g_hiperiso_disk_bios_id == 0x80 && hd1)
|
||||
{
|
||||
debug("drive map needed vlnk %p\n", disk);
|
||||
debug("drive map needed hlnk %p\n", disk);
|
||||
chain->drive_map = 0x81;
|
||||
}
|
||||
}
|
||||
@@ -2269,7 +2269,7 @@ grub_err_t hiperiso_cmd_windows_chain_data(grub_extcmd_context_t ctxt, int argc,
|
||||
|
||||
if (hiperiso_is_efi_os() == 0)
|
||||
{
|
||||
hiperiso_windows_drive_map(chain, file->vlnk);
|
||||
hiperiso_windows_drive_map(chain, file->hlnk);
|
||||
}
|
||||
|
||||
HIPERISO_CMD_RETURN(GRUB_ERR_NONE);
|
||||
@@ -2415,7 +2415,7 @@ grub_err_t hiperiso_cmd_wim_check_bootable(grub_extcmd_context_t ctxt, int argc,
|
||||
HIPERISO_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
static grub_err_t hiperiso_vlnk_wim_chain_data(grub_file_t wimfile)
|
||||
static grub_err_t hiperiso_hlnk_wim_chain_data(grub_file_t wimfile)
|
||||
{
|
||||
grub_uint32_t i = 0;
|
||||
grub_uint32_t imgoffset = 0;
|
||||
@@ -2435,7 +2435,7 @@ static grub_err_t hiperiso_vlnk_wim_chain_data(grub_file_t wimfile)
|
||||
hiperiso_override_chunk *override;
|
||||
hiperiso_img_chunk_list wimchunk;
|
||||
|
||||
debug("vlnk wim chain data begin <%s> ...\n", wimfile->name);
|
||||
debug("hlnk wim chain data begin <%s> ...\n", wimfile->name);
|
||||
|
||||
if (NULL == g_wimiso_chunk_list.chunk || NULL == g_wimiso_path)
|
||||
{
|
||||
@@ -2740,9 +2740,9 @@ grub_err_t hiperiso_cmd_wim_chain_data(grub_extcmd_context_t ctxt, int argc, cha
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (wimfile->vlnk)
|
||||
if (wimfile->hlnk)
|
||||
{
|
||||
ret = hiperiso_vlnk_wim_chain_data(wimfile);
|
||||
ret = hiperiso_hlnk_wim_chain_data(wimfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user