On Mon, Jul 28, 2008 at 09:48:58AM -0700, Nishanth Aravamudan wrote:
> On 26.07.2008 [14:30:44 +0100], Andy Whitcroft wrote:
> > Add support for requesting a specific library set for preload.  This adds
> > the --library-path option.  If this option points to a directory containing
> > a libhugetlbfs library it is used, else it is assumed to be a library
> > prefix and both the 32 bit and 64 bit library directories are added
> > (where available).  By default the specific libraries installed with the
> > version of hugectl are used.
> > 
> > Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]>
> > ---
> >  Makefile  |    9 ++++++-
> >  hugectl.c |   79 
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 87 insertions(+), 1 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index d69a365..6571672 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -101,6 +101,13 @@ BINDIR = $(PREFIX)/share/libhugetlbfs
> >  EXEDIR = $(PREFIX)/bin
> >  DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
> > 
> > +ifdef LIB32
> > +LIBPATHS += -DLIB32='"$(LIB32)"' -DLIBDIR32='"$(LIBDIR32)"'
> > +endif
> > +ifdef LIB64
> > +LIBPATHS += -DLIB64='"$(LIB64)"' -DLIBDIR64='"$(LIBDIR64)"'
> > +endif
> > +
> >  EXTRA_DIST = \
> >     README \
> >     HOWTO \
> > @@ -228,7 +235,7 @@ obj64/%.s:      %.c
> > 
> >  $(OBJS):   hugectl.c
> >     @$(VECHO) CPP $@
> > -   $(CC) $(CFLAGS) -o $@ -c $<
> > +   $(CC) $(CFLAGS) $(LIBPATHS) -o $@ -c $<
> > 
> >  $(INSTALL_OBJ):    $(OBJS)
> >     @$(VECHO) CC $@
> > diff --git a/hugectl.c b/hugectl.c
> > index e24d69f..84ced31 100644
> > --- a/hugectl.c
> > +++ b/hugectl.c
> > @@ -31,6 +31,7 @@
> >  #include <stdio.h>
> >  #include <errno.h>
> >  #include <string.h>
> > +#include <limits.h>
> > 
> >  #define _GNU_SOURCE /* for getopt_long */
> >  #include <unistd.h>
> > @@ -68,6 +69,17 @@ void print_usage()
> >     OPTION("--no-preload", "Disable preloading the libhugetlbfs library");
> > 
> >     OPTION("--dry-run", "describe what would be done without doing it");
> > +
> > +   OPTION("--library-use-path", "Use the system library path");
> 
> You mention --library-use-path here, but ...
> 
> <snip>
> 
> > @@ -162,6 +232,7 @@ int main(int argc, char** argv)
> >  {
> >     int opt_mappings = 0;
> >     int opt_preload = 1;
> > +   char *opt_library = NULL;
> > 
> >     char opts[] = "+h";
> >     int ret = 0, index = 0;
> > @@ -169,6 +240,8 @@ int main(int argc, char** argv)
> >             {"help",       no_argument, NULL, 'h'},
> >             {"no-preload", no_argument, NULL, LONG_NO_PRELOAD},
> >             {"dry-run",    no_argument, NULL, LONG_DRY_RUN},
> > +           {"library-path",
> > +                          required_argument, NULL, LONG_LIBRARY},
> 
> Don't add it here? Should the above reference be deleted?

Yeah thats a merge explosion.  Will sort it out.

-apw

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to