OpenBSD CVS

CVS log for src/usr.sbin/bgpctl/json.c


[BACK] Up to [local] / src / usr.sbin / bgpctl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10 / (download) - annotate - [select for diffs], Thu Jun 22 09:07:04 2023 UTC (11 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

KNF

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 5 16:24:05 2023 UTC (11 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.8: +40 -12 lines
Diff to previous 1.8 (colored)

Sync json.c with rpki-client rev 1.3:
Add an extra argument compact to json_do_object() to instruct the parser
to dump this object on a single line.

While one can select on an object to object basis for arrays the compact
setting is inherited from the surrounding object.

OK tb@

Revision 1.8 / (download) - annotate - [select for diffs], Fri May 5 07:42:40 2023 UTC (12 months, 4 weeks ago) by claudio
Branch: MAIN
Changes since 1.7: +50 -6 lines
Diff to previous 1.7 (colored)

Sync json.c with the one from rpki-client. This adds json_do_string().
Convert json_do_printf() calls using static strings or "%s" fmt over
to json_do_string() in the json output.
OK tb@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Apr 26 21:17:24 2023 UTC (13 months ago) by claudio
Branch: MAIN
Changes since 1.6: +21 -21 lines
Diff to previous 1.6 (colored)

Use < 0 for fprintf() error checking and not == -1.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Apr 26 20:53:17 2023 UTC (13 months ago) by claudio
Branch: MAIN
Changes since 1.5: +52 -28 lines
Diff to previous 1.5 (colored)

Verify each fprintf call for success. On failure stop calling fprintf
and return -1 in json_do_finish().
tb@ thinks this is not to horrible

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 26 19:14:54 2023 UTC (13 months ago) by claudio
Branch: MAIN
Changes since 1.4: +27 -25 lines
Diff to previous 1.4 (colored)

Use fprintf instead of printf and pass the FILE handle in json_do_start().
OK tb@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 26 17:39:20 2023 UTC (13 months ago) by tb
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

Whitespace

"please fix" json

Revision 1.3 / (download) - annotate - [select for diffs], Wed Aug 31 12:13:59 2022 UTC (21 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

Add missing OpenBSD id comment

Revision 1.2 / (download) - annotate - [select for diffs], Mon May 4 16:00:13 2020 UTC (4 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Using int64_t together with printf %llu is not portable. Either add a
cast in the printf to unsigned long long or just use unsigned long long
from the start. In this case it is better to switch the type. Similar
changes had been done before.
OK deraadt@

Revision 1.1 / (download) - annotate - [select for diffs], Sat May 2 14:33:33 2020 UTC (4 years, 1 month ago) by claudio
Branch: MAIN

Add support to output data in JSON. This is still work in progress and
the output structures may still change but it should be a good starting
point for poeple to start playing with it.
OK benno@, job@, deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.