/[grub]/grub2/kern/disk.c
ViewVC logotype

Diff of /grub2/kern/disk.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by okuji, Fri Aug 12 19:53:32 2005 UTC revision 1.12 by okuji, Thu Aug 18 03:14:39 2005 UTC
# Line 513  grub_disk_write (grub_disk_t disk, unsig Line 513  grub_disk_write (grub_disk_t disk, unsig
513    
514    return grub_errno;    return grub_errno;
515  }  }
   
 grub_err_t  
 grub_print_partinfo (grub_device_t disk, char *partname)  
 {  
   grub_fs_t fs = 0;  
   grub_device_t part;  
   char devname[20];  
         
   grub_sprintf (devname, "%s,%s", disk->disk->name, partname);  
   part = grub_device_open (devname);  
   if (!part)  
     grub_printf ("\tPartition num:%s, Filesystem cannot be accessed",  
                  partname);  
   else  
     {  
       char *label;  
   
       fs = grub_fs_probe (part);  
       /* Ignore all errors.  */  
       grub_errno = 0;  
   
       grub_printf ("\tPartition num:%s, Filesystem type %s",  
                    partname, fs ? fs->name : "Unknown");  
             
       if (fs && fs->label)  
         {  
           (fs->label) (part, &label);  
           if (grub_errno == GRUB_ERR_NONE)  
             {  
               if (label && grub_strlen (label))  
                 grub_printf (", Label: %s", label);  
               grub_free (label);  
             }  
           grub_errno = GRUB_ERR_NONE;  
         }  
       grub_device_close (part);  
     }  
   
   grub_printf ("\n");  
   return grub_errno;  
 }  

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26