From: "Artem B. Bityuckiy" <abityuckiy@yandex.ru>
To: linux-mtd@lists.infradead.org
Subject: JFFS2 prints
Date: Sat, 13 Nov 2004 14:26:59 +0300 [thread overview]
Message-ID: <4195EF83.8050104@yandex.ru> (raw)
Hello,
I wonder, is there some reasons why JFFS2 doesn't use some macros to
output information? My be in order to be eCos-compatable? Or may be it
is just dirty work and nobody has time to do it?
I mean, why do not we introduce macros like:
/* JFFS2 message */
#define JFFS2MSG(fmt, args...) \
printk(KERN_NOTICE fmt, args);
/* JFFS2 debug message */
#define JFFS2DMSG(level, fmt, args...) \
do { \
if (level <= JFFS2_DEBUG_LEVEL) \
printk(KERN_DEBUG "(%d) %s(): " fmt, level, __FUNCTION__,
args); \
}while(0)
/* JFFS2 warning message */
#define JFFS2EMSG(fmt, args...) \
do { \
printk(KERN_ERR "JFFS2 Warning! %s(): " fmt, __FUNCTION__, args); \
} while(0)
/* JFFS2 error message */
#define JFFS2EMSG(fmt, args...) \
do { \
printk(KERN_ERR "JFFS2 Error! %s(): " fmt, __FUNCTION__, args); \
} while(0)
It is not very readable to use output like this:
D1(printk(KERN_DEBUG "bababa"));
But the main thing why I think it would be nice to introduce macros like
these is that the messages will be a bit standard. I mean that all
errors will have the same prefix. It is useful when you develop JFFS2
with debugging output on. In this case you will just s/JFFS2 Error and
see all the error messages. But currently, it is hard to find all the
error messages in JFFS2 because some of them use prefix "Error", some
just contain the word "failed", etc.
Thanks.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
next reply other threads:[~2004-11-13 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-13 11:26 Artem B. Bityuckiy [this message]
2004-11-13 11:38 ` JFFS2 prints David Woodhouse
2004-11-13 11:56 ` Artem B. Bityuckiy
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=4195EF83.8050104@yandex.ru \
--to=abityuckiy@yandex.ru \
--cc=linux-mtd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox