mirror of
				https://git.proxmox.com/git/grub2
				synced 2025-11-04 09:14:22 +00:00 
			
		
		
		
	* grub-core/kern/main.c (grub_set_prefix_and_root): Set variable
cmdpath to firmware directory.
This commit is contained in:
		
							parent
							
								
									83e9c273e5
								
							
						
					
					
						commit
						1fe26ab4a0
					
				@ -1,3 +1,8 @@
 | 
				
			|||||||
 | 
					2013-11-14  Matthew Garrett  <mjg@redhat.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* grub-core/kern/main.c (grub_set_prefix_and_root): Set variable
 | 
				
			||||||
 | 
						cmdpath to firmware directory.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2013-11-14  Vladimir Serbinenko  <phcoder@gmail.com>
 | 
					2013-11-14  Vladimir Serbinenko  <phcoder@gmail.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* grub-core/kern/efi/efi.c (grub_efi_get_filename): Reset the pointer
 | 
						* grub-core/kern/efi/efi.c (grub_efi_get_filename): Reset the pointer
 | 
				
			||||||
 | 
				
			|||||||
@ -125,6 +125,21 @@ grub_set_prefix_and_root (void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  grub_register_variable_hook ("root", 0, grub_env_write_root);
 | 
					  grub_register_variable_hook ("root", 0, grub_env_write_root);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  grub_machine_get_bootlocation (&fwdevice, &fwpath);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (fwdevice)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      char *cmdpath;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      cmdpath = grub_xasprintf ("(%s)%s", fwdevice, fwpath ? : "");
 | 
				
			||||||
 | 
					      if (cmdpath)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
						  grub_env_set ("cmdpath", cmdpath);
 | 
				
			||||||
 | 
						  grub_env_export ("cmdpath");
 | 
				
			||||||
 | 
						  grub_free (cmdpath);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (prefix)
 | 
					  if (prefix)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      char *pptr = NULL;
 | 
					      char *pptr = NULL;
 | 
				
			||||||
@ -142,8 +157,6 @@ grub_set_prefix_and_root (void)
 | 
				
			|||||||
      if (pptr[0])
 | 
					      if (pptr[0])
 | 
				
			||||||
	path = grub_strdup (pptr);
 | 
						path = grub_strdup (pptr);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  if ((!device || device[0] == ',' || !device[0]) || !path)
 | 
					 | 
				
			||||||
    grub_machine_get_bootlocation (&fwdevice, &fwpath);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!device && fwdevice)
 | 
					  if (!device && fwdevice)
 | 
				
			||||||
    device = fwdevice;
 | 
					    device = fwdevice;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user