Thread (4 messages) flat view 4 messages, 3 authors, 2003-08-25

Re: [PATCH] convering bonding driver /proc interface to seq_file

From: Stephen Hemminger <hidden>
Date: 2003-08-25 15:45:21

On Mon, 25 Aug 2003 01:15:13 +1000 (EST)
James Morris [off-list ref] wrote:
On Sat, 23 Aug 2003, Hen, Shmulik wrote:
quoted
Also, instead of using a seq_file interface and using a
pointer to skip to the relevant part, we've used a different
proc creation interface that allows passing a pointer to bond
and thus retrieve just the relevant bond device's data.
Can you provide a pointer to this code?

seq_file is the standard and preferred way to do this kind of thing.
Using a pointer with seq_file was really easy.

init...
	bond->bond_proc_file = create_proc_entry(dev->name,
						 S_IRUGO, 
						 bond_proc_dir);
	if (bond->bonc_proc_file) {
		bond->bond_proc_file->data = bond;
		bond->bond_proc_file->proc_fops = &bond_info_fops;
	}

open...
	rc = seq_open(file, &bond_info_seq_ops);
	if (!rc) {
		seq = file->private_data;
		seq->private = PDE(inode)->data;
	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help