Searched refs:fn (Results 1 - 25 of 49) sorted by relevance

12

/systemd/src/test/
H A Dtest-acl-util.c32 char fn[] = "/tmp/test-empty.XXXXXX"; local
38 fd = mkostemp_safe(fn, O_RDWR|O_CLOEXEC);
44 cmd = strjoina("ls -l ", fn);
47 cmd = strjoina("getfacl -p ", fn);
61 cmd = strjoina("ls -l ", fn);
64 cmd = strjoina("getfacl -p ", fn);
72 cmd = strjoina("ls -l ", fn);
75 cmd = strjoina("getfacl -p ", fn);
78 unlink(fn);
H A Dtest-fileio.c297 char fn[] = "/tmp/test-write_string_stream-XXXXXX"; local
302 fd = mkostemp_safe(fn, O_RDWR);
309 f = freopen(fn, "r+", f);
318 f = freopen(fn, "w+", f);
328 unlink(fn);
332 char fn[] = "/tmp/test-write_string_file-XXXXXX"; local
336 fd = mkostemp_safe(fn, O_RDWR);
339 assert_se(write_string_file(fn, "boohoo", WRITE_STRING_FILE_CREATE) == 0);
344 unlink(fn);
348 char fn[] local
385 char fn[] = "/tmp/test-load_env_file_pairs-XXXXXX"; local
[all...]
H A Dtest-copy.c37 char fn[] = "/tmp/test-copy_file.XXXXXX"; local
42 fd = mkostemp_safe(fn, O_RDWR|O_CLOEXEC);
50 assert_se(write_string_file(fn, "foo bar bar bar foo", WRITE_STRING_FILE_CREATE) == 0);
52 assert_se(copy_file(fn, fn_copy, 0, 0644, 0) == 0);
58 unlink(fn);
/systemd/src/basic/
H A Dfileio-label.h27 int write_string_file_atomic_label(const char *fn, const char *line);
H A Dfileio-label.c27 int write_string_file_atomic_label(const char *fn, const char *line) { argument
30 r = mac_selinux_create_file_prepare(fn, S_IFREG);
34 r = write_string_file(fn, line, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
H A Dfileio.h39 int write_string_file(const char *fn, const char *line, WriteStringFileFlags flags);
41 int read_one_line_file(const char *fn, char **line);
42 int read_full_file(const char *fn, char **contents, size_t *size);
45 int verify_file(const char *fn, const char *blob, bool accept_extra_nl);
81 int write_timestamp_file_atomic(const char *fn, usec_t n);
82 int read_timestamp_file(const char *fn, usec_t *ret);
H A Dfileio.c62 static int write_string_file_atomic(const char *fn, const char *line, bool enforce_newline) { argument
67 assert(fn);
70 r = fopen_temporary(fn, &f, &p);
78 if (rename(p, fn) < 0)
88 int write_string_file(const char *fn, const char *line, WriteStringFileFlags flags) { argument
92 assert(fn);
98 r = write_string_file_atomic(fn, line, !(flags & WRITE_STRING_FILE_AVOID_NEWLINE));
106 f = fopen(fn, "we");
116 fd = open(fn, O_WRONLY|O_CLOEXEC|O_NOCTTY);
145 q = verify_file(fn, lin
152 read_one_line_file(const char *fn, char **line) argument
180 verify_file(const char *fn, const char *blob, bool accept_extra_nl) argument
280 read_full_file(const char *fn, char **contents, size_t *size) argument
1111 const char *fn; local
1143 const char *fn; local
1219 write_timestamp_file_atomic(const char *fn, usec_t n) argument
1233 read_timestamp_file(const char *fn, usec_t *ret) argument
[all...]
H A Dlockfile-util.c102 const char *fn; local
108 fn = basename(p);
109 if (!filename_is_valid(fn))
113 stpcpy(stpcpy(stpcpy(mempcpy(t, p, fn - p), ".#"), fn), ".lck");
H A Dstat-util.c103 int null_or_empty_path(const char *fn) { argument
106 assert(fn);
108 if (stat(fn, &st) < 0)
H A Dxattr-util.c107 char fn[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1]; local
117 xsprintf(fn, "/proc/self/fd/%i", fd);
119 l = getxattr(fn, attribute, value, size);
H A Dstat-util.h46 int null_or_empty_path(const char *fn);
/systemd/src/import/
H A Daufs-util.c33 const char *fn, *original; local
37 fn = fpath + ftwbuf->base;
41 original = startswith(fn, ".wh.");
50 if (!startswith(fn, ".wh..wh.")) {
/systemd/src/nspawn/
H A Dnspawn-cgroup.c35 const char *fn; local
50 FOREACH_STRING(fn,
60 if (fchownat(fd, fn, uid_shift, uid_shift, 0) < 0)
62 "Failed to chown() cgroup file %s, ignoring: %m", fn);
71 const char *fn; local
105 fn = strjoina(tree, cgroup, "/cgroup.procs");
106 (void) mkdir_parents(fn, 0755);
109 r = write_string_file(fn, pid_string, 0);
/systemd/src/journal/
H A Dtest-journal-flush.c31 _cleanup_free_ char *fn = NULL; local
39 fn = strappend(dn, "/test.journal");
41 r = journal_file_open(fn, O_CREAT|O_RDWR, 0644, false, false, NULL, NULL, NULL, &new_journal);
71 unlink(fn);
H A Dtest-journal-verify.c35 static void bit_toggle(const char *fn, uint64_t p) { argument
40 fd = open(fn, O_RDWR|O_CLOEXEC);
54 static int raw_verify(const char *fn, const char *verification_key) { argument
58 r = journal_file_open(fn, O_RDONLY, 0666, true, !!verification_key, NULL, NULL, NULL, &f);
/systemd/src/binfmt/
H A Dbinfmt.c41 _cleanup_free_ char *x = NULL, *fn = NULL; local
53 fn = strappend("/proc/sys/fs/binfmt_misc/", x+1);
54 if (!fn)
57 return write_string_file(fn, "-1", 0);
/systemd/src/shared/
H A Dcgroup-show.c91 char *fn; local
103 fn = strjoina(p, "/cgroup.procs");
104 f = fopen(fn, "re");
129 _cleanup_free_ char *fn = NULL, *p1 = NULL, *last = NULL, *p2 = NULL; local
143 r = cg_mangle_path(path, &fn);
147 d = opendir(fn);
154 k = strjoin(fn, "/", gn, NULL);
H A Dmachine-image.c71 const char *fn, *s; local
80 fn = strjoina(image->name, ".nspawn");
83 l[i] = strappend(s, fn);
90 l[i] = file_in_same_dir(image->path, fn);
452 const char *fn; local
454 fn = strjoina(new_name, ".nspawn");
456 rs = file_in_same_dir(path, fn);
518 const char *fn; local
520 fn = strjoina(new_name, ".raw");
521 new_path = file_in_same_dir(i->path, fn);
563 const char *fn; local
[all...]
H A Dclean-ipc.c300 char fn[1+strlen(de->d_name)+1]; local
318 fn[0] = '/';
319 strcpy(fn+1, de->d_name);
321 if (mq_unlink(fn) < 0) {
327 fn);
/systemd/src/core/
H A Dkmod-setup.c37 const char *fn,
43 log_internalv(LOG_DEBUG, 0, file, line, fn, format, args);
33 systemd_kmod_log( void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) argument
/systemd/src/udev/
H A Dudev-builtin-kmod.c62 _printf_(6,0) static void udev_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) { argument
63 log_internalv(priority, 0, file, line, fn, format, args);
/systemd/src/modules-load/
H A Dmodules-load.c42 const char *fn, const char *format, va_list args) {
45 log_internalv(priority, 0, file, line, fn, format, args);
255 char **fn, **i; local
271 STRV_FOREACH(fn, files) {
272 k = apply_file(ctx, *fn, true);
41 systemd_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) argument
/systemd/src/bus-proxyd/
H A Dtest-bus-xml-policy.c48 static int show_policy(const char *fn) { argument
52 r = policy_load(&p, STRV_MAKE(fn));
54 log_error_errno(r, "Failed to load policy %s: %m", fn);
/systemd/src/libudev/
H A Dlibudev.c51 int priority, const char *file, int line, const char *fn,
227 int priority, const char *file, int line, const char *fn,
225 udev_set_log_fn(struct udev *udev, void (*log_fn)(struct udev *udev, int priority, const char *file, int line, const char *fn, const char *format, va_list args)) argument
/systemd/src/tmpfiles/
H A Dtmpfiles.c296 static bool unix_socket_alive(const char *fn) { argument
297 assert(fn);
302 return !!set_get(unix_sockets, (char*) fn);
626 char fn[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; local
627 xsprintf(fn, "/proc/self/fd/%i", fd);
648 if (chmod(fn, m) < 0)
659 if (chown(fn,
800 char fn[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; local
819 xsprintf(fn, "/proc/self/fd/%i", fd);
822 r = path_set_acl(fn, pat
1112 char **fn; local
2203 read_config_file(const char *fn, bool ignore_enoent) argument
[all...]

Completed in 142 milliseconds

12