~ubuntu-branches/debian/sid/grub2/sid-200907171837

« back to all changes in this revision

Viewing changes to util/i386/pc/grub-mkdevicemap.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2006-10-14 21:19:21 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061014211921-ge29q0dowqxicngk
Tags: 1.95-1
* New upstream release.
  - patches/03_revert_partition_numbering.diff: Delete (obsoleted).

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
{
278
278
  sprintf (name, "/dev/ataraid/d%c", unit + '0');
279
279
}
 
280
 
 
281
static void
 
282
get_i2o_disk_name (char *name, char unit)
 
283
{
 
284
  sprintf (name, "/dev/i2o/hd%c", unit);
 
285
}
280
286
#endif
281
287
 
282
288
/* Check if DEVICE can be read. If an error occurs, return zero,
378
384
  for (i = 0; i < floppy_disks; i++)
379
385
    {
380
386
      char name[16];
 
387
      struct stat st;
381
388
      
382
389
      get_floppy_disk_name (name, i);
 
390
      if (stat (name, &st) < 0)
 
391
        break;
383
392
      /* In floppies, write the map, whether check_device succeeds
384
393
         or not, because the user just may not insert floppies.  */
385
394
      if (fp)
479
488
          }
480
489
      }
481
490
  }
 
491
    
 
492
  /* This is for I2O - we have /dev/i2o/hd<logical drive><partition> */
 
493
  {
 
494
    char unit;
 
495
 
 
496
    for (unit = 'a'; unit < 'f'; unit++)
 
497
      {
 
498
        char name[24];
 
499
    
 
500
        get_i2o_disk_name (name, unit);
 
501
        if (check_device (name))
 
502
          {
 
503
            fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
 
504
            num_hd++;
 
505
          }
 
506
      }
 
507
  }
482
508
#endif /* __linux__ */
483
509
 
484
510
 finish: