Merge pull request #9185 from marckleinebudde/can

networkd: add support to configure CAN devices
This commit is contained in:
Lennart Poettering
2018-06-11 12:58:55 +02:00
committed by GitHub
12 changed files with 350 additions and 38 deletions
+31
View File
@@ -1203,3 +1203,34 @@ int config_parse_rlimit(
return 0;
}
int config_parse_permille(const char* unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
unsigned *permille = data;
int r;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(permille);
r = parse_permille(rvalue);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r,
"Failed to parse permille value, ignoring: %s", rvalue);
return 0;
}
*permille = (unsigned) r;
return 0;
}
+1
View File
@@ -140,6 +140,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_log_facility);
CONFIG_PARSER_PROTOTYPE(config_parse_log_level);
CONFIG_PARSER_PROTOTYPE(config_parse_signal);
CONFIG_PARSER_PROTOTYPE(config_parse_personality);
CONFIG_PARSER_PROTOTYPE(config_parse_permille);
CONFIG_PARSER_PROTOTYPE(config_parse_ifname);
CONFIG_PARSER_PROTOTYPE(config_parse_ip_port);
CONFIG_PARSER_PROTOTYPE(config_parse_join_controllers);