Whamcloud - gitweb
LU-812 utils: remove obsolete jt_dbg_modules_2_4 code
authorLiu Xuezhao <xuezhao.liu@emc.com>
Thu, 23 Aug 2012 08:20:15 +0000 (16:20 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Sep 2012 18:26:54 +0000 (14:26 -0400)
jt_dbg_modules_2_4 is for 2.4 kernel and it breaks "lctl modules"
for 3.x kernel.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: If2953c71707ae200a4095786150b1dee05547fff
Reviewed-on: http://review.whamcloud.com/3778
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lnet/utils/debug.c

index 052dae1..9c3d3c1 100644 (file)
@@ -900,12 +900,7 @@ static struct mod_paths {
         {NULL, NULL}
 };
 
-static int jt_dbg_modules_2_4(int argc, char **argv)
-{
-        return -EINVAL;
-}
-
-static int jt_dbg_modules_2_5(int argc, char **argv)
+int jt_dbg_modules(int argc, char **argv)
 {
         struct mod_paths *mp;
         char *path = "";
@@ -933,11 +928,11 @@ static int jt_dbg_modules_2_5(int argc, char **argv)
                                 if (!strcmp(mp->name, modname))
                                         break;
                         }
-                        if (mp->name) {
-                                printf("add-symbol-file %s%s%s/%s.o 0x%0lx\n", 
-                                       path, path[0] ? "/" : "", 
-                                       mp->path, mp->name, modaddr);
-                        }
+                       if (mp->name) {
+                               printf("add-symbol-file %s%s%s/%s.o 0x%0lx\n",
+                                       path, path[0] ? "/" : "",
+                                       mp->path, mp->name, modaddr);
+                       }
                 }
         }
 
@@ -945,26 +940,6 @@ static int jt_dbg_modules_2_5(int argc, char **argv)
         return 0;
 }
 
-int jt_dbg_modules(int argc, char **argv)
-{
-        int rc = 0;
-        struct utsname sysinfo;
-
-        rc = uname(&sysinfo);
-        if (rc) {
-                printf("uname() failed: %s\n", strerror(errno));
-                return 0;
-        }
-
-        if (sysinfo.release[2] > '4') {
-                return jt_dbg_modules_2_5(argc, argv);
-        } else {
-                return jt_dbg_modules_2_4(argc, argv);
-        }
-
-        return 0;
-}
-
 int jt_dbg_panic(int argc, char **argv)
 {
         int rc;