mirror of
git://sourceware.org/git/lvm2.git
synced 2024-11-11 23:22:05 +03:00
filters: avoid duplicated //
sysfs_dir already goes with '/sys/'.
This commit is contained in:
parent
5485ec10e2
commit
ce6e74f485
@ -60,7 +60,7 @@ static const char *_get_sysfs_name_by_devt(const char *sysfs_dir, dev_t devno,
|
||||
char path[PATH_MAX];
|
||||
int size;
|
||||
|
||||
if (dm_snprintf(path, sizeof(path), "%s/dev/block/%d:%d", sysfs_dir,
|
||||
if (dm_snprintf(path, sizeof(path), "%sdev/block/%d:%d", sysfs_dir,
|
||||
(int) MAJOR(devno), (int) MINOR(devno)) < 0) {
|
||||
log_error("Sysfs path string is too long.");
|
||||
return NULL;
|
||||
@ -106,7 +106,7 @@ static int _get_sysfs_get_major_minor(const char *sysfs_dir, const char *kname,
|
||||
{
|
||||
char path[PATH_MAX], buffer[64];
|
||||
|
||||
if (dm_snprintf(path, sizeof(path), "%s/block/%s/dev", sysfs_dir, kname) < 0) {
|
||||
if (dm_snprintf(path, sizeof(path), "%sblock/%s/dev", sysfs_dir, kname) < 0) {
|
||||
log_error("Sysfs path string is too long.");
|
||||
return 0;
|
||||
}
|
||||
@ -215,7 +215,7 @@ static int _native_dev_is_mpath(struct dev_filter *f, struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dm_snprintf(path, sizeof(path), "%s/block/%s/holders", sysfs_dir, name) < 0) {
|
||||
if (dm_snprintf(path, sizeof(path), "%sblock/%s/holders", sysfs_dir, name) < 0) {
|
||||
log_warn("Sysfs path to check mpath is too long.");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user