diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-11-08 19:27:58 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-11-08 19:27:58 +0100 |
commit | 8860e991f6650e47cfe6c1af595fe4fe92a4edfd (patch) | |
tree | 18f49bb3a21739a1a596b54d9f65e82cff4fc09f /nest/rt-attr.c | |
parent | cc5b93f72db80abd1262a0a5e1d8400ceef54385 (diff) | |
parent | c8cafc8ebb5320ac7c6117c17e6460036f0fdf62 (diff) |
Merge branch 'master' into int-new
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r-- | nest/rt-attr.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c index bb2b3561..e280bbd9 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -733,7 +733,7 @@ static inline void opaque_format(struct adata *ad, byte *buf, uint size) { byte *bound = buf + size - 10; - int i; + uint i; for(i = 0; i < ad->length; i++) { @@ -776,6 +776,18 @@ ea_show_ec_set(struct cli *c, struct adata *ad, byte *pos, byte *buf, byte *end) } } +static inline void +ea_show_lc_set(struct cli *c, struct adata *ad, byte *pos, byte *buf, byte *end) +{ + int i = lc_set_format(ad, 0, pos, end - pos); + cli_printf(c, -1012, "\t%s", buf); + while (i) + { + i = lc_set_format(ad, i, buf, end - buf - 1); + cli_printf(c, -1012, "\t\t%s", buf); + } +} + /** * ea_show - print an &eattr to CLI * @c: destination CLI @@ -840,6 +852,9 @@ ea_show(struct cli *c, eattr *e) case EAF_TYPE_EC_SET: ea_show_ec_set(c, ad, pos, buf, end); return; + case EAF_TYPE_LC_SET: + ea_show_lc_set(c, ad, pos, buf, end); + return; case EAF_TYPE_UNDEF: default: bsprintf(pos, "<type %02x>", e->type); |