lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Aug 2020 16:51:13 +0300
From:   Amit Cohen <>
        Amit Cohen <>,
        Ido Schimmel <>, Jiri Pirko <>
Subject: [PATCH iproute2] devlink: Add fflush() in cmd_mon_show_cb()

From: Amit Cohen <>

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 <>
Reviewed-by: Ido Schimmel <>
Reviewed-by: Jiri Pirko <>
 devlink/devlink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 0ab0bca5..4b7d4452 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -4654,6 +4654,7 @@ static int cmd_mon_show_cb(const struct nlmsghdr *nlh, void *data)
 		pr_out_trap_policer(dl, tb, false);
+	fflush(stdout);
 	return MNL_CB_OK;

Powered by blists - more mailing lists