Skip to content

Commit 9bb5fbe

Browse files
fenghusthudavem330
authored andcommitted
net-sysfs: add a newline when printing 'tx_timeout' by sysfs
When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout 0root@syzkaller:~# Signed-off-by: Xiongfeng Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 015c5d5 commit 9bb5fbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/net-sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf)
11081108
trans_timeout = queue->trans_timeout;
11091109
spin_unlock_irq(&queue->_xmit_lock);
11101110

1111-
return sprintf(buf, "%lu", trans_timeout);
1111+
return sprintf(buf, fmt_ulong, trans_timeout);
11121112
}
11131113

11141114
static unsigned int get_netdev_queue_index(struct netdev_queue *queue)

0 commit comments

Comments
 (0)