Home
last modified time | relevance | path

Searched refs:f (Results 1 – 25 of 585) sorted by relevance

12345678910>>...24

/systemd-251/test/
Dsys-script.py18 def f(path, mode, contents): function
19 with open(path, "wb") as f:
20 f.write(contents)
35 f('sys/kernel/kexec_crash_loaded', 0o664, b'0\n')
36 f('sys/kernel/kexec_loaded', 0o664, b'0\n')
37 f('sys/kernel/uevent_helper', 0o664, b'\n')
38 f('sys/kernel/vmcoreinfo', 0o664, b'f15380 1000\n')
39 f('sys/kernel/notes', 0o664, b'\x04\x00\x00\x00\x14\x00\x00\x00\x03\x00\x00\x00GNU\x00Z\r!\x804\xc2…
40 f('sys/kernel/uevent_seqnum', 0o664, b'1407\n')
43 f('sys/kernel/slab/kmalloc-96/reclaim_account', 0o664, b'0\n')
[all …]
Dtest-sysusers.sh.in35 echo "**** Unexpected output for $f $2"
40 echo "**** Unexpected output for $f $2"
48 for f in $(ls -1 $SOURCE/test-*.input | sort -V); do
49 echo "*** Running $f"
50 prepare_testdir ${f%.input}
51 cp $f $TESTDIR/usr/lib/sysusers.d/test.conf
54 compare ${f%.*} ""
57 for f in $(ls -1 $SOURCE/test-*.input | sort -V); do
58 echo "*** Running $f on stdin"
59 prepare_testdir ${f%.input}
[all …]
/systemd-251/src/shared/
Dptyfwd.c80 static void pty_forward_disconnect(PTYForward *f) { in pty_forward_disconnect() argument
82 if (!f) in pty_forward_disconnect()
85 f->stdin_event_source = sd_event_source_unref(f->stdin_event_source); in pty_forward_disconnect()
86 f->stdout_event_source = sd_event_source_unref(f->stdout_event_source); in pty_forward_disconnect()
88 f->master_event_source = sd_event_source_unref(f->master_event_source); in pty_forward_disconnect()
89 f->sigwinch_event_source = sd_event_source_unref(f->sigwinch_event_source); in pty_forward_disconnect()
90 f->event = sd_event_unref(f->event); in pty_forward_disconnect()
92 if (f->output_fd >= 0) { in pty_forward_disconnect()
93 if (f->saved_stdout) in pty_forward_disconnect()
94 (void) tcsetattr(f->output_fd, TCSANOW, &f->saved_stdout_attr); in pty_forward_disconnect()
[all …]
Dgenerator.c32 FILE *f; in generator_open_unit_file() local
37 r = fopen_unlocked(unit, "wxe", &f); in generator_open_unit_file()
49 fprintf(f, in generator_open_unit_file()
53 *file = f; in generator_open_unit_file()
81 _cleanup_fclose_ FILE *f = NULL; in write_fsck_sysroot_service() local
105 f = fopen(fn, "wxe"); in write_fsck_sysroot_service()
106 if (!f) in write_fsck_sysroot_service()
109 fprintf(f, in write_fsck_sysroot_service()
133 r = fflush_and_check(f); in write_fsck_sysroot_service()
141 FILE *f, in generator_write_fsck_deps() argument
[all …]
/systemd-251/test/fuzz/fuzz-network-parser/
Doss-fuzz-2389528f . Q/ft Q/f Q . - 1 Q,/ ff /ff[Network - f /, / WSL/ df /- - 0 Q, \ / f,/ ff ///////////////////…
/systemd-251/src/libsystemd/sd-journal/
Djournal-authenticate.c16 static uint64_t journal_file_tag_seqnum(JournalFile *f) { in journal_file_tag_seqnum() argument
19 assert(f); in journal_file_tag_seqnum()
21 r = le64toh(f->header->n_tags) + 1; in journal_file_tag_seqnum()
22 f->header->n_tags = htole64(r); in journal_file_tag_seqnum()
27 int journal_file_append_tag(JournalFile *f) { in journal_file_append_tag() argument
32 assert(f); in journal_file_append_tag()
34 if (!JOURNAL_HEADER_SEALED(f->header)) in journal_file_append_tag()
37 if (!f->hmac_running) in journal_file_append_tag()
40 assert(f->hmac); in journal_file_append_tag()
42 r = journal_file_append_object(f, OBJECT_TAG, sizeof(struct TagObject), &o, &p); in journal_file_append_tag()
[all …]
Djournal-file.c94 int journal_file_tail_end_by_pread(JournalFile *f, uint64_t *ret_offset) { in journal_file_tail_end_by_pread() argument
98 assert(f); in journal_file_tail_end_by_pread()
99 assert(f->header); in journal_file_tail_end_by_pread()
105 p = le64toh(f->header->tail_object_offset); in journal_file_tail_end_by_pread()
107 p = le64toh(f->header->header_size); in journal_file_tail_end_by_pread()
112 r = journal_file_read_object_header(f, OBJECT_UNUSED, p, &tail); in journal_file_tail_end_by_pread()
132 int journal_file_tail_end_by_mmap(JournalFile *f, uint64_t *ret_offset) { in journal_file_tail_end_by_mmap() argument
136 assert(f); in journal_file_tail_end_by_mmap()
137 assert(f->header); in journal_file_tail_end_by_mmap()
142 p = le64toh(f->header->tail_object_offset); in journal_file_tail_end_by_mmap()
[all …]
Dmmap-cache.c144 _pure_ static bool window_matches_fd(Window *w, MMapFileDescriptor *f, uint64_t offset, size_t size… in window_matches_fd() argument
146 assert(f); in window_matches_fd()
149 w->fd == f && in window_matches_fd()
153 static Window *window_add(MMapCache *m, MMapFileDescriptor *f, bool keep_always, uint64_t offset, s… in window_add() argument
157 assert(f); in window_add()
175 .fd = f, in window_add()
182 LIST_PREPEND(by_fd, f->windows, w); in window_add()
265 MMapFileDescriptor *f, in try_context() argument
272 assert(f); in try_context()
273 assert(f->cache); in try_context()
[all …]
Djournal-verify.c113 static int hash_payload(JournalFile *f, Object *o, uint64_t offset, const uint8_t *src, uint64_t si… in hash_payload() argument
135 *res_hash = journal_file_hash_data(f, b, b_size); in hash_payload()
137 *res_hash = journal_file_hash_data(f, src, size); in hash_payload()
142 static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o) { in journal_file_object_verify() argument
143 assert(f); in journal_file_object_verify()
181 r = hash_payload(f, o, offset, o->data.payload, in journal_file_object_verify()
220 r = hash_payload(f, o, offset, o->field.payload, in journal_file_object_verify()
393 static int contains_uint64(MMapFileDescriptor *f, uint64_t n, uint64_t p) { in contains_uint64() argument
397 assert(f); in contains_uint64()
407 … r = mmap_cache_fd_get(f, 0, false, c * sizeof(uint64_t), sizeof(uint64_t), NULL, (void **) &z); in contains_uint64()
[all …]
Djournal-file.h142 int journal_file_set_offline_thread_join(JournalFile *f);
144 int journal_file_fstat(JournalFile *f);
187 int journal_file_move_to_object(JournalFile *f, ObjectType type, uint64_t offset, Object **ret);
188 int journal_file_read_object_header(JournalFile *f, ObjectType type, uint64_t offset, Object *ret);
190 int journal_file_tail_end_by_pread(JournalFile *f, uint64_t *ret_offset);
191 int journal_file_tail_end_by_mmap(JournalFile *f, uint64_t *ret_offset);
197 int journal_file_append_object(JournalFile *f, ObjectType type, uint64_t size, Object **ret, uint64…
199 JournalFile *f,
207 int journal_file_find_data_object(JournalFile *f, const void *data, uint64_t size, Object **ret, ui…
208 int journal_file_find_data_object_with_hash(JournalFile *f, const void *data, uint64_t size, uint64…
[all …]
/systemd-251/src/journal/
Dmanaged-journal-file.c22 static int managed_journal_file_truncate(JournalFile *f) { in managed_journal_file_truncate() argument
27 r = journal_file_tail_end_by_pread(f, &p); in managed_journal_file_truncate()
32 f->header->arena_size = htole64(p - le64toh(f->header->header_size)); in managed_journal_file_truncate()
34 if (ftruncate(f->fd, p) < 0) in managed_journal_file_truncate()
35 return log_debug_errno(errno, "Failed to truncate %s: %m", f->path); in managed_journal_file_truncate()
37 return journal_file_fstat(f); in managed_journal_file_truncate()
40 static int managed_journal_file_entry_array_punch_hole(JournalFile *f, uint64_t p, uint64_t n_entri… in managed_journal_file_entry_array_punch_hole() argument
49 r = journal_file_read_object_header(f, OBJECT_ENTRY_ARRAY, q, &o); in managed_journal_file_entry_array_punch_hole()
76 if (p == le64toh(f->header->tail_object_offset) && !JOURNAL_HEADER_SEALED(f->header)) { in managed_journal_file_entry_array_punch_hole()
81 n = pwrite(f->fd, &o, sizeof(EntryArrayObject), p); in managed_journal_file_entry_array_punch_hole()
[all …]
/systemd-251/src/libsystemd/sd-bus/
Dbus-dump.c49 _public_ int sd_bus_message_dump(sd_bus_message *m, FILE *f, uint64_t flags) { in sd_bus_message_dump() argument
55 if (!f) in sd_bus_message_dump()
56 f = stdout; in sd_bus_message_dump()
64 fprintf(f, in sd_bus_message_dump()
83 fprintf(f, " Cookie=-1"); in sd_bus_message_dump()
85 fprintf(f, " Cookie=%" PRIu64, BUS_MESSAGE_COOKIE(m)); in sd_bus_message_dump()
88 fprintf(f, " ReplyCookie=%" PRIu64, m->reply_cookie); in sd_bus_message_dump()
90 … fprintf(f, " Timestamp=\"%s\"\n", strna(FORMAT_TIMESTAMP_STYLE(ts, TIMESTAMP_US_UTC))); in sd_bus_message_dump()
93 fprintf(f, " Sender=%s%s%s", ansi_highlight(), m->sender, ansi_normal()); in sd_bus_message_dump()
95 … fprintf(f, " Destination=%s%s%s", ansi_highlight(), m->destination, ansi_normal()); in sd_bus_message_dump()
[all …]
/systemd-251/src/test/
Dtest-serialize.c17 _cleanup_fclose_ FILE *f = NULL; in TEST() local
19 assert_se(fmkostemp_safe(fn, "r+", &f) == 0); in TEST()
22 assert_se(serialize_item(f, "a", NULL) == 0); in TEST()
23 assert_se(serialize_item(f, "a", "bbb") == 1); in TEST()
24 assert_se(serialize_item(f, "a", "bbb") == 1); in TEST()
25 assert_se(serialize_item(f, "a", long_string) == -EINVAL); in TEST()
26 assert_se(serialize_item(f, long_string, "a") == -EINVAL); in TEST()
27 assert_se(serialize_item(f, long_string, long_string) == -EINVAL); in TEST()
29 rewind(f); in TEST()
32 assert_se(read_line(f, LONG_LINE_MAX, &line1) > 0); in TEST()
[all …]
Dtest-coredump-util.c16 uint64_t f; in TEST() local
17 assert_se(coredump_filter_mask_from_string(n, &f) == 0); in TEST()
18 assert_se(f == 1u << i); in TEST()
23 uint64_t f; in TEST() local
24 assert_se(coredump_filter_mask_from_string("default", &f) == 0); in TEST()
25 assert_se(f == COREDUMP_FILTER_MASK_DEFAULT); in TEST()
27 assert_se(coredump_filter_mask_from_string(" default\tdefault\tdefault ", &f) == 0); in TEST()
28 assert_se(f == COREDUMP_FILTER_MASK_DEFAULT); in TEST()
30 assert_se(coredump_filter_mask_from_string("defaulta", &f) < 0); in TEST()
31 assert_se(coredump_filter_mask_from_string("default defaulta default", &f) < 0); in TEST()
[all …]
Dtest-fileio.c33 FILE *f; in TEST() local
41 assert_se(fmkostemp_safe(t, "w", &f) == 0); in TEST()
63 "thirteen='\\value'", f); in TEST()
65 fflush(f); in TEST()
66 fclose(f); in TEST()
157 _cleanup_pclose_ FILE *f = NULL; in test_one_shell_var() local
161 assert_se(f = popen(cmd, "re")); in test_one_shell_var()
162 assert_se(read_full_stream(f, &from_shell, &sz) >= 0); in test_one_shell_var()
171 FILE *f; in TEST() local
175 assert_se(fmkostemp_safe(t, "w", &f) == 0); in TEST()
[all …]
/systemd-251/src/core/
Dunit-serialize.c16 static int serialize_cgroup_mask(FILE *f, const char *key, CGroupMask mask) { in serialize_cgroup_mask() argument
20 assert(f); in serialize_cgroup_mask()
30 return serialize_item(f, key, s); in serialize_cgroup_mask()
36 static int serialize_markers(FILE *f, unsigned markers) { in serialize_markers() argument
37 assert(f); in serialize_markers()
42 fputs("markers=", f); in serialize_markers()
45 fputs(unit_marker_to_string(m), f); in serialize_markers()
46 fputc('\n', f); in serialize_markers()
93 int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool switching_root) { in unit_serialize() argument
97 assert(f); in unit_serialize()
[all …]
Dmanager-serialize.c19 FILE *f; in manager_open_serialization() local
27 f = take_fdopen(&fd, "w+"); in manager_open_serialization()
28 if (!f) in manager_open_serialization()
31 *ret_f = f; in manager_open_serialization()
48 FILE *f, in manager_serialize_uid_refs_internal() argument
54 assert(f); in manager_serialize_uid_refs_internal()
70 (void) serialize_item_format(f, field_name, UID_FMT, uid); in manager_serialize_uid_refs_internal()
74 static void manager_serialize_uid_refs(Manager *m, FILE *f) { in manager_serialize_uid_refs() argument
75 manager_serialize_uid_refs_internal(f, m->uid_refs, "destroy-ipc-uid"); in manager_serialize_uid_refs()
78 static void manager_serialize_gid_refs(Manager *m, FILE *f) { in manager_serialize_gid_refs() argument
[all …]
/systemd-251/coccinelle/
Dfopen-unlocked.cocci3 expression f, path, options;
5 - f = fopen(path, options);
6 - if (!f)
8 - (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
9 + r = fopen_unlocked(path, options, &f);
13 expression f, path, options;
15 - f = fopen(path, options);
16 - if (!f) {
21 - (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
22 + r = fopen_unlocked(path, options, &f);
[all …]
/systemd-251/src/libsystemd/sd-netlink/
Dnetlink-genl.c30 static GenericNetlinkFamily *genl_family_free(GenericNetlinkFamily *f) { in genl_family_free() argument
31 if (!f) in genl_family_free()
34 if (f->genl) { in genl_family_free()
35 if (f->id > 0) in genl_family_free()
36 hashmap_remove(f->genl->genl_family_by_id, UINT_TO_PTR(f->id)); in genl_family_free()
37 if (f->name) in genl_family_free()
38 hashmap_remove(f->genl->genl_family_by_name, f->name); in genl_family_free()
41 free(f->name); in genl_family_free()
42 hashmap_free(f->multicast_group_by_name); in genl_family_free()
44 return mfree(f); in genl_family_free()
[all …]
/systemd-251/src/basic/
Dfileio.c49 FILE *f = fopen(path, options); in fopen_unlocked() local
50 if (!f) in fopen_unlocked()
53 (void) __fsetlocking(f, FSETLOCKING_BYCALLER); in fopen_unlocked()
55 *ret = f; in fopen_unlocked()
62 FILE *f = fdopen(fd, options); in fdopen_unlocked() local
63 if (!f) in fdopen_unlocked()
66 (void) __fsetlocking(f, FSETLOCKING_BYCALLER); in fdopen_unlocked()
68 *ret = f; in fdopen_unlocked()
89 FILE *f = fdopen(*fd, options); in take_fdopen() local
90 if (!f) in take_fdopen()
[all …]
Dbus-label.c12 const char *f; in bus_label_escape() local
27 for (f = s, t = r; *f; f++) { in bus_label_escape()
32 if (!(*f >= 'A' && *f <= 'Z') && in bus_label_escape()
33 !(*f >= 'a' && *f <= 'z') && in bus_label_escape()
34 !(f > s && *f >= '0' && *f <= '9')) { in bus_label_escape()
36 *(t++) = hexchar(*f >> 4); in bus_label_escape()
37 *(t++) = hexchar(*f); in bus_label_escape()
39 *(t++) = *f; in bus_label_escape()
47 char *bus_label_unescape_n(const char *f, size_t l) { in bus_label_unescape_n() argument
51 assert_return(f, NULL); in bus_label_unescape_n()
[all …]
/systemd-251/src/initctl/
Dinitctl.c186 static int fifo_process(Fifo *f) { in fifo_process() argument
189 assert(f); in fifo_process()
192 l = read(f->fd, in fifo_process()
193 ((uint8_t*) &f->buffer) + f->bytes_read, in fifo_process()
194 sizeof(f->buffer) - f->bytes_read); in fifo_process()
202 f->bytes_read += l; in fifo_process()
203 assert(f->bytes_read <= sizeof(f->buffer)); in fifo_process()
205 if (f->bytes_read == sizeof(f->buffer)) { in fifo_process()
206 request_process(f->server, &f->buffer); in fifo_process()
207 f->bytes_read = 0; in fifo_process()
[all …]
/systemd-251/src/network/
Dnetworkd-state-file.c117 _cleanup_fclose_ FILE *f = NULL; in manager_save() local
248 r = fopen_temporary(m->state_file, &f, &temp_path); in manager_save()
252 (void) fchmod(fileno(f), 0644); in manager_save()
254 fprintf(f, in manager_save()
265 fprintf(f, "ONLINE_STATE=%s\n", online_state_str); in manager_save()
267 ordered_set_print(f, "DNS=", dns); in manager_save()
268 ordered_set_print(f, "NTP=", ntp); in manager_save()
269 ordered_set_print(f, "SIP=", sip); in manager_save()
270 ordered_set_print(f, "DOMAINS=", search_domains); in manager_save()
271 ordered_set_print(f, "ROUTE_DOMAINS=", route_domains); in manager_save()
[all …]
/systemd-251/test/units/
Dtestsuite-22.03.sh8 rm -fr /tmp/{f,F,w}
9 mkdir /tmp/{f,F,w}
16 f /tmp/f/1 0644 - - - -
17 f /tmp/f/2 0644 - - - This string should be written
21 test -f /tmp/f/1; test ! -s /tmp/f/1
29 f /tmp/f/1 0666 daemon daemon - This string should not be written
33 test ! -s /tmp/f/1
38 mkfifo /tmp/f/fifo
39 chmod 644 /tmp/f/fifo
42 f /tmp/f/fifo 0666 daemon daemon - This string should not be written
[all …]
/systemd-251/src/systemd/
Dsd-messages.h31 #define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,be,5f,69,40,50,5a,7…
32 #define SD_MESSAGE_JOURNAL_START_STR SD_ID128_MAKE_STR(f7,73,79,a8,49,0b,40,8b,be,5f,69,40,50,…
33 #define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,97,ce,a6,15,ce,59,c…
34 #define SD_MESSAGE_JOURNAL_STOP_STR SD_ID128_MAKE_STR(d9,3f,b3,c9,c2,4d,45,1a,97,ce,a6,15,ce,…
37 #define SD_MESSAGE_JOURNAL_MISSED SD_ID128_MAKE(e9,bf,28,e6,e8,34,48,1b,b6,f4,8f,54,8a,d1,3…
38 #define SD_MESSAGE_JOURNAL_MISSED_STR SD_ID128_MAKE_STR(e9,bf,28,e6,e8,34,48,1b,b6,f4,8f,54,8a,…
39 #define SD_MESSAGE_JOURNAL_USAGE SD_ID128_MAKE(ec,38,7f,57,7b,84,4b,8f,a9,48,f3,3c,ad,9a,7…
40 #define SD_MESSAGE_JOURNAL_USAGE_STR SD_ID128_MAKE_STR(ec,38,7f,57,7b,84,4b,8f,a9,48,f3,3c,ad,…
46 #define SD_MESSAGE_BACKTRACE SD_ID128_MAKE(1f,4e,0a,44,a8,86,49,93,9a,ae,a3,4f,c6,da,8…
47 #define SD_MESSAGE_BACKTRACE_STR SD_ID128_MAKE_STR(1f,4e,0a,44,a8,86,49,93,9a,ae,a3,4f,c6,…
[all …]

12345678910>>...24