From ee381afcd6b850003969d90b07323f5a5c190af8 Mon Sep 17 00:00:00 2001 From: leimingsheng Date: Fri, 25 Jul 2025 15:36:53 +0800 Subject: [PATCH] =?UTF-8?q?perf(master=20:=20nicsensor)=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E9=83=A8=E5=88=86=E5=8F=98=E9=87=8F=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=BC=BA=E8=84=9A=E6=9C=AC=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nicsensor.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nicsensor.sh b/nicsensor.sh index 1c135bf..71bd6c9 100755 --- a/nicsensor.sh +++ b/nicsensor.sh @@ -340,13 +340,13 @@ init_debuglog(){ fmt_print "log" $INFO "Debug Mode : $DEBUG_MODE" fmt_print "log" $INFO "Disable Detect : $DISABLE_DETECT" - if [ "$nic_slot" = "detect" ];then + if [ "$Param1" = "detect" ];then fmt_print "log" $INFO "Operation Type : i2c detect" - elif [ "$nic_slot" = "version" ];then + elif [ "$Param1" = "version" ];then fmt_print "log" $INFO "Operation Type : get version" - elif [ "$nic_slot" = "get" ];then + elif [ "$Param1" = "get" ];then fmt_print "log" $INFO "Operation Type : get property value" - elif [ "$nic_slot" = "set" ];then + elif [ "$Param1" = "set" ];then fmt_print "log" $INFO "Operation Type : set property value" elif [ $param_num -lt 2 ];then fmt_print "log" $INFO "Operation Type : help info" @@ -419,7 +419,7 @@ pre_exec_hook(){ fi # is param legel? - if [ "$sensor_type" = "chip" ];then + if [ "$Param2" = "chip" ];then if [ $param_num -le 3 ];then fmt_print "console" $ERROR "Command Format illegal" echo "Command Format : ./nicsensor.sh [slot] chip [slave] [i2c_command]" @@ -428,7 +428,7 @@ pre_exec_hook(){ fi # if the action is fru write, need pre-process fru data - if [ "$sensor_type" = "fru" ];then + if [ "$Param2" = "fru" ];then if [ "$option_data" = "write" ];then fmt_print "log" $INFO "Opreation FRU Write"