lkml.org 
[lkml]   [2012]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 7/7] fs, notify: Add procfs fdinfo helper v6

On Saturday 2012-11-17 00:56, Andrew Morton wrote:
>> | pos: 0
>> | flags: 02000000
>> | inotify wd: 3 ino: 9e7e
>> | inotify wd: 2 ino: a111
>> | inotify wd: 1 ino: 6b149[...]
>
>This is a lousy output format. It's sort-of like a sensible set of
>name-value tuples: "name:value name:value name:value" but
>
>c) inotify-wd is secretly printed in decimal while everything else
> is in hex.
>
>What happens if we do something like the below (which will require a
>changelog update)?
>
>@@ -59,7 +59,7 @@ static int show_mark_fhandle(struct seq_
> f.handle.handle_type = ret;
> f.handle.handle_bytes = size * sizeof(u32);
>
>- ret = seq_printf(m, "fhandle-bytes: %8x fhandle-type: %8x f_handle: ",
>+ ret = seq_printf(m, "fhandle-bytes:%x fhandle-type:%x f_handle:",
> f.handle.handle_bytes, f.handle.handle_type);

Why don't we actually make sure to print a 0x prefix when it's hex
and 0 on octal? Then it should be clear what base these lines are in.
(That would also be a good idea for the rest of procfs files, but I
reckon they cannot be easily changed.)


\
 
 \ /
  Last update: 2012-12-10 04:01    [W:0.076 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site