~ubuntu-branches/ubuntu/dapper/xfsdump/dapper

« back to all changes in this revision

Viewing changes to common/drive_scsitape.c

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2005-07-27 16:45:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050727164542-9avb979cu83drces
Tags: 2.2.30-1
New upstream release (closes: #318088).

Show diffs side-by-side

added added

removed removed

Lines of Context:
489
489
{
490
490
        char rp[PATH_MAX];
491
491
        struct stat64 statbuf;
492
 
        xfs_bstat_t * bstatp;
493
492
        int dev_major;
494
493
 
495
494
        if (realpath(pathname, rp) == NULL) {
525
524
         * drivers to determine 1) if we have a tape device, and 2) which
526
525
         * tape driver the device is using.
527
526
         */
528
 
        bstatp = ( xfs_bstat_t * )calloc( 1, sizeof( xfs_bstat_t ));
529
 
        ASSERT( bstatp );
530
 
        stat64_to_xfsbstat( bstatp, &statbuf );
531
 
        dev_major = major((dev_t)IRIX_DEV_TO_KDEVT(bstatp->bs_rdev));
 
527
        dev_major = major(statbuf.st_rdev);
532
528
 
533
529
        if (dev_major == get_driver_character_major("st")) {
534
 
                free( bstatp );
535
530
                return BOOL_TRUE;
536
531
        }
537
532
        else if (dev_major == get_driver_character_major("ts") ||
538
533
                 dev_major == get_driver_character_major("tmf")) { 
539
534
                TS_ISDRIVER = 1;
540
 
                free( bstatp );
541
535
                return BOOL_TRUE;
542
536
        }
543
537
        else {
544
 
                free( bstatp );
545
538
                return BOOL_FALSE;
546
539
        }
547
540
}