]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: make showmapped output a bit prettier
authorSage Weil <sage.weil@dreamhost.com>
Tue, 26 Apr 2011 18:04:28 +0000 (11:04 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 26 Apr 2011 18:04:28 +0000 (11:04 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/rbd.cc

index 71374d23406edf09885a28382b1884e497a3ce74..a5ab28255b7aca0537d895f18e9d378a2fd245b9 100644 (file)
@@ -599,7 +599,7 @@ static int do_kernel_showmapped()
     return r;
   }
 
-  cout << "device\t\tpool\timage\tsnap" << std::endl;
+  cout << "id\tpool\timage\tsnap\tdevice" << std::endl;
 
   do {
     if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
@@ -634,7 +634,7 @@ static int do_kernel_showmapped()
       continue;
     }
 
-    cout << dev << "\t" << pool << "\t" << name << "\t" << snap << std::endl;
+    cout << dent->d_name << "\t" << pool << "\t" << name << "\t" << snap << "\t" << dev << std::endl;
 
   } while ((dent = readdir(device_dir)));