[Linuxptp-devel] [PATCH v4 10/11] pmc: Convert internal helper function into global method.
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Richard C. <ric...@gm...> - 2023-01-28 22:44:12
|
The function to set the alternate time offset name, a.k.a. time zone, will
be used by the time zone stand alone program. Make the function into a
public PMC method.
Signed-off-by: Richard Cochran <ric...@gm...>
---
pmc_common.c | 5 ++---
pmc_common.h | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pmc_common.c b/pmc_common.c
index 6cab5e0..539e812 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -79,7 +79,6 @@ static void do_get_action(struct pmc *pmc, int action, int index, char *str);
static void do_set_action(struct pmc *pmc, int action, int index, char *str);
static void not_supported(struct pmc *pmc, int action, int index, char *str);
static void null_management(struct pmc *pmc, int action, int index, char *str);
-static int send_set_aton(struct pmc *pmc, int id, uint8_t key, const char *name);
static const char *action_string[] = {
"GET",
@@ -232,7 +231,7 @@ static void do_set_action(struct pmc *pmc, int action, int index, char *str)
idtab[index].name);
break;
}
- send_set_aton(pmc, code, key, display_name);
+ pmc_send_set_aton(pmc, code, key, display_name);
break;
case MID_ALTERNATE_TIME_OFFSET_PROPERTIES:
memset(&atop, 0, sizeof(atop));
@@ -759,7 +758,7 @@ int pmc_send_set_action(struct pmc *pmc, int id, void *data, int datasize)
return 0;
}
-static int send_set_aton(struct pmc *pmc, int id, uint8_t key, const char *name)
+int pmc_send_set_aton(struct pmc *pmc, int id, uint8_t key, const char *name)
{
struct alternate_time_offset_name *aton;
struct management_tlv *mgt;
diff --git a/pmc_common.h b/pmc_common.h
index 8bea2e0..6fb2fae 100644
--- a/pmc_common.h
+++ b/pmc_common.h
@@ -41,6 +41,8 @@ int pmc_send_get_action(struct pmc *pmc, int id);
int pmc_send_set_action(struct pmc *pmc, int id, void *data, int datasize);
+int pmc_send_set_aton(struct pmc *pmc, int id, uint8_t key, const char *name);
+
struct ptp_message *pmc_recv(struct pmc *pmc);
int pmc_target(struct pmc *pmc, struct PortIdentity *pid);
--
2.30.2
|