mirror of
				https://git.proxmox.com/git/grub2
				synced 2025-11-03 23:50:02 +00:00 
			
		
		
		
	2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
Bug and warning fixes * include/grub/i386/pc/init.h (grub_stop_floppy): added missing declaration * commands/test.c (test_parse): fixed bug with file tests and corrected declaration of find_file
This commit is contained in:
		
							parent
							
								
									4006f85c89
								
							
						
					
					
						commit
						a5562c306f
					
				@ -1,3 +1,12 @@
 | 
			
		||||
2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
 | 
			
		||||
 | 
			
		||||
	Bug and warning fixes
 | 
			
		||||
 | 
			
		||||
	* include/grub/i386/pc/init.h (grub_stop_floppy): added missing 
 | 
			
		||||
	declaration
 | 
			
		||||
	* commands/test.c (test_parse): fixed bug with file tests and corrected
 | 
			
		||||
	declaration of find_file
 | 
			
		||||
 | 
			
		||||
2009-04-26  Pavel Roskin  <proski@gnu.org>
 | 
			
		||||
 | 
			
		||||
	* Makefile.in: Don't install empty manual pages if help2man is
 | 
			
		||||
 | 
			
		||||
@ -55,22 +55,23 @@ test_parse (char **args, int *argn, int argc)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* Check if file exists and fetch its information. */
 | 
			
		||||
  void get_fileinfo (char *pathname)
 | 
			
		||||
  void get_fileinfo (char *path)
 | 
			
		||||
  {
 | 
			
		||||
    char *filename, *path;
 | 
			
		||||
    char *filename, *pathname;
 | 
			
		||||
    char *device_name;
 | 
			
		||||
    grub_fs_t fs;
 | 
			
		||||
    grub_device_t dev;
 | 
			
		||||
 | 
			
		||||
    /* A hook for iterating directories. */
 | 
			
		||||
    auto int find_file (const char *cur_filename, 
 | 
			
		||||
			struct grub_dirhook_info info);
 | 
			
		||||
    int find_file (const char *cur_filename, struct grub_dirhook_info info)
 | 
			
		||||
			const struct grub_dirhook_info *info);
 | 
			
		||||
    int find_file (const char *cur_filename, 
 | 
			
		||||
		   const struct grub_dirhook_info *info)
 | 
			
		||||
    {
 | 
			
		||||
      if ((info.case_insensitive ? grub_strcasecmp (cur_filename, filename)
 | 
			
		||||
      if ((info->case_insensitive ? grub_strcasecmp (cur_filename, filename)
 | 
			
		||||
	   : grub_strcmp (cur_filename, filename)) == 0)
 | 
			
		||||
	{
 | 
			
		||||
	  file_info = info;
 | 
			
		||||
	  file_info = *info;
 | 
			
		||||
	  file_exists = 1;
 | 
			
		||||
	  return 1;
 | 
			
		||||
	}
 | 
			
		||||
@ -78,7 +79,7 @@ test_parse (char **args, int *argn, int argc)
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    file_exists = 0;
 | 
			
		||||
    device_name = grub_file_get_device_name (pathname);
 | 
			
		||||
    device_name = grub_file_get_device_name (path);
 | 
			
		||||
    dev = grub_device_open (device_name);
 | 
			
		||||
    if (! dev)
 | 
			
		||||
      {
 | 
			
		||||
@ -87,11 +88,11 @@ test_parse (char **args, int *argn, int argc)
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    fs = grub_fs_probe (dev);
 | 
			
		||||
    path = grub_strchr (pathname, ')');
 | 
			
		||||
    if (! path)
 | 
			
		||||
      path = pathname;
 | 
			
		||||
    pathname = grub_strchr (path, ')');
 | 
			
		||||
    if (! pathname)
 | 
			
		||||
      pathname = path;
 | 
			
		||||
    else
 | 
			
		||||
      path++;
 | 
			
		||||
      pathname++;
 | 
			
		||||
    
 | 
			
		||||
    /* Remove trailing '/'. */
 | 
			
		||||
    while (*pathname && pathname[grub_strlen (pathname) - 1] == '/')
 | 
			
		||||
 | 
			
		||||
@ -46,5 +46,6 @@ void EXPORT_FUNC (grub_reboot) (void);
 | 
			
		||||
 * use APM even if it is available.  */
 | 
			
		||||
void EXPORT_FUNC (grub_halt) (int no_apm);
 | 
			
		||||
 | 
			
		||||
void EXPORT_FUNC(grub_stop_floppy) (void);
 | 
			
		||||
 | 
			
		||||
#endif /* ! GRUB_INIT_MACHINE_HEADER */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user