Search Linux Wireless

Re: [patch 8/9] debugfs: Revamp debugfs_create_{u,x,s}{8,16,32,64} to support signed integers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-12-17 at 01:20 +0100, mattias.nissler@xxxxxx wrote:
> This makes debugfs use its own file_operations for the value accessor files
> created by debugfs_create_XXX. Having that, we can also have proper versions
> for signed integers.

I think I'd probably prefer if this didn't duplicate all the fs/libfs.c
simple attribute functionality but extended libfs instead to define
attributes that can have their own print/scan functions. Or something
like that.

As far as I can tell, the only reason you're doing this huge amount of
code duplication is the "(unsigned long long)" cast in fs/libfs.c, or am
I missing something?

You might even be able to get around that: define the get() function in
simple_attr to return unsigned long long (rather than u64 as it does
now) and then remove the cast. Then, %lld will still print a negative
number if applicable.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux