24 {
25 int ret;
26 char payload[512];
27 char modpath[256];
28
29 if (strcmp(path, "/") == 0)
30 return -EINVAL;
31
32 if (strlen(path) >= sizeof(modpath))
33 return -ENAMETOOLONG;
34 strscpy(modpath, path, sizeof(modpath));
35
36 size_t len = strlen(modpath);
37 if (len > 1 && modpath[len - 1] == '/') {
38 modpath[len - 1] = '\0';
39 }
40
41 scnprintf(payload, sizeof(payload), "%d:%s:%s:%s", hide_line,
42 hide_substr ?: "", src ?: "", dst ?: "");
43
45 if (ret < 0)
46 return ret;
47
49 if (ret < 0)
50 return ret;
51
53}
int ulist_add(struct ulist *ul, const char *value, u32 flags, const char *payload)
int ulist_save(struct ulist *ul)