Re: [PATCH 1/2] [v2] lib/hexdump: introduce DUMP_PREFIX_UNHASHED for unhashed addresses

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

 



On Sun, Jan 17, 2021 at 12:12 AM Timur Tabi <timur@xxxxxxxxxx> wrote:

(Hint: -v<n> to the git format-patch will create a versioned subject
prefix for you automatically)

> Hashed addresses are useless in hexdumps unless you're comparing
> with other hashed addresses, which is unlikely.  However, there's
> no need to break existing code, so introduce a new prefix type
> that prints unhashed addresses.

Any user of this? (For the record, I don't see any other mail except this one)

...

>  enum {
>         DUMP_PREFIX_NONE,
>         DUMP_PREFIX_ADDRESS,
> -       DUMP_PREFIX_OFFSET
> +       DUMP_PREFIX_OFFSET,
> +       DUMP_PREFIX_UNHASHED,

Since it's an address, I would like to group them together, i.e. put
after DUMP_PREFIX_ADDRESS.
Perhaps even add _ADDRESS to DUMP_PREFIX_UNHASHED, but this maybe too long.

>  };

...

> + * @prefix_type: controls whether prefix of an offset, hashed address,
> + *  unhashed address, or none is printed (%DUMP_PREFIX_OFFSET,
> + *  %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_UNHASHED, %DUMP_PREFIX_NONE)

Yeah, exactly, here you use different ordering.

...

> + * @prefix_type: controls whether prefix of an offset, hashed address,
> + *  unhashed address, or none is printed (%DUMP_PREFIX_OFFSET,
> + *  %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_UNHASHED, %DUMP_PREFIX_NONE)

In both cases I would rather use colon and list one per line. What do you think?

...

> +               case DUMP_PREFIX_UNHASHED:

Here is a third type of ordering, can you please be consistent?

>                 case DUMP_PREFIX_ADDRESS:

...

> + * @prefix_type: controls whether prefix of an offset, hashed address,
> + *  unhashed address, or none is printed (%DUMP_PREFIX_OFFSET,
> + *  %DUMP_PREFIX_ADDRESS, %DUMP_PREFIX_UNHASHED, %DUMP_PREFIX_NONE)

As above.

...

> +               case DUMP_PREFIX_UNHASHED:

As above.

>                 case DUMP_PREFIX_ADDRESS:


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux