📄 xdmesg.c
字号:
#include <xenctrl.h>#include <xenguest.h>#include <stdio.h>#include <errno.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <xs.h>#include <fcntl.h>#include <sys/mman.h>#define RING_SIZE 4096*8int xc;int main(int argc, char** argv){ char* b= (char*) mmap(0,RING_SIZE, PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0,0); char* a = b; unsigned int n=RING_SIZE; int i; xc = xc_interface_open(); xc_readconsolering(xc,&b,&n,1); for(i=0; i<n; i++) if(!isascii(a[i])) a[i]=' '; a[n]='\0'; xc_interface_close(xc); puts(a); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -