[qca-ssdk-shell]: fix some uci issues
Change-Id: I843376371870498b3212ef8c2efdbe3c745ba05f
Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
diff --git a/include/fal/fal_qos.h b/include/fal/fal_qos.h
index f79570e..bb1d9fe 100755
--- a/include/fal/fal_qos.h
+++ b/include/fal/fal_qos.h
@@ -55,7 +55,7 @@
typedef struct {
a_uint8_t pcp_group; /* 0: group 0 1: group 1*/
a_uint8_t dscp_group;
- a_int8_t flow_group;
+ a_uint8_t flow_group;
} fal_qos_group_t;
typedef struct {
diff --git a/src/shell/shell_io.c b/src/shell/shell_io.c
index 2e4e897..3ccce63 100755
--- a/src/shell/shell_io.c
+++ b/src/shell/shell_io.c
@@ -14944,9 +14944,11 @@
}
else
{
- rv = cmd_data_check_uint16(cmd, &(entry.age_time), sizeof (a_uint16_t));
+ rv = cmd_data_check_uint16(cmd, &tmp, sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: age time \n");
+ else
+ entry.age_time = tmp;
}
}
while (talk_mode && (SW_OK != rv));
@@ -14967,9 +14969,11 @@
}
else
{
- rv = cmd_data_check_uint16(cmd, &(entry.unit), sizeof (a_uint16_t));
+ rv = cmd_data_check_uint16(cmd, &tmp, sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: age unit \n");
+ else
+ entry.unit = tmp;
}
}
while (talk_mode && (SW_OK != rv));
@@ -15989,10 +15993,12 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.hash_mode_0),
- sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp,
+ sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: hash mode\n");
+ else
+ entry.hash_mode_0 = tmp;
}
}
@@ -16014,10 +16020,12 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.hash_mode_1),
- sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp,
+ sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: hash mode\n");
+ else
+ entry.hash_mode_1 = tmp;
}
}
@@ -16070,10 +16078,12 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.small_ip4ttl),
- sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp,
+ sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: small ttl value\n");
+ else
+ entry.small_ip4ttl = tmp;
}
}
@@ -16095,10 +16105,12 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.small_ip6hoplimit),
- sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp,
+ sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: small hop limit value\n");
+ else
+ entry.small_ip6hoplimit = tmp;
}
}
@@ -18052,10 +18064,12 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.hash_mode_0),
- sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp,
+ sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: hash mode\n");
+ else
+ entry.hash_mode_0 = tmp;
}
}
@@ -18077,10 +18091,12 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.hash_mode_1),
- sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp,
+ sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: hash mode\n");
+ else
+ entry.hash_mode_1 = tmp;
}
}
@@ -18943,9 +18959,11 @@
}
else
{
- rv = cmd_data_check_uint8(cmd, &(entry.key_sel), sizeof (a_uint8_t));
+ rv = cmd_data_check_uint8(cmd, &tmp, sizeof (a_uint32_t));
if (SW_OK != rv)
dprintf("usage: key sel \n");
+ else
+ entry.key_sel = tmp;
}
}
while (talk_mode && (SW_OK != rv));