#define ext4_debug(f, a...) \
do { \
printk(KERN_DEBUG "EXT4-fs DEBUG (%s, %d): %s:", \
__FILE__, __LINE__, __func__); \
printk(KERN_DEBUG f, ## a); \
} while (0)
what I dont understand is this
printk(KERN_DEBUG f, ## a);
Could anybody help me to understand what is ## in this line? thank you
Use double quotation marks (“”) around a direct quote. A direct quote is a word- for-word report of what someone else said or wrote. You use the exact words and punctuation of the original. Harriet Jacobs writes, “She sat down, quivering in every limb” (61).
The primary function of quotation marks is to set off and represent exact language (either spoken or written) that has come from somebody else. The quotation mark is also used to designate speech acts in fiction and sometimes poetry.
Single quotation marks are also known as 'quote marks', 'quotes', 'speech marks' or 'inverted commas'. Use them to: show direct speech and the quoted work of other writers.
Its a token for variadic macros(macros with multiple, variable arguments). Its gcc specific directive that allows 0 or more arguments as an input to, after f
in ext4_debug()
. Which means, f
argument is mandatory, a
may or maynot exist.
This is same as printf(const char *fmt,...)
where, fmt
is mandatory, other arguments are optional and dependent on the fmt
. See the last statement in this doc: http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With