From: Karel Zak <kzak@redhat.com>
To: Davidlohr Bueso <dave@gnu.org>
Cc: Petr Uzel <petr.uzel@suse.cz>, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 6/6] fdisk: add debug support
Date: Wed, 23 May 2012 11:46:08 +0200 [thread overview]
Message-ID: <20120523094608.GB1297@x2.net.home> (raw)
In-Reply-To: <1337632345.2596.7.camel@offbook>
On Mon, May 21, 2012 at 10:32:25PM +0200, Davidlohr Bueso wrote:
> fdisk/fdisk.c | 2 ++
> fdisk/fdisk.h | 27 +++++++++++++++++++++++++++
> fdisk/utils.c | 33 ++++++++++++++++++++++++++++++++-
> 3 files changed, 61 insertions(+), 1 deletions(-)
Applied, thanks.
> +void fdisk_init_debug(int mask)
> +{
> + if (fdisk_debug_mask & FDISK_DEBUG_INIT)
> + return;
> + if (!mask) {
> + char *str = getenv("FDISK_DEBUG");
> + if (str)
> + fdisk_debug_mask = strtoul(str, 0, 0);
> + } else
> + fdisk_debug_mask = mask;
> +
> + if (fdisk_debug_mask)
> + printf("fdisk: debug mask set to 0x%04x.\n",
> + fdisk_debug_mask);
this is bug (in libmount too), the message should be printed to
stderr as all others debug messages.
I have added dbgprint() inline function to standardize the output, so
> + DBG(CONTEXT, printf("opened %s as read-only\n", fname));
should be
DBG(CONTEXT, dbgprint("opened %s as read-only", fname));
All the changes are already pushed to the repository.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2012-05-23 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-20 16:11 [PATCH 6/6] fdisk: add debug support Davidlohr Bueso
2012-05-21 20:32 ` Davidlohr Bueso
2012-05-23 9:46 ` Karel Zak [this message]
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=20120523094608.GB1297@x2.net.home \
--to=kzak@redhat.com \
--cc=dave@gnu.org \
--cc=petr.uzel@suse.cz \
--cc=util-linux@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).