Home
last modified time | relevance | path

Searched refs:lock_fd (Results 1 – 4 of 4) sorted by relevance

/systemd-251/src/core/
Ddynamic-user.c214 _cleanup_close_ int lock_fd = -1; in pick_uid() local
268lock_fd = open(lock_path, O_CREAT|O_RDWR|O_NOFOLLOW|O_CLOEXEC|O_NOCTTY, 0600); in pick_uid()
269 if (lock_fd < 0) in pick_uid()
272 … r = flock(lock_fd, LOCK_EX|LOCK_NB); /* Try to get a BSD file lock on the UID lock file */ in pick_uid()
280 if (fstat(lock_fd, &st) < 0) in pick_uid()
287 lock_fd = safe_close(lock_fd); in pick_uid()
299 l = pwritev(lock_fd, in pick_uid()
310 (void) ftruncate(lock_fd, l); in pick_uid()
314 return TAKE_FD(lock_fd); in pick_uid()
324 int lock_fd; in dynamic_user_pop() local
[all …]
/systemd-251/src/partition/
Dmakefs.c22 _cleanup_close_ int lock_fd = -1; in run() local
48 lock_fd = lock_whole_block_device(st.st_rdev, LOCK_EX); in run()
49 if (lock_fd < 0) in run()
50 … return log_error_errno(lock_fd, "Failed to lock whole block device of \"%s\": %m", device); in run()
/systemd-251/src/shared/
Dblockdev-util.c219 _cleanup_close_ int lock_fd = -1; in lock_whole_block_device() local
233 lock_fd = open(whole_node, O_RDONLY|O_CLOEXEC|O_NONBLOCK); in lock_whole_block_device()
234 if (lock_fd < 0) in lock_whole_block_device()
237 if (flock(lock_fd, operation) < 0) in lock_whole_block_device()
240 return TAKE_FD(lock_fd); in lock_whole_block_device()
Dloop-util.c151 _cleanup_close_ int lock_fd = -1; in loop_configure() local
176 lock_fd = fd_reopen(fd, O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); in loop_configure()
177 if (lock_fd < 0) in loop_configure()
178 return lock_fd; in loop_configure()
179 if (flock(lock_fd, LOCK_EX) < 0) in loop_configure()