This patch resolves clipped LD_LIBRARY_PATH.  Using hugectl to enable use of 
hugepage for an application on a system with SLES11 SP1.  hugectl was clipping 
my LD_LIBRARY_PATH at 254 characters and preventing execution.  NAME_MAX on my 
platform is 255.  This patch allows LD_LIBRARY_PATH to be up to 4096 characters 
on my platform.

Signed-off-by: Daniel Kokron <daniel.kok...@nasa.gov>
---
modified:   hugectl.c
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hugectl.c b/hugectl.c
index 741247f..8f05595 100644
--- a/hugectl.c
+++ b/hugectl.c
@@ -271,7 +271,7 @@ void setup_mappings(int count)
 
 void library_path(char *path)
 {
-       char val[NAME_MAX] = "";
+       char val[PATH_MAX] = "";
        char *env;
 
        env = getenv("LD_LIBRARY_PATH");
--
git version 1.7.7.4

Daniel Kokron
NASA Ames (ARC-TN)
SciCon group
301-286-3959

________________________________________
From: Kokron, Daniel S. (GSFC-610.1)[Computer Sciences Corporation]
Sent: Friday, December 07, 2012 10:14 AM
To: Eric B Munson
Cc: libhugetlbfs-devel@lists.sourceforge.net
Subject: RE: [Libhugetlbfs-devel] update for clipped LD_LIBRARY_PATH

Eric,

I was using hugectl to enable use of hugepage for an application on a system 
with SLES11 SP1.  hugectl was clipping my LD_LIBRARY_PATH at 254 characters and 
preventing execution.  NAME_MAX on my platform is 255.  This patch allows 
LD_LIBRARY_PATH to be up to 4096 characters on my platform.

Daniel Kokron
NASA Ames (ARC-TN)
SciCon group
301-286-3959

________________________________________
From: Eric B Munson [emun...@mgebm.net]
Sent: Friday, December 07, 2012 9:50 AM
To: Kokron, Daniel S. (GSFC-610.1)[Computer Sciences Corporation]
Cc: libhugetlbfs-devel@lists.sourceforge.net
Subject: Re: [Libhugetlbfs-devel] update for clipped LD_LIBRARY_PATH

On 2012-12-06 15:09, Dan Kokron wrote:
> git diff hugectl.c
> diff --git a/hugectl.c b/hugectl.c
> index 741247f..8f05595 100644
> --- a/hugectl.c
> +++ b/hugectl.c
> @@ -271,7 +271,7 @@ void setup_mappings(int count)
>
>  void library_path(char *path)
>  {
> -       char val[NAME_MAX] = "";
> +       char val[PATH_MAX] = "";
>         char *env;
>
>         env = getenv("LD_LIBRARY_PATH");
>
>

Dan,

I can't take this patch without a leader that has a Signed-off-by, at
the very least.  It should also do a little to explain the problem your
are correcting.

Thanks,
Eric

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel
  • [Libhugetlbf... Dan Kokron
    • Re: [Li... Eric B Munson
      • Re:... Kokron, Daniel S. (GSFC-610.1)[Computer Sciences Corporation]
        • ... Eric B Munson
        • ... Kokron, Daniel S. (GSFC-610.1)[Computer Sciences Corporation]
          • ... Eric B Munson

Reply via email to