Searched defs:suffix (Results 1 - 22 of 22) sorted by relevance

/systemd/src/basic/
H A Ddirent-util.c66 bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) { argument
77 return endswith(de->d_name, suffix);
H A Dconf-files.c39 static int files_add(Hashmap *h, const char *root, const char *path, const char *suffix) { argument
46 assert(suffix);
60 if (!dirent_is_file_with_suffix(de, suffix))
91 static int conf_files_list_strv_internal(char ***strv, const char *suffix, const char *root, char **dirs) { argument
97 assert(suffix);
108 r = files_add(fh, root, *p, suffix);
125 int conf_files_list_strv(char ***strv, const char *suffix, const char *root, const char* const* dirs) { argument
129 assert(suffix);
135 return conf_files_list_strv_internal(strv, suffix, root, copy);
138 int conf_files_list(char ***strv, const char *suffix, cons argument
155 conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, const char *d) argument
[all...]
H A Dparse-util.c116 * In either case we use just K, M, G as suffix, and not Ki,
123 const char *suffix; member in struct:table
206 if (startswith(e, table[i].suffix))
223 p = e + strlen(table[i].suffix);
277 const char *suffix; member in struct:__anon21
298 table[i].suffix);
H A Dunit-name.c228 int unit_name_change_suffix(const char *n, const char *suffix, char **ret) { argument
233 assert(suffix);
239 if (!unit_suffix_is_valid(suffix))
245 b = strlen(suffix);
251 strcpy(mempcpy(s, n, a), suffix);
257 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret) { argument
261 assert(suffix);
270 if (!unit_suffix_is_valid(suffix))
274 s = strappend(prefix, suffix);
276 s = strjoin(prefix, "@", instance, suffix, NUL
513 unit_name_from_path(const char *path, const char *suffix, char **ret) argument
537 unit_name_from_path_instance(const char *prefix, const char *path, const char *suffix, char **ret) argument
672 unit_name_mangle_with_suffix(const char *name, UnitNameMangle allow_globs, const char *suffix, char **ret) argument
[all...]
H A Dstring-util.c185 char *strnappend(const char *s, const char *suffix, size_t b) { argument
189 if (!s && !suffix)
193 return strndup(suffix, b);
195 if (!suffix)
199 assert(suffix);
210 memcpy(r+a, suffix, b);
216 char *strappend(const char *s, const char *suffix) { argument
217 return strnappend(s, suffix, suffix ? strlen(suffix)
[all...]
H A Dstrv.c65 * suffix, not the whole item */
249 int strv_extend_strv_concat(char ***a, char **b, const char *suffix) { argument
256 v = strappend(*s, suffix);
H A Dtime-util.c302 const char *suffix; member in struct:__anon26
379 table[i].suffix);
392 table[i].suffix);
679 const char *suffix; member in struct:__anon28
779 if (startswith(e, table[i].suffix)) {
781 p = e + strlen(table[i].suffix);
811 const char *suffix; member in struct:__anon29
911 if (startswith(e, table[i].suffix)) {
918 p = e + strlen(table[i].suffix);
H A Dcgroup-util.c478 static int join_path_legacy(const char *controller, const char *path, const char *suffix, char **fs) { argument
487 if (isempty(path) && isempty(suffix))
490 t = strjoin("/sys/fs/cgroup/", dn, "/", suffix, NULL);
491 else if (isempty(suffix))
494 t = strjoin("/sys/fs/cgroup/", dn, "/", path, "/", suffix, NULL);
502 static int join_path_unified(const char *path, const char *suffix, char **fs) { argument
507 if (isempty(path) && isempty(suffix))
510 t = strappend("/sys/fs/cgroup/", suffix);
511 else if (isempty(suffix))
514 t = strjoin("/sys/fs/cgroup/", path, "/", suffix, NUL
522 cg_get_path(const char *controller, const char *path, const char *suffix, char **fs) argument
606 cg_get_path_and_check(const char *controller, const char *path, const char *suffix, char **fs) argument
[all...]
/systemd/src/shared/
H A Dimport-util.c58 int import_url_change_last_component(const char *url, const char *suffix, char **ret) { argument
76 s = new(char, (e - url) + strlen(suffix) + 1);
80 strcpy(mempcpy(s, url, e - url), suffix);
H A Ddropin.c182 const char *suffix,
193 assert(suffix);
195 path = strjoin(unit_path, "/", name, suffix, NULL);
210 p = strjoin(unit_path, "/", template, suffix, NULL);
178 unit_file_process_dir( Set *unit_path_cache, const char *unit_path, const char *name, const char *suffix, UnitDependency dependency, dependency_consumer_t consumer, void *arg, char ***strv) argument
H A Dpath-lookup.c81 static int user_data_home_dir(char **dir, const char *suffix) { argument
91 res = strappend(e, suffix);
97 res = strjoin(home, "/.local/share", suffix, NULL);
H A Ddns-domain.c571 int dns_name_endswith(const char *name, const char *suffix) { argument
576 assert(suffix);
579 s = suffix;
603 s = suffix;
1234 /* Determines the common suffix of domain names a and b */
H A Dinstall.c1281 const char *suffix,
1322 path = strjoin(config_path, "/", dst, suffix, n, NULL);
1277 install_info_symlink_wants( UnitFileInstallInfo *i, const char *config_path, char **list, const char *suffix, bool force, UnitFileChange **changes, unsigned *n_changes) argument
/systemd/src/import/
H A Dpull-common.c50 const char *suffix,
102 if (suffix) {
103 b = endswith(de->d_name, suffix);
173 int pull_make_path(const char *url, const char *etag, const char *image_root, const char *prefix, const char *suffix, char **ret) { argument
194 strempty(escaped_etag), strempty(suffix), NULL);
212 strempty(escaped_etag), strempty(suffix), NULL);
45 pull_find_old_etags( const char *url, const char *image_root, int dt, const char *prefix, const char *suffix, char ***etags) argument
/systemd/src/libsystemd/sd-path/
H A Dsd-path.c54 static int from_home_dir(const char *envname, const char *suffix, char **buffer, const char **ret) { argument
59 assert(suffix);
78 cc = strappend(h, suffix);
80 cc = strjoin(h, "/", suffix, NULL);
335 _public_ int sd_path_home(uint64_t type, const char *suffix, char **path) { argument
353 r = sd_path_search(type, suffix, &l);
369 if (!suffix) {
380 suffix += strspn(suffix, "/");
383 cc = strappend(ret, suffix);
564 sd_path_search(uint64_t type, const char *suffix, char ***paths) argument
[all...]
/systemd/src/test/
H A Dtest-unit-name.c87 static void test_unit_name_from_path_one(const char *path, const char *suffix, const char *expected, int ret) { argument
90 assert_se(unit_name_from_path(path, suffix, &t) == ret);
114 static void test_unit_name_from_path_instance_one(const char *pattern, const char *path, const char *suffix, const char *expected, int ret) { argument
117 assert_se(unit_name_from_path_instance(pattern, path, suffix, &t) == ret);
/systemd/src/delta/
H A Ddelta.c366 static int process_suffix(const char *suffix, const char *onlyprefix) { argument
377 assert(suffix);
378 assert(!startswith(suffix, "/"));
379 assert(!strstr(suffix, "//"));
381 dropins = nulstr_contains(have_dropins, suffix);
394 t = strjoin(p, "/", suffix, NULL);
467 /* Strip prefix from the suffix */
469 const char *suffix; local
471 suffix = startswith(arg, p);
472 if (suffix) {
[all...]
/systemd/src/libsystemd/sd-bus/
H A Dbus-dump.c338 const char *prefix, *color, *suffix, *s; local
348 suffix = "";
357 suffix = strjoina(off, "\n");
361 fprintf(f, "%sPID=%s"PID_FMT"%s", prefix, color, c->pid, suffix);
363 fprintf(f, "%sTID=%s"PID_FMT"%s", prefix, color, c->tid, suffix);
366 fprintf(f, "%sPPID=%sn/a%s", prefix, color, suffix);
368 fprintf(f, "%sPPID=%s"PID_FMT"%s", prefix, color, c->ppid, suffix);
371 fprintf(f, "%sTTY=%s%s%s", prefix, color, strna(c->tty), suffix);
377 fprintf(f, "%sUID=%s"UID_FMT"%s", prefix, color, c->uid, suffix);
379 fprintf(f, "%sEUID=%s"UID_FMT"%s", prefix, color, c->euid, suffix);
[all...]
/systemd/src/resolve/
H A Dresolved-dns-trust-anchor.c394 const char *suffix,
402 assert(suffix);
405 r = conf_files_list_nulstr(&files, suffix, NULL, trust_anchor_dirs);
407 return log_error_errno(r, "Failed to enumerate %s trust anchor files: %m", suffix);
392 dns_trust_anchor_load_files( DnsTrustAnchor *d, const char *suffix, int (*loader)(DnsTrustAnchor *d, const char *path, unsigned n, const char *line)) argument
/systemd/src/boot/
H A Dbootctl.c535 static int mkdir_one(const char *prefix, const char *suffix) { argument
538 p = strjoina(prefix, "/", suffix);
824 static int rmdir_one(const char *prefix, const char *suffix) { argument
827 p = strjoina(prefix, "/", suffix);
/systemd/src/network/
H A Dnetworkd-link.c2264 char *suffix; local
2266 /* drop suffix */
2267 suffix = strrchr(network_file, '.');
2268 if (!suffix) {
2272 *suffix = '\0';
/systemd/src/systemctl/
H A Dsystemctl.c2629 static int expand_names(sd_bus *bus, char **names, const char* suffix, char ***ret) { argument
2640 if (suffix)
2641 r = unit_name_mangle_with_suffix(*name, UNIT_NAME_GLOB, suffix, &t);
2721 const char *method, *mode, *one_name, *suffix = NULL; local
2742 suffix = ".target";
2760 r = expand_names(bus, strv_skip(argv, 1), suffix, &names);

Completed in 5927 milliseconds