From 57a1cbb643237b168bd4151aff3d3bad28bbc326 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 7 Mar 2007 08:09:10 -0500 Subject: [PATCH] Allow the debugfs lcd command to work w/o a filesystem being open Addresses LTC Bugzilla #27513 Signed-off-by: "Theodore Ts'o" --- debugfs/ChangeLog | 6 ++++++ debugfs/debugfs.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index 4511cc9..aaed950 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,9 @@ +2007-03-07 Theodore Tso + + * debugfs.c (do_lcd): Allow the lcd command when debugfs does not + currently have a filesystem open. + (Addresses LTC Bugzilla #27513) + 2007-01-28 Theodore Tso * unused.c: Fix bug so that the dump_unused command segfault if diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index cc99e81..3bddef9 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -181,9 +181,10 @@ print_usage: void do_lcd(int argc, char **argv) { - if (common_args_process(argc, argv, 2, 2, "lcd", - "", 0)) + if (argc != 2) { + com_err(argv[0], 0, "Usage: %s %s", argv[0], ""); return; + } if (chdir(argv[1]) == -1) { com_err(argv[0], errno, -- 1.8.3.1