hj.shao | fe9d002 | 2025-06-11 20:22:48 -0700 | [diff] [blame^] | 1 | #include "gsw_sys_interface.h" |
| 2 | |
| 3 | int gsw_sys_svr_ftp_start(const char *cfg) |
| 4 | { |
| 5 | int ret = GSW_HAL_SUCCESS; |
| 6 | (void)cfg; |
| 7 | ret = system("/etc/init.d/vsftpd start"); |
| 8 | if(ret != 0) |
| 9 | return GSW_HAL_NORMAL_FAIL; |
| 10 | |
| 11 | return GSW_HAL_SUCCESS; |
| 12 | } |
| 13 | |
| 14 | int gsw_sys_svr_ftp_stop() |
| 15 | { |
| 16 | int ret = GSW_HAL_SUCCESS; |
| 17 | ret = system("/etc/init.d/vsftpd stop"); |
| 18 | return ret; |
| 19 | } |
| 20 | |
| 21 | int gsw_sys_svr_ssh_start(const char *cfg) |
| 22 | { |
| 23 | int ret= GSW_HAL_SUCCESS; |
| 24 | ret = system("/etc/init.d/sshd restart"); |
| 25 | if(ret != 0) |
| 26 | return GSW_HAL_NORMAL_FAIL; |
| 27 | return GSW_HAL_SUCCESS; |
| 28 | } |
| 29 | |
| 30 | int gsw_sys_svr_ssh_stop() |
| 31 | { |
| 32 | int ret = GSW_HAL_SUCCESS; |
| 33 | ret = system("/etc/init.d/sshd stop"); |
| 34 | if(ret != 0) |
| 35 | return GSW_HAL_NORMAL_FAIL; |
| 36 | |
| 37 | return GSW_HAL_SUCCESS; |
| 38 | } |
| 39 | |
| 40 | int gsw_sys_svr_syslog_restart(const char *log_lvl) |
| 41 | { |
| 42 | (void)log_lvl; |
| 43 | return GSW_HAL_NORMAL_FAIL; |
| 44 | } |
| 45 | |
| 46 | |