[Ocfs2-tools-devel] [PATCH 1/1] ocfs2-tools: add pwd command support for debugfs.ocfs2
Jeff Liu
jeff.liu at oracle.com
Sun Apr 5 00:25:54 PDT 2009
This patch add pwd command support for debugfs.ocfs2
Signed-off-by: Jeff Liu <jeff.liu at oracle.com>
---
debugfs.ocfs2/commands.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/debugfs.ocfs2/commands.c b/debugfs.ocfs2/commands.c
index 0dea23f..f70cdcf 100644
--- a/debugfs.ocfs2/commands.c
+++ b/debugfs.ocfs2/commands.c
@@ -74,6 +74,7 @@ static void do_icheck (char **args);
static void do_dlm_locks (char **args);
static void do_controld(char **args);
static void do_dirblocks(char **args);
+static void do_pwd(char **args);
dbgfs_gbls gbls;
@@ -110,6 +111,7 @@ static Command commands[] = {
{ "encode", do_encode_lockres },
{ "decode", do_decode_lockres },
{ "dirblocks", do_dirblocks },
+ { "pwd", do_pwd },
};
/*
@@ -1769,3 +1771,22 @@ static void do_icheck(char **args)
return;
}
+
+/*
+ * do_pwd()
+ *
+ */
+static void do_pwd(char **args)
+{
+ uint64_t blkno[1];
+ int findall = 1;
+ int count = 1;
+
+ if (check_device_open())
+ return;
+
+ blkno[0] = gbls.cwd_blkno;
+ find_inode_paths(gbls.fs, args, findall, count, blkno, stdout);
+
+ return ;
+}
--
1.5.4.3
More information about the Ocfs2-tools-devel
mailing list