Skip to content

Commit

Permalink
pmc: Convert internal helper function into global method.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
richardcochran committed Feb 25, 2023
1 parent f70a3d6 commit 7e025ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pmc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -233,7 +232,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));
Expand Down Expand Up @@ -762,7 +761,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;
Expand Down
2 changes: 2 additions & 0 deletions pmc_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e025ce

Please sign in to comment.