spin_unlock_irqrestore(&target_list_lock, flags);
}
+static void send_msg_udp(struct netconsole_target *nt, const char *msg,
+ unsigned int len)
+{
+ const char *tmp = msg;
+ int frag, left = len;
+
+ while (left > 0) {
+ frag = min(left, MAX_PRINT_CHUNK);
+ send_udp(nt, tmp, frag);
+ tmp += frag;
+ left -= frag;
+ }
+}
+
static void write_msg(struct console *con, const char *msg, unsigned int len)
{
- int frag, left;
unsigned long flags;
struct netconsole_target *nt;
- const char *tmp;
if (oops_only && !oops_in_progress)
return;
* at least one target if we die inside here, instead
* of unnecessarily keeping all targets in lock-step.
*/
- tmp = msg;
- for (left = len; left;) {
- frag = min(left, MAX_PRINT_CHUNK);
- send_udp(nt, tmp, frag);
- tmp += frag;
- left -= frag;
- }
+ send_msg_udp(nt, msg, len);
}
}
spin_unlock_irqrestore(&target_list_lock, flags);