]> git.proxmox.com Git - mirror_iproute2.git/commit - devlink/devlink.c
devlink: Add fflush() in cmd_mon_show_cb()
authorAmit Cohen <amcohen@nvidia.com>
Thu, 20 Aug 2020 13:51:13 +0000 (16:51 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 23 Aug 2020 04:13:11 +0000 (21:13 -0700)
commit8e6bce735a132150c23503a55ea0aef55a01425f
tree1fca1e1f6f58044aa27fba2408043ff0324240be
parent7e7a1d107b7f2bb729836de25c4983f9615a2aa1
devlink: Add fflush() in cmd_mon_show_cb()

Similar to other print functions we need to flush buffered data
in order to work with pipes and output redirects.

Without it, stdout output is buffered and not written to the disk.

This is useful when writing scripts that rely on devlink-monitor output.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c