?? testmycopy.c
字號:
#include <linux/unistd.h>#include <fcntl.h>#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#define __NR_mycopy 285#define MAXSIZE 100_syscall3(int,mycopy,int,sflie,int,dfile,char *,buffer)int main(int argc, char **argv){int sfile, dfile;char buffer[MAXSIZE];if (argc != 3) { printf( "參數錯誤\n"); exit(-1); }if ((sfile= open(argv[1], O_RDONLY)) == -1) { printf( "文件打開失敗\n"); exit(-1); }if ((dfile =open(argv[2], O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) == -1) { printf("文件打開失敗\n"); exit(-1); }mycopy(sfile,dfile,buffer); return 0;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -