/** * _batadv_dbg() - Store debug output with(out) rate limiting * @type: type of debug message * @bat_priv: the bat priv with all the mesh interface information * @ratelimited: whether output should be rate limited * @fmt: format string * @arg: variable arguments
*/ #define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ do { \ struct batadv_priv *__batpriv = (bat_priv); \ if (atomic_read(&__batpriv->log_level) & (type) && \
(!(ratelimited) || net_ratelimit())) \
batadv_debug_log(__batpriv, fmt, ## arg); \
} \ while (0) #else/* !CONFIG_BATMAN_ADV_DEBUG */
__printf(4, 5) staticinlinevoid _batadv_dbg(int type __always_unused, struct batadv_priv *bat_priv __always_unused, int ratelimited __always_unused, constchar *fmt __always_unused, ...)
{
} #endif
/** * batadv_dbg() - Store debug output without rate limiting * @type: type of debug message * @bat_priv: the bat priv with all the mesh interface information * @arg: format string and variable arguments
*/ #define batadv_dbg(type, bat_priv, arg...) \
_batadv_dbg(type, bat_priv, 0, ## arg)
/** * batadv_dbg_ratelimited() - Store debug output with rate limiting * @type: type of debug message * @bat_priv: the bat priv with all the mesh interface information * @arg: format string and variable arguments
*/ #define batadv_dbg_ratelimited(type, bat_priv, arg...) \
_batadv_dbg(type, bat_priv, 1, ## arg)
/** * batadv_info() - Store message in debug buffer and print it to kmsg buffer * @net_dev: the mesh interface net device * @fmt: format string * @arg: variable arguments
*/ #define batadv_info(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \ struct batadv_priv *_batpriv = netdev_priv(_netdev); \
batadv_dbg(BATADV_DBG_ALL, _batpriv, fmt, ## arg); \
pr_info("%s: " fmt, _netdev->name, ## arg); \
} while (0)
/** * batadv_err() - Store error in debug buffer and print it to kmsg buffer * @net_dev: the mesh interface net device * @fmt: format string * @arg: variable arguments
*/ #define batadv_err(net_dev, fmt, arg...) \ do { \ struct net_device *_netdev = (net_dev); \ struct batadv_priv *_batpriv = netdev_priv(_netdev); \
batadv_dbg(BATADV_DBG_ALL, _batpriv, fmt, ## arg); \
pr_err("%s: " fmt, _netdev->name, ## arg); \
} while (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.