| To: | James Morris <jmorris@xxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] convering bonding driver /proc interface to seq_file |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Mon, 25 Aug 2003 08:45:21 -0700 |
| Cc: | "Hen, Shmulik" <shmulik.hen@xxxxxxxxx>, Chad Tindel <ctindel@xxxxxxxxxxxxxxxxxxxxx>, Jay Vosburgh <fubar@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, <bonding-devel@xxxxxxxxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx> |
| In-reply-to: | <Mutt.LNX.4.44.0308250112470.21951-100000@excalibur.intercode.com.au> |
| Organization: | Open Source Development Lab |
| References: | <E791C176A6139242A988ABA8B3D9B38A014C94C0@hasmsx403.iil.intel.com> <Mutt.LNX.4.44.0308250112470.21951-100000@excalibur.intercode.com.au> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Mon, 25 Aug 2003 01:15:13 +1000 (EST)
James Morris <jmorris@xxxxxxxxxxxxxxxx> wrote:
> On Sat, 23 Aug 2003, Hen, Shmulik wrote:
>
> > 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;
}
|
| Previous by Date: | why are error messages suppressed if IP_RECVERR is not set?, Chris Friesen |
|---|---|
| Next by Date: | RE: [PATCH] convering bonding driver /proc interface to seq_file, Hen, Shmulik |
| Previous by Thread: | Re: [PATCH] convering bonding driver /proc interface to seq_file, Shmulik Hen |
| Next by Thread: | RE: [PATCH] convering bonding driver /proc interface to seq_file, Hen, Shmulik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |