Changeset 2105


Ignore:
Timestamp:
Jan 6, 2009, 5:42:58 PM (11 years ago)
Author:
bruno
Message:
  • Improve function truncate_to_drive_name to support returning full drives used as partitions (such as /dev/mapper/mapthx)
Location:
branches/2.2.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mindi/mindi

    r2102 r2105  
    5757CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660"
    5858# Those modules will only go on the backup media, not the boot media.
    59 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 raid456 lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16"
     59EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 raid456 lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16 fuse"
    6060# Replace with that line for HP OCMP e.g.
    6161#DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain"
  • branches/2.2.8/mondo/src/common/libmondo-string.c

    r2052 r2105  
    863863    }
    864864    /* then see if it's a dm style device */
    865     if (c && strncmp(c, "/dm-", 5) == 0) {
     865    if (c && strncmp(c, "/dm-", 4) == 0) {
    866866        /* yup it's dm, return the full path */
    867867        return partition;
    868868    }
     869
    869870
    870871    for (i = strlen(partition); isdigit(partition[i - 1]); i--)
     
    872873    if (partition[i - 1] == 'p' && isdigit(partition[i - 2])) {
    873874        i--;
     875    } else {
     876        /* Some full devices like this /dev/mapper/mpath0
     877        * /dev/cciss/c0d0 may be used as partition names */
     878        if ((strstr(partition,"/dev/mapper/mpath") != NULL) ||
     879            (strstr(partition,"/dev/cciss/c") != NULL) ||
     880            (strstr(partition,"/dev/rd/") != NULL)) {
     881                return partition;
     882            }
    874883    }
    875884    partition[i] = '\0';
Note: See TracChangeset for help on using the changeset viewer.