public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota
@ 2009-05-16  1:31 Eric Sandeen
  2009-05-16 20:34 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2009-05-16  1:31 UTC (permalink / raw)
  To: xfs-oss

It looks like libxcmd wasn't ever being built with -DENABLE_READLINE
even when it was asked for by configure --enable-readline=yes
so xfs_io & xfs_quota didn't get the functionality.

This seems to fix it up for me (fixes editline too while we're
at it).

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---


Index: xfsprogs-3.0.1/libxcmd/Makefile
===================================================================
--- xfsprogs-3.0.1.orig/libxcmd/Makefile
+++ xfsprogs-3.0.1/libxcmd/Makefile
@@ -20,6 +20,14 @@ ifeq ($(HAVE_GETMNTINFO),yes)
 LCFLAGS += -DHAVE_GETMNTINFO
 endif
 
+ifeq ($(ENABLE_READLINE),yes)
+LCFLAGS += -DENABLE_READLINE
+endif
+
+ifeq ($(ENABLE_EDITLINE),yes)
+LCFLAGS += -DENABLE_EDITLINE
+endif
+
 default: $(LTLIBRARY)
 
 include $(BUILDRULES)

Index: xfsprogs-3.0.1/growfs/Makefile
===================================================================
--- xfsprogs-3.0.1.orig/growfs/Makefile
+++ xfsprogs-3.0.1/growfs/Makefile
@@ -10,6 +10,14 @@ LTCOMMAND = xfs_growfs
 CFILES = xfs_growfs.c
 
 LLDLIBS = $(LIBXFS) $(LIBXCMD) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
+ifeq ($(ENABLE_READLINE),yes)
+LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
+endif
+
+ifeq ($(ENABLE_EDITLINE),yes)
+LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
+endif
+
 LTDEPENDENCIES = $(LIBXFS) $(LIBXCMD)
 LLDFLAGS = -static
 LSRCFILES = xfs_info.sh

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota
  2009-05-16  1:31 [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota Eric Sandeen
@ 2009-05-16 20:34 ` Christoph Hellwig
  2009-05-16 22:01   ` Eric Sandeen
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2009-05-16 20:34 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Fri, May 15, 2009 at 08:31:40PM -0500, Eric Sandeen wrote:
> It looks like libxcmd wasn't ever being built with -DENABLE_READLINE
> even when it was asked for by configure --enable-readline=yes
> so xfs_io & xfs_quota didn't get the functionality.
> 
> This seems to fix it up for me (fixes editline too while we're
> at it).

I've also been wondering for quite some while why xfs_io didn't have
working readline support.

This patch makes it work for me and looks good:


Reviewed-by: Christoph Hellwig <hch@lst.de>

(btw, any reason we don't enable readline support by default if
we find the headers installed?)

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota
  2009-05-16 20:34 ` Christoph Hellwig
@ 2009-05-16 22:01   ` Eric Sandeen
  2009-05-16 22:14     ` Eric Sandeen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2009-05-16 22:01 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs-oss

Christoph Hellwig wrote:
> On Fri, May 15, 2009 at 08:31:40PM -0500, Eric Sandeen wrote:
>> It looks like libxcmd wasn't ever being built with -DENABLE_READLINE
>> even when it was asked for by configure --enable-readline=yes
>> so xfs_io & xfs_quota didn't get the functionality.
>>
>> This seems to fix it up for me (fixes editline too while we're
>> at it).
> 
> I've also been wondering for quite some while why xfs_io didn't have
> working readline support.
> 
> This patch makes it work for me and looks good:
> 
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> (btw, any reason we don't enable readline support by default if
> we find the headers installed?)
> 

I dunno... Nathan, any idea?  Maybe some git-digging is in order.

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota
  2009-05-16 22:01   ` Eric Sandeen
@ 2009-05-16 22:14     ` Eric Sandeen
  2009-05-17  0:21       ` Nathan Scott
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2009-05-16 22:14 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs-oss

Eric Sandeen wrote:
> Christoph Hellwig wrote:

...

>> (btw, any reason we don't enable readline support by default if
>> we find the headers installed?)
>>
> 
> I dunno... Nathan, any idea?  Maybe some git-digging is in order.
> 
> -Eric
> 

xfsprogs-2.4.2 (25 March 2003)
        - Added the xfs_io(8) command, an xfs_db(8) alike command
          for testing and debugging the XFS file IO path.
        - Added an optional dependency on the GNU readline library
          which is "off" by default and enabled with the configure
          option --enable-readline=yes; it affects the interactive
          tools only (xfs_db and now xfs_io).

looks like it was done that way originally and never changed, commit
e246ba5f93896ac873d25f65c05496e6e2c69e34 I think.

Fine by me to make the default yes if it's there ...

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota
  2009-05-16 22:14     ` Eric Sandeen
@ 2009-05-17  0:21       ` Nathan Scott
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Scott @ 2009-05-17  0:21 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Christoph Hellwig, xfs-oss


----- "Eric Sandeen" <sandeen@sandeen.net> wrote:

> Eric Sandeen wrote:
> > Christoph Hellwig wrote:
> 
> ...
> 
> >> (btw, any reason we don't enable readline support by default if
> >> we find the headers installed?)
> >>
> > 
> > I dunno... Nathan, any idea?  Maybe some git-digging is in order.
> > 

No idea, sorry, too long ago... perhaps not wanting to introduce
dependencies unexpectedly (rescue disks/installers, etc might not
have readline lib).

cheers.

-- 
Nathan

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-17  0:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-16  1:31 [PATCH] xfsprogs: fix readline/editline for xfs_io and xfs_quota Eric Sandeen
2009-05-16 20:34 ` Christoph Hellwig
2009-05-16 22:01   ` Eric Sandeen
2009-05-16 22:14     ` Eric Sandeen
2009-05-17  0:21       ` Nathan Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox