mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 11:18:52 +00:00
lib: Fixup json code to use struct cmd_token
This commit is contained in:
parent
f68cec764a
commit
8a2d6083d6
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
|
|
||||||
|
#include "command.h"
|
||||||
#include "lib/json.h"
|
#include "lib/json.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -29,12 +30,12 @@
|
|||||||
* what.
|
* what.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
use_json (const int argc, const char *argv[])
|
use_json (const int argc, const struct cmd_token *argv[])
|
||||||
{
|
{
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (argv[argc-1] && strcmp(argv[argc-1], "json") == 0)
|
if (argv[argc-1]->arg && strcmp(argv[argc-1]->arg, "json") == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int use_json(const int argc, const char *argv[]);
|
extern int use_json(const int argc, const struct cmd_token *argv[]);
|
||||||
extern void json_object_string_add(struct json_object* obj, const char *key,
|
extern void json_object_string_add(struct json_object* obj, const char *key,
|
||||||
const char *s);
|
const char *s);
|
||||||
extern void json_object_int_add(struct json_object* obj, const char *key,
|
extern void json_object_int_add(struct json_object* obj, const char *key,
|
||||||
|
Loading…
Reference in New Issue
Block a user