[Libguestfs] [PATCH 2/2] fish: Show device mapper device in tab completion (RHBZ#688062).

Richard W.M. Jones rjones at redhat.com
Tue Jul 12 12:39:54 UTC 2011


-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
-------------- next part --------------
>From a8faf9fc808c9f64e21c397ce45f4092f3030fc7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Tue, 12 Jul 2011 13:31:42 +0100
Subject: [PATCH 2/2] fish: Show device mapper device in tab completion
 (RHBZ#688062).

With this change:

><fs> luks-open /dev/vda1 lukstest
Enter key or passphrase ("key"):
><fs> ll /dev/<TAB>
/dev/mapper/lukstest  /dev/vda              /dev/vda1
---
 fish/destpaths.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fish/destpaths.c b/fish/destpaths.c
index 5ed93ec..3c90517 100644
--- a/fish/destpaths.c
+++ b/fish/destpaths.c
@@ -155,6 +155,9 @@ complete_dest_paths_generator (const char *text, int state)
 
       strs = guestfs_lvs (g);
       APPEND_STRS_AND_FREE;
+
+      strs = guestfs_list_dm_devices (g);
+      APPEND_STRS_AND_FREE;
     }
 
     if (len < 1 || text[0] == '/') {
-- 
1.7.5.2



More information about the Libguestfs mailing list