schar_io.c
来自「Linux程序设计(原书第2版)源码」· C语言 代码 · 共 28 行
C
28 行
#include <stdio.h>#include <fcntl.h>#include <sys/ioctl.h>#include "schar.h"int main(int argc, char *argv[]){ int fd = open("/dev/schar", O_RDWR); /* complain if the open failed */ if (fd == -1) { perror("open"); return 1; } /* complain if the ioctl call failed */ if (ioctl(fd, SCHAR_TOGGLE_DEBUG) == -1) { perror("ioctl"); return 2; } printf("Schar debug toggled\n"); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?