Changeset 2105 in MondoRescue for branches/2.2.8/mondo/src
- Timestamp:
- Jan 6, 2009, 5:42:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/common/libmondo-string.c
r2052 r2105 863 863 } 864 864 /* 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) { 866 866 /* yup it's dm, return the full path */ 867 867 return partition; 868 868 } 869 869 870 870 871 for (i = strlen(partition); isdigit(partition[i - 1]); i--) … … 872 873 if (partition[i - 1] == 'p' && isdigit(partition[i - 2])) { 873 874 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 } 874 883 } 875 884 partition[i] = '\0';
Note:
See TracChangeset
for help on using the changeset viewer.