mirror of
https://github.com/JamesonHuang/OpenWrt_Luci_Lua.git
synced 2025-06-22 19:10:38 +00:00
add r18 plug & testcode & mindmap
This commit is contained in:
28
1_3.test_code/c_test/testMainArgv/plug_helloworld
Executable file
28
1_3.test_code/c_test/testMainArgv/plug_helloworld
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#*************************************************************************
|
||||
# > File Name: testMainArgv.c
|
||||
# > Description:
|
||||
# > Conclusion:
|
||||
# > Author: rh_Jameson
|
||||
# > Created Time: 2016年01月13日 14时51分50秒
|
||||
# ************************************************************************/
|
||||
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 [down|detect|reload|status]
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
start() {
|
||||
./testMainArgv '123' '321' '123321'
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
#down) wifi_updown "disable" "$2";;
|
||||
start) start "$2" "$3" "$4";;
|
||||
--help|help) usage;;
|
||||
*) ubus call network reload; wifi_updown "enable" "$2";;
|
||||
esac
|
Binary file not shown.
@ -1,13 +1,12 @@
|
||||
/*************************************************************************
|
||||
> File Name: testMainArgv.c
|
||||
> File Name: main.c
|
||||
> Description:
|
||||
> Conclusion:
|
||||
> Author: rh_Jameson
|
||||
> Created Time: 2015年07月14日 星期二 12时59分50秒
|
||||
> Created Time: 2016年01月13日 14时51分50秒
|
||||
************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
printf("参数个数= %d\n", argc);
|
||||
|
Reference in New Issue
Block a user