lkml.org 
[lkml]   [2010]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-pm] [RFC] PM_QOS api update to use handles 1/5
On Thu 2010-01-07 12:55:58, mark gross wrote:
> On Wed, Jan 06, 2010 at 08:18:31PM +0100, Pavel Machek wrote:
> > Hi!
> >
> > > > Umm.. passing binary numbers like that... is not exactly good
> > > > interface. Think endianness issues when writing to it from high-level
> > > > language.
> > >
> > > yeah. At the moment I can't recall why I went binary for the ABI,
> > > we can revisit this, but its been in the wild for a few years now :(
> > >
> > > I guess I can do some tricks to see if its a hex string representation
> > > of a number and parse that as well as supporting the s32. i.e. accept
> > > strings "0x0000000" ... "0xFFFFFFFF" and return -EINVAL for anything
> > > else.
> >
> > Maybe you could use length for detection? If they are writing 4 bytes,
> > it is s32, 10 bytes means ascii?
>
> That is what I was thinking + making sure the chars in the string where
> valid hex digits ;) It would be easy to do. Let me know if you think I
> should attempt to roll that into the kernel ABI exposed by this thing.

I think that would be nice, yes.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2010-01-07 22:03    [W:0.047 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site