It is similar to config_parse_uint32_flag(), but drops the specified flag
when true.
return 1;
}
+int config_parse_uint32_invert_flag(
+ 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) {
+
+ uint32_t *flags = ASSERT_PTR(data);
+ int r;
+
+ assert(ltype != 0);
+
+ r = isempty(rvalue) ? 0 : parse_boolean(rvalue);
+ if (r < 0)
+ return log_syntax_parse_error(unit, filename, line, r, lvalue, rvalue);
+
+ SET_FLAG(*flags, ltype, !r);
+ return 1;
+}
+
int config_parse_id128(
const char *unit,
const char *filename,
CONFIG_PARSER_PROTOTYPE(config_parse_iec_uint64_infinity);
CONFIG_PARSER_PROTOTYPE(config_parse_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_uint32_flag);
+CONFIG_PARSER_PROTOTYPE(config_parse_uint32_invert_flag);
CONFIG_PARSER_PROTOTYPE(config_parse_id128);
CONFIG_PARSER_PROTOTYPE(config_parse_tristate);
CONFIG_PARSER_PROTOTYPE(config_parse_string);