rfc: Are any of the seq_pad() uses really necessary?

From: Joe Perches
Date: Thu Sep 22 2016 - 17:52:18 EST


$ git grep -w seq_pad net
net/ipv4/fib_trie.c:            seq_pad(seq, '\n');
net/ipv4/ping.c:        seq_pad(seq, '\n');
net/ipv4/tcp_ipv4.c:    seq_pad(seq, '\n');
net/ipv4/udp.c: seq_pad(seq, '\n');
net/phonet/socket.c:    seq_pad(seq, '\n');
net/phonet/socket.c:    seq_pad(seq, '\n');
net/sctp/objcnt.c:      seq_pad(seq, '\n');

what these uses do is add trailing blanks to a particular
preset block width and then append a newline.

None of these trailing pad bytes seem useful to me.

Are there really tools that expect specific line widths
when reading from things like /proc/<pid>/net/<file>

For instance:

$ cat /proc/<pid>/net/udp
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops
484: 00000000:14E9 00000000:0000 07 00000000:00000000 00:00000000 00000000 111 0 16961 2 0000000000000000 0
486: 00000000:14EB 00000000:0000 07 00000000:00000000 00:00000000 00000000 102 0 2022599 2 0000000000000000 0
788: 00000000:A619 00000000:0000 07 00000000:00000000 00:00000000 00000000 1000 0 4390482 2 0000000000000000 0
3081: 00000000:8F0E 00000000:0000 07 00000000:00000000 00:00000000 00000000 111 0 16963 2 0000000000000000 0
3376: 3500007F:0035 00000000:0000 07 00000000:00000000 00:00000000 00000000 102 0 2022601 2 0000000000000000 0
3391: 00000000:0044 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4546167 2 0000000000000000 0

These seq_pad uses were modified by: