Lines Matching refs:setup

20                 HomeSetup *setup) {  in home_setup_cifs()  argument
27 assert(setup); in home_setup_cifs()
28 assert(!setup->undo_mount); in home_setup_cifs()
29 assert(setup->root_fd < 0); in home_setup_cifs()
32setup->root_fd = open(user_record_home_directory(h), O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOFOLLOW); in home_setup_cifs()
33 if (setup->root_fd < 0) in home_setup_cifs()
106 setup->undo_mount = true; in home_setup_cifs()
114 if (!setup->undo_mount) in home_setup_cifs()
129 setup->root_fd = open_mkdir_at(AT_FDCWD, j, O_CLOEXEC, 0700); in home_setup_cifs()
130 if (setup->root_fd < 0) in home_setup_cifs()
131 … return log_error_errno(setup->root_fd, "Failed to create CIFS subdirectory: %m"); in home_setup_cifs()
135 if (setup->root_fd < 0) { in home_setup_cifs()
136setup->root_fd = open(j ?: HOME_RUNTIME_WORK_DIR, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOFOLLOW); in home_setup_cifs()
137 if (setup->root_fd < 0) in home_setup_cifs()
141 setup->mount_suffix = TAKE_PTR(cdir); in home_setup_cifs()
148 HomeSetup *setup, in home_activate_cifs() argument
158 assert(setup); in home_activate_cifs()
164 r = home_setup(h, 0, setup, cache, &header_home); in home_activate_cifs()
168 r = home_refresh(h, flags, setup, header_home, cache, NULL, &new_home); in home_activate_cifs()
172 setup->root_fd = safe_close(setup->root_fd); in home_activate_cifs()
174 r = home_move_mount(setup->mount_suffix, hd); in home_activate_cifs()
178 setup->undo_mount = false; in home_activate_cifs()
179 setup->do_drop_caches = false; in home_activate_cifs()
187 int home_create_cifs(UserRecord *h, HomeSetup *setup, UserRecord **ret_home) { in home_create_cifs() argument
193 assert(setup); in home_create_cifs()
206 r = home_setup_cifs(h, HOME_SETUP_CIFS_MKDIR, setup); in home_create_cifs()
210 r = dir_is_empty_at(setup->root_fd, NULL, /* ignore_hidden_or_backup= */ false); in home_create_cifs()
216 r = home_populate(h, setup->root_fd); in home_create_cifs()
220 r = home_sync_and_statfs(setup->root_fd, NULL); in home_create_cifs()