From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: WANG Chao <chaowang@redhat.com>, kexec@lists.infradead.org
Subject: Re: [PATCH] makedumpfile: -v shows if lzo or snappy support enabled or not
Date: Wed, 08 Jan 2014 13:57:13 +0800 [thread overview]
Message-ID: <52CCE8B9.8060008@cn.fujitsu.com> (raw)
In-Reply-To: <20140108054033.GA6109@dhcp-17-89.nay.redhat.com>
Hello chao
On 01/08/2014 01:40 PM, WANG Chao wrote:
> It would be great to have makedumpfile -v to show if lzo or snappy
> support is enabled or not, since --help prints too much and we have to
> scroll back three screens to check it out.
>
> Using "+lzo" to indicate lzo is enabled and vice versa "-lzo" for lzo is
> disabled. Same for snappy.
>
> For exmaple, If lzo and snappy support are enabled,
>
> $ ./makedumpfile -v
> makedumpfile: version 1.5.5 (released on 18 Dec 2013)
> +lzo +snappy
>
> If both of them are disabled,
>
> $ ./makedumpfile -v
> makedumpfile: version 1.5.5 (released on 18 Dec 2013)
> -lzo -snappy
This is weird... we may even think we have lzo/snappy enabled
since an option is always specified with '-'.
My idea is to have "with lzo/snappy enabled" directly appended
when lzo/snappy enabled.
And is it ok to add such info to the version ? I don't know.
kumagai may give the answer.
Thanks.
>
> Signed-off-by: WANG Chao <chaowang@redhat.com>
> ---
> print_info.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/print_info.c b/print_info.c
> index 90b6cee..242b42c 100644
> --- a/print_info.c
> +++ b/print_info.c
> @@ -26,7 +26,17 @@ void
> show_version(void)
> {
> MSG("makedumpfile: version " VERSION " (released on " RELEASE_DATE ")\n");
> - MSG("\n");
> +#ifdef USELZO
> + MSG("+lzo ");
> +#else
> + MSG("-lzo ");
> +#endif
> +#ifdef USESNAPPY
> + MSG("+snappy ");
> +#else
> + MSG("-snappy ");
> +#endif
> + MSG("\n\n");
> }
>
> void
>
--
Thanks.
Zhang Yanfei
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-01-08 5:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 5:40 [PATCH] makedumpfile: -v shows if lzo or snappy support enabled or not WANG Chao
2014-01-08 5:57 ` Zhang Yanfei [this message]
2014-01-08 6:32 ` WANG Chao
-- strict thread matches above, loose matches on Subject: below --
2014-01-09 1:24 Atsushi Kumagai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52CCE8B9.8060008@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=chaowang@redhat.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.