1 | n_log = read(0, log_buf, sizeof(log_buf)); |
1 2 3 4 5 6 7 8 9 10 11 12 | if(log_fd >= 0) { if( filesize(log_fd) >= f_size) { fclose(log_fd); log_fd = -1; } } if(log_fd == -1) { log_fd = create_new_log(); } |
1 2 | write(log_fd, log_buf, n_log); n_log = read(0, log_buf, sizeof(log_buf)); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |