[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPXgP12PioibfQhtAB0fCzL1MXmZvfvQqOGu_ZM0D8Sx4Vq7+w@mail.gmail.com>
Date: Wed, 18 Jul 2012 19:27:08 +0200
From: Kay Sievers <kay@...y.org>
To: Vivek Goyal <vgoyal@...hat.com>
Cc: linux kernel mailing list <linux-kernel@...r.kernel.org>,
Kexec Mailing List <kexec@...ts.infradead.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartmann <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] printk: Export struct log size and member offsets through vmcoreinfo
On Wed, Jul 18, 2012 at 7:18 PM, Vivek Goyal <vgoyal@...hat.com> wrote:
> Currently I am not exporting log "level" info as that is a bitfield and
> offsetof() bitfields can't be calculated.
We could make the level the lower 3 bits of the byte, export the byte,
and define that only 3 bits of the byte are valid? Would that help?
> kernel/printk.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> + /*
> + * Export struct log size and field offsets. User space tools can
> + * parse it and detect any changes to structure down the line.
> + */
> + VMCOREINFO_STRUCT_SIZE(log);
> + VMCOREINFO_OFFSET(log, ts_nsec);
> + VMCOREINFO_OFFSET(log, len);
> + VMCOREINFO_OFFSET(log, text_len);
> + VMCOREINFO_OFFSET(log, dict_len);
Ah, nice, that's how you handle exporting structures, it was still on
my list, to find out how all that should look like.
Cc:ing Greg, to pick it up.
Thanks a lot for taking care of it,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists