Hi Marek
+int debug_log(struct bat_priv *bat_priv, char *fmt, ...) +{
- va_list args;
- char tmp_log_buf[256];
- va_start(args, fmt);
- vscnprintf(tmp_log_buf, sizeof(tmp_log_buf), fmt, args);
- fdebug_log(bat_priv->debug_log, "[%10u] %s",
(jiffies / HZ), tmp_log_buf);
- va_end(args);
Thinking forward to when we try to get multiple meshes working, or are trying to debug why they don't work together...
There will be a ring buffer per mesh. When debugging problems between meshes it is likely both logs will be combined performing a merge based on the timestamp. However at this point you have lost information about which line belongs to which mesh. Could we maybe include the soft interface name in the output?
Also, do you really want to do jiffies / HZ? You are throwing away useful information. Either keep it as jiffies, or scale the remainder to ms and print it as well?
Andrew