Displaying 1 result from an estimated 1 matches for "conringp".
2012 Sep 29
5
[PATCH] xen/console: introduce a 'w' debug-key that dumps the console ring
...+ order and NUL terminate */
+ order = get_order_from_bytes(conring_size + 1);
+ buf = alloc_xenheap_pages(order, 0);
+ if ( buf == NULL )
+ {
+ printk("unable to allocate memory!\n");
+ return;
+ }
+
+ c = conringc;
+ sofar = 0;
+ while ( (c != conringp) )
+ {
+ idx = CONRING_IDX_MASK(c);
+ len = conringp - c;
+ if ( (idx + len) > conring_size )
+ len = conring_size - idx;
+ memcpy(buf + sofar, &conring[idx], len);
+ sofar += len;
+ c += len;
+ }
+ buf[sofar] = ''\0'&...