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>
pr_out_trap_policer(dl, tb, false);
break;
}
+ fflush(stdout);
return MNL_CB_OK;
}