I working with user mode linux and am using user space to try to get input and output to the console and from the keyboard respectively.
我使用用户模式linux并使用用户空间分别尝试输入和输出到控制台和键盘。
So far I have figured out kind of how to work the output. I was able to print to terminal (not the console) using printk.
到目前为止,我已经找到了如何处理输出的方法。我能够使用printk打印到终端(而不是控制台)。
Any suggestions on how to get input and print output to the console?
有关如何获取输入和打印输出到控制台的任何建议?
Thanks.
1 个解决方案
#1
0
If it is user mode u have stdin and stdout, so u can use printf/scanf from c stdio.h library: http://www.cplusplus.com/reference/cstdio/
如果是用户模式,你有stdin和stdout,所以你可以使用c stdio.h库中的printf / scanf:http://www.cplusplus.com/reference/cstdio/
printk is only for kernel mode!
printk仅用于内核模式!
#1
0
If it is user mode u have stdin and stdout, so u can use printf/scanf from c stdio.h library: http://www.cplusplus.com/reference/cstdio/
如果是用户模式,你有stdin和stdout,所以你可以使用c stdio.h库中的printf / scanf:http://www.cplusplus.com/reference/cstdio/
printk is only for kernel mode!
printk仅用于内核模式!