Commit c13ad9a
bpftool: Print map ID upon creation and support JSON output
It is useful to print map ID on successful creation.
JSON case:
$ ./bpftool -j map create /sys/fs/bpf/test_map4 type hash key 4 value 8 entries 128 name map4
{"id":12}
Generic case:
$ ./bpftool map create /sys/fs/bpf/test_map5 type hash key 4 value 8 entries 128 name map5
Map successfully created with ID: 15
Bpftool Issue: libbpf/bpftool#121
Acked-by: Yonghong Song <[email protected]>
Reviewed-by: Quentin Monnet <[email protected]>
Signed-off-by: Harshit Mogalapalli <[email protected]>1 parent fe98223 commit c13ad9a
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
1254 | 1256 | | |
1255 | 1257 | | |
1256 | 1258 | | |
| |||
1353 | 1355 | | |
1354 | 1356 | | |
1355 | 1357 | | |
1356 | | - | |
1357 | 1358 | | |
1358 | | - | |
| 1359 | + | |
1359 | 1360 | | |
1360 | | - | |
1361 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1362 | 1366 | | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1363 | 1376 | | |
1364 | 1377 | | |
1365 | 1378 | | |
| |||
0 commit comments