mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-06 12:00:41 +01:00
ATM,PTM: remove unknown status
This commit is contained in:
parent
20d5f3bf82
commit
d5a55c8f4c
2 changed files with 2 additions and 12 deletions
|
|
@ -231,12 +231,7 @@ static int set_atm_enable(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
static int get_atm_status(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
get_net_device_sysfs(((struct atm_args *)data)->ifname, "operstate", value);
|
||||
if (strcmp(*value, "up") == 0)
|
||||
*value = "Up";
|
||||
else if (strcmp(*value, "down") == 0)
|
||||
*value = "Down";
|
||||
else
|
||||
*value = "Unknown";
|
||||
*value = (strcmp(*value, "up") == 0) ? "Up" : "Down";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,12 +128,7 @@ static int set_ptm_enable(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
static int get_ptm_status(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
get_net_device_sysfs(((struct ptm_args *)data)->ifname, "operstate", value);
|
||||
if (strcmp(*value, "up") == 0)
|
||||
*value = "Up";
|
||||
else if (strcmp(*value, "down") == 0)
|
||||
*value = "Down";
|
||||
else
|
||||
*value = "Unknown";
|
||||
*value = (strcmp(*value, "up") == 0) ? "Up" : "Down";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue