Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
---
 config.c | 5 ++++-
 port.c   | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/config.c b/config.c
index 4095b33..69e2075 100644
--- a/config.c
+++ b/config.c
@@ -267,7 +267,7 @@ struct config_item config_tab[] = {
        PORT_ITEM_INT("logMinPdelayReqInterval", 0, INT8_MIN, INT8_MAX),
        PORT_ITEM_INT("logSyncInterval", 0, INT8_MIN, INT8_MAX),
        GLOB_ITEM_INT("logging_level", LOG_INFO, PRINT_LEVEL_MIN, 
PRINT_LEVEL_MAX),
-       PORT_ITEM_INT("masterOnly", 0, 0, 1),
+       PORT_ITEM_INT("masterOnly", 0, 0, 1), /*deprecated*/
        GLOB_ITEM_INT("maxStepsRemoved", 255, 2, UINT8_MAX),
        GLOB_ITEM_STR("message_tag", NULL),
        GLOB_ITEM_STR("manufacturerIdentity", "00:00:00"),
@@ -297,6 +297,7 @@ struct config_item config_tab[] = {
        PORT_ITEM_STR("p2p_dst_mac", "01:80:C2:00:00:0E"),
        GLOB_ITEM_STR("revisionData", ";;"),
        GLOB_ITEM_INT("sanity_freq_limit", 200000000, 0, INT_MAX),
+       PORT_ITEM_INT("serverOnly", 0, 0, 1),
        GLOB_ITEM_INT("servo_num_offset_values", 10, 0, INT_MAX),
        GLOB_ITEM_INT("servo_offset_threshold", 0, 0, INT_MAX),
        GLOB_ITEM_STR("slave_event_monitor", ""),
@@ -708,6 +709,8 @@ static void check_deprecated_options(const char **option)
                new_option = "first_step_threshold";
        } else if (!strcmp(*option, "pi_max_frequency")) {
                new_option = "max_frequency";
+       } else if (!strcmp(*option, "masterOnly")) {
+               new_option = "serverOnly";
        } else if (!strcmp(*option, "slaveOnly")) {
                new_option = "clientOnly";
        }
diff --git a/port.c b/port.c
index 0a93c06..a01d9e3 100644
--- a/port.c
+++ b/port.c
@@ -3039,7 +3039,7 @@ struct port *port_open(const char *phc_device,
        p->phc_index = phc_index;
        p->jbod = config_get_int(cfg, interface_name(interface), 
"boundary_clock_jbod");
        transport = config_get_int(cfg, interface_name(interface), 
"network_transport");
-       p->master_only = config_get_int(cfg, interface_name(interface), 
"masterOnly");
+       p->master_only = config_get_int(cfg, interface_name(interface), 
"serverOnly");
        p->bmca = config_get_int(cfg, interface_name(interface), "BMCA");
 
        if (p->bmca == BMCA_NOOP && transport != TRANS_UDS) {
@@ -3048,7 +3048,7 @@ struct port *port_open(const char *phc_device,
                } else if (clock_slave_only(clock)) {
                        p->state_machine = designated_slave_fsm;
                } else {
-                       pr_err("Please enable at least one of masterOnly or 
clientOnly when BMCA == noop.\n");
+                       pr_err("Please enable at least one of serverOnly or 
clientOnly when BMCA == noop.\n");
                        goto err_port;
                }
        } else {
-- 
2.20.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to