1. Listed in TODO.
2. Tree wide replace safe_atou16 with parse_ip_port incase
it's used for ports.
+
+int parse_ip_port(const char *s, uint16_t *ret) {
+ uint16_t l;
+ int r;
+
+ r = safe_atou16(s, &l);
+ if (r < 0)
+ return r;
+
+ if (l == 0)
+ return -EINVAL;
+
+ *ret = (uint16_t) l;
+
+ return 0;
+}
#if 0 /// UNNEEDED by elogind
int parse_nice(const char *p, int *ret);
#endif // 0
#if 0 /// UNNEEDED by elogind
int parse_nice(const char *p, int *ret);
#endif // 0
+
+int parse_ip_port(const char *s, uint16_t *ret);