From: Pawel Baldysiak <pawel.baldysiak@intel.com>
To: jes.sorensen@redhat.com
Cc: linux-raid@vger.kernel.org, Pawel Baldysiak <pawel.baldysiak@intel.com>
Subject: [PATCH] Lib.c: Fix geting devname for devices with long path
Date: Fri, 21 Oct 2016 11:37:51 +0200 [thread overview]
Message-ID: <1477042671-12934-4-git-send-email-pawel.baldysiak@intel.com> (raw)
In-Reply-To: <1477042671-12934-1-git-send-email-pawel.baldysiak@intel.com>
In scenario where VMD is enabled, and "x8" type of NVMe drive is
plugged into PCIe switch - the path will be longer than 200 chars
(additional VMD domain + 2 level of PCIe switches).
This patch makes the buffer big enough to handle this kind of
configurations.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
---
lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib.c b/lib.c
index 057ee52..b640634 100644
--- a/lib.c
+++ b/lib.c
@@ -64,7 +64,7 @@ int get_mdp_major(void)
char *devid2kname(int devid)
{
char path[30];
- char link[200];
+ char link[PATH_MAX];
static char devnm[32];
char *cp;
int n;
--
2.7.4
next prev parent reply other threads:[~2016-10-21 9:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 9:37 [PATCH] IMSM: Add warning message when x8-type device is used Pawel Baldysiak
2016-10-21 9:37 ` [PATCH] IMSM: Do not update metadata if not able to migrate Pawel Baldysiak
2016-10-21 9:37 ` [PATCH] IMSM: Enable spanning between VMD domains Pawel Baldysiak
2016-10-26 16:03 ` Jes Sorensen
2016-10-21 9:37 ` Pawel Baldysiak [this message]
2016-10-26 16:03 ` [PATCH] Lib.c: Fix geting devname for devices with long path Jes Sorensen
2016-10-21 12:47 ` [PATCH] IMSM: Add warning message when x8-type device is used Jes Sorensen
2016-10-21 14:17 ` Baldysiak, Pawel
2016-10-21 14:22 ` Jes Sorensen
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=1477042671-12934-4-git-send-email-pawel.baldysiak@intel.com \
--to=pawel.baldysiak@intel.com \
--cc=jes.sorensen@redhat.com \
--cc=linux-raid@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).