From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - filters: avoid duplicated //
Date: Fri, 22 Jan 2021 15:10:04 +0000 (GMT) [thread overview]
Message-ID: <20210122151004.D327D398D000@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ce6e74f485cb1fb36a4c1c35d1bd3262b77954de
Commit: ce6e74f485cb1fb36a4c1c35d1bd3262b77954de
Parent: 5485ec10e2b592f48f5208d8b5e3cf5e0f0eb70d
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Wed Jan 20 00:41:23 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Jan 22 15:30:37 2021 +0100
filters: avoid duplicated //
sysfs_dir already goes with '/sys/'.
---
lib/filters/filter-mpath.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c
index 85d1625f6..889a2dd96 100644
--- a/lib/filters/filter-mpath.c
+++ b/lib/filters/filter-mpath.c
@@ -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;
}
reply other threads:[~2021-01-22 15:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210122151004.D327D398D000@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.