{
int count, stripes = 0, stripesize = 0;
int dmpipe[2];
- char *dpath, *largv[4], tmppath[PATH_MAX];
+ char *largv[7];
FILE *stream;
long long offset, size;
static char *command = "table"; /* dmsetup table /dev/xxx */
+ char major_str[4], minor_str[4];
if (!mnt_is_dm_subvol(sb->st_rdev))
return 0;
return 0;
}
- if (!(dpath = realpath(dfile, tmppath))) {
- fprintf(stderr,
- _("Warning - device mapper device, but cannot resolve path %s: %s\n"),
- dfile, strerror(errno));
- return 0;
- }
+ snprintf(major_str, 4, "%d", major(sb->st_rdev));
+ snprintf(minor_str, 4, "%d", minor(sb->st_rdev));
largv[1] = command;
- largv[2] = dpath;
- largv[3] = NULL;
+ largv[2] = "-j";
+ largv[3] = major_str;
+ largv[4] = "-m";
+ largv[5] = minor_str;
+ largv[6] = NULL;
/* Open pipe */
if (pipe(dmpipe) < 0) {