From: "Randy.Dunlap" <randy.dunlap@oracle.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Ben Greear <greearb@candelatech.com>, NetDev <netdev@vger.kernel.org>
Subject: Re: How to grab a block of binary data w/out using ioctls?
Date: Tue, 24 Oct 2006 21:52:15 -0700 [thread overview]
Message-ID: <453EED7F.2010806@oracle.com> (raw)
In-Reply-To: <20061025044621.GA32486@havoc.gtf.org>
Jeff Garzik wrote:
> On Tue, Oct 24, 2006 at 09:35:49PM -0700, Randy Dunlap wrote:
>>> Please grep for sysfs_create_bin_file, you will find plenty of examples.
>> Hm, I thought that sysfs binary files were supposed to be
>> for "transparent" blobs of data, not for structured data.
>> E.g., a "firmware" blob would be OK.
>
> Depends. Normally ASCII is greatly preferred, but passing in/out big
> data structures can be a huge pain, thunking to/from ASCII.
>
>
>> And I'm looking at current users. ISTM that this one:
>>
>> arch/ppc/syslib/mv64x60.c:2443: sysfs_create_bin_file(&mv64xxx_device.dev.kobj, &mv64xxx_hs_reg_attr);
>>
>> in its sysfs read function returns a string (binary data converted
>> to a string) instead of returning binary data. Or did I misread it?
>> or misunderstand sysfs binary data?
>
> Yeah, that one shouldn't be using _bin_
Thanks. It's not the only one like that. Also these 3 uses are incorrect AFAICT:
./drivers/firmware/dell_rbu.c:721: rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr);
./drivers/firmware/dell_rbu.c:724: rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr);
./drivers/firmware/dell_rbu.c:727: rc = sysfs_create_bin_file(&rbu_device->dev.kobj,
--
~Randy
next prev parent reply other threads:[~2006-10-25 4:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 0:44 How to grab a block of binary data w/out using ioctls? Ben Greear
2006-10-24 4:54 ` Randy Dunlap
2006-10-24 5:00 ` Jeff Garzik
2006-10-24 5:04 ` Randy.Dunlap
2006-10-25 2:25 ` Ben Greear
2006-10-25 2:47 ` Jeff Garzik
2006-10-25 4:35 ` Randy Dunlap
2006-10-25 4:46 ` Jeff Garzik
2006-10-25 4:52 ` Randy.Dunlap [this message]
2006-10-25 5:01 ` Jeff Garzik
2006-10-25 5:07 ` Randy.Dunlap
2006-10-25 16:30 ` Ben Greear
2006-10-25 12:51 ` Hagen Paul Pfeifer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=453EED7F.2010806@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=greearb@candelatech.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.