tools: fix getting {ext4,btrfs}_file_operations address (ref #583)
authorygrek <ygrek@autistici.org>
Mon, 27 Jun 2016 19:54:55 +0000 (12:54 -0700)
committerygrek <ygrek@autistici.org>
Mon, 27 Jun 2016 19:55:42 +0000 (12:55 -0700)
tools/btrfsdist.py
tools/btrfsslower.py
tools/ext4dist.py

index 2ce077c..6189da0 100755 (executable)
@@ -169,6 +169,7 @@ with open(kallsyms) as syms:
     for line in syms:
         a = line.rstrip().split()
         (addr, name) = (a[0], a[2])
+        name = name.split("\t")[0]
         if name == "btrfs_file_operations":
             ops = "0x" + addr
             break
index de0e3e0..111076c 100755 (executable)
@@ -251,6 +251,7 @@ with open(kallsyms) as syms:
     for line in syms:
         a = line.rstrip().split()
         (addr, name) = (a[0], a[2])
+        name = name.split("\t")[0]
         if name == "btrfs_file_operations":
             ops = "0x" + addr
             break
index b59a227..cd51b8a 100755 (executable)
@@ -149,6 +149,7 @@ with open(kallsyms) as syms:
     ops = ''
     for line in syms:
         (addr, size, name) = line.rstrip().split(" ", 2)
+        name = name.split("\t")[0]
         if name == "ext4_file_operations":
             ops = "0x" + addr
             break