]> granicus.if.org Git - strace/commitdiff
mpers.awk: relax union member name absence check
authorElvira Khabirova <lineprinter0@gmail.com>
Mon, 29 Aug 2016 13:22:47 +0000 (13:22 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 29 Aug 2016 15:30:21 +0000 (15:30 +0000)
This fixes mpersing of unions containing nameless members,
e.g. struct btrfs_ioctl_vol_args_v2.

* mpers.awk (what_is): Print names of union_type members as is.

mpers.awk

index 809acf8894bdd5d66f6a8326f447c15af2ece046..2283b966ef0c93e9f7c2dc5db4f52c5c50ac447f 100644 (file)
--- a/mpers.awk
+++ b/mpers.awk
@@ -146,7 +146,7 @@ function what_is(what_idx, type_idx, special, item, \
                        if ("parent" in array[item] && \
                                array_get(item, "parent") == what_idx) {
                                returned = what_is(item)
-                               printf("%s", array_get(item, "name"))
+                               printf("%s", array[item]["name"])
                                if ("" != returned) {
                                        printf("[%s]", returned)
                                }