mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-25 22:45:59 +00:00
The current JSON output of mon command is broken. Fix it and make sure
that the output is a valid JSON. Also, handle SIGINT gracefully to allow
to end the JSON properly.
Example:
$ devlink mon -j -p
{
"mon": [ {
"command": "new",
"dev": {
"netdevsim/netdevsim10": {}
}
},{
"command": "new",
"port": {
"netdevsim/netdevsim10/0": {
"type": "notset",
"flavour": "physical",
"port": 1
}
}
},{
"command": "new",
"port": {
"netdevsim/netdevsim10/0": {
"type": "eth",
"netdev": "eth0",
"flavour": "physical",
"port": 1
}
}
},{
"command": "new",
"port": {
"netdevsim/netdevsim10/0": {
"type": "notset",
"flavour": "physical",
"port": 1
}
}
},{
"command": "del",
"port": {
"netdevsim/netdevsim10/0": {
"type": "notset",
"flavour": "physical",
"port": 1
}
}
},{
"command": "del",
"dev": {
"netdevsim/netdevsim10": {}
}
} ]
}
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| devlink.c | ||
| Makefile | ||
| mnlg.c | ||
| mnlg.h | ||