(10/11) netrom - convert /proc interface to seq_file
Subsystems (2)
PATCH 1/1 (10/11) netrom - convert /proc interface to seq_file
Convert netrom /proc interface to seq_file.
include/net/netrom.h +2 -2
@@ -209,8 +209,8 @@extern int nr_rt_ioctl (unsigned int ,void *);extern void nr_link_failed (ax25_cb *,int );extern int nr_route_frame (struct sk_buff *,ax25_cb *); -extern int nr_nodes_get_info (char *,char **,off_t ,int ); -extern int nr_neigh_get_info (char *,char **,off_t ,int ); +extern struct file_operations nr_nodes_fops; +extern struct file_operations nr_neigh_fops;extern void nr_rt_free (void );/* nr_subr.c */
net/netrom/af_netrom.c +70 -33
146 lines not on this page · raw message
net/netrom/nr_route.c +127 -53
234 lines not on this page · raw message
Em Wed, Aug 13, 2003 at 03:46:35PM -0700, Stephen Hemminger escreveu:
include/net/netrom.h
Quoted 9 lines
Convert netrom /proc interface to
seq_file.diff -Nru
a/include/net/netrom.hb/include/net/netrom.hinclude/net/netrom.h +4
-0+seq_printf (seq,"%-9s " ,ax2asc (&nr->user_addr)); +seq_printf (seq,"%-9s " ,ax2asc (&nr->dest_addr)); + seq_printf(seq, +"%-9s %-3s %02X/%02X %02X/%02X %2d %3d %3d %3d %3lu/%03lu %2lu/%02lu %3lu/%03lu %3lu/%03lu %2d/%02d %3d %5d %5d %ld\n",
<nitpick> why not just one seq_printf call? </nitpick>
Quoted 12 lines · On Thu, 14 Aug 2003 14:25:39 -0300 Arnaldo Carvalho de Melo…
Em Wed, Aug 13, 2003 at 03:46:35PM -0700, Stephen Hemminger escreveu:
include/net/netrom.h
Quoted 9 lines
Convert netrom /proc interface to
seq_file.diff -Nru
a/include/net/netrom.hb/include/net/netrom.hinclude/net/netrom.h +4
-0+seq_printf (seq,"%-9s " ,ax2asc (&nr->user_addr)); +seq_printf (seq,"%-9s " ,ax2asc (&nr->dest_addr)); + seq_printf(seq, +"%-9s %-3s %02X/%02X %02X/%02X %2d %3d %3d %3d %3lu/%03lu %2lu/%02lu %3lu/%03lu %3lu/%03lu %2d/%02d %3d %5d %5d %ld\n",<nitpick> why not just one
seq_printfcall? </nitpick>
ax2asc() returns a pointer to static buffer.
Em Thu, Aug 14, 2003 at 11:30:25AM -0700, Stephen Hemminger escreveu:
Quoted 5 lines
Quoted 1 line · On Thu, 14 Aug 2003 14:25:39 -0300 Arnaldo Carvalho de Melo…
<nitpick> why not just one
seq_printfcall? </nitpick>
ax2asc()returns a pointer to static buffer.
argh :-\ Even if only for correctness shouldn't it receive a buffer, like snprintf, etc?
- Arnaldo
Arnaldo Carvalho de Melo <[email protected]> :
[ax2asc and the static buffer from hell]
Quoted 2 lines
argh :-\ Even if only for correctness shouldn't it receive a buffer, like snprintf, etc?
Then its name would be "ax2asc2".
--
Ueimor