pedit: fix whitespace

Add newlines to break long lines.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Stephen Hemminger 2017-05-01 09:25:22 -07:00
parent 3d2a7781ec
commit 1e600da057
2 changed files with 23 additions and 14 deletions

View File

@ -145,7 +145,8 @@ int pack_key(struct m_pedit_sel *_sel, struct m_pedit_key *tkey)
} else {
if (tkey->htype != TCA_PEDIT_KEY_EX_HDR_TYPE_NETWORK ||
tkey->cmd != TCA_PEDIT_KEY_EX_CMD_SET) {
fprintf(stderr, "Munge parameters not supported. Use 'munge ex'.\n");
fprintf(stderr,
"Munge parameters not supported. Use 'munge ex'.\n");
return -1;
}
}
@ -326,7 +327,8 @@ int parse_cmd(int *argc_p, char ***argv_p, __u32 len, int type, __u32 retain,
tkey->cmd = TCA_PEDIT_KEY_EX_CMD_ADD;
if (!sel->extended && tkey->cmd) {
fprintf(stderr, "Non extended mode. only 'set' command is supported\n");
fprintf(stderr,
"Non extended mode. only 'set' command is supported\n");
return -1;
}
@ -584,7 +586,8 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
if (matches(*argv, "ex") == 0) {
if (ok > 1) {
fprintf(stderr, "'ex' must be before first 'munge'\n");
fprintf(stderr,
"'ex' must be before first 'munge'\n");
explain();
return -1;
}

View File

@ -64,25 +64,31 @@ struct m_pedit_sel {
bool extended;
};
struct m_pedit_util
{
struct m_pedit_util {
struct m_pedit_util *next;
char id[PEDITKINDSIZ];
int (*parse_peopt)(int *argc_p, char ***argv_p,
struct m_pedit_sel *sel, struct m_pedit_key *tkey);
struct m_pedit_sel *sel,
struct m_pedit_key *tkey);
};
extern int pack_key(struct m_pedit_sel *sel, struct m_pedit_key *tkey);
extern int pack_key32(__u32 retain, struct m_pedit_sel *sel, struct m_pedit_key *tkey);
extern int pack_key16(__u32 retain, struct m_pedit_sel *sel, struct m_pedit_key *tkey);
extern int pack_key8(__u32 retain, struct m_pedit_sel *sel, struct m_pedit_key *tkey);
extern int parse_val(int *argc_p, char ***argv_p, __u32 * val, int type);
extern int parse_cmd(int *argc_p, char ***argv_p, __u32 len, int type, __u32 retain,
extern int pack_key32(__u32 retain, struct m_pedit_sel *sel,
struct m_pedit_key *tkey);
extern int pack_key16(__u32 retain, struct m_pedit_sel *sel,
struct m_pedit_key *tkey);
extern int pack_key8(__u32 retain, struct m_pedit_sel *sel,
struct m_pedit_key *tkey);
extern int parse_val(int *argc_p, char ***argv_p, __u32 *val, int type);
extern int parse_cmd(int *argc_p, char ***argv_p, __u32 len, int type,
__u32 retain,
struct m_pedit_sel *sel, struct m_pedit_key *tkey);
extern int parse_offset(int *argc_p, char ***argv_p,
struct m_pedit_sel *sel, struct m_pedit_key *tkey);
int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n);
extern int print_pedit(struct action_util *au,FILE * f, struct rtattr *arg);
extern int pedit_print_xstats(struct action_util *au, FILE *f, struct rtattr *xstats);
int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p,
int tca_id, struct nlmsghdr *n);
extern int print_pedit(struct action_util *au, FILE *f, struct rtattr *arg);
extern int pedit_print_xstats(struct action_util *au, FILE *f,
struct rtattr *xstats);
#endif