Lines Matching refs:ret

63     int ret;
68 ret = system(cmd);
69 if (ret == -1) {
75 ret = system(cmd);
76 if (ret == -1) {
90 int ret;
98 ret = fsync(fd);
99 fail_if(ret == -1, "Cannot sync file\n");
101 ret = close(fd);
102 fail_if(ret == -1, "Cannot close file\n");
104 return ret;
109 int ret;
119 ret = chdir(dir_path);
120 fail_if(ret == -1, "Cannot chdir1\n");
122 ret = create_simple_file("bar", "bar");
123 fail_if(ret == -1, "Cannot create file1\n");
126 ret = mkdir("subdir", 0700);
127 fail_if(ret == -1, "Cannot create subdir\n");
129 ret = chdir("subdir");
130 fail_if(ret == -1, "Cannot chdir\n");
132 ret = create_simple_file("foo", "foo");
133 fail_if(ret == -1, "Cannot create file\n");
136 ret = mkdir("subdir2", 0700);
137 fail_if(ret == -1, "Cannot create subdir\n");
139 ret = chdir(origpath);
140 fail_if(ret == -1, "Cannot chdir2\n");
143 ret = chdir(origpath);
144 fail_if(ret == -1, "Cannot chdir\n");
147 ret = remove_tree(dir_path);
148 fail_unless(ret == EOK, "remove_tree failed\n");
151 ret = access(dir_path, F_OK);
152 fail_unless(ret == -1, "directory still there after remove_tree\n");
158 int ret;
168 ret = chdir(dir_path);
169 fail_if(ret == -1, "Cannot chdir1\n");
171 ret = create_simple_file("bar", "bar");
172 fail_if(ret == -1, "Cannot create file1\n");
175 ret = mkdir("subdir", 0700);
176 fail_if(ret == -1, "Cannot create subdir\n");
178 ret = chdir("subdir");
179 fail_if(ret == -1, "Cannot chdir\n");
181 ret = create_simple_file("foo", "foo");
182 fail_if(ret == -1, "Cannot create file\n");
185 ret = mkdir("subdir2", 0700);
186 fail_if(ret == -1, "Cannot create subdir\n");
188 ret = chdir(origpath);
189 fail_if(ret == -1, "Cannot chdir2\n");
192 ret = chdir(origpath);
193 fail_if(ret == -1, "Cannot chdir\n");
196 ret = remove_subtree(dir_path);
197 fail_unless(ret == EOK, "remove_subtree failed\n");
200 ret = access(dir_path, F_OK);
201 fail_unless(ret == 0, "directory was deleted\n");
203 ret = rmdir(dir_path);
204 fail_unless(ret == 0, "unable to delete root directory\n");
210 int ret;
220 ret = chdir(dir_path);
221 fail_if(ret == -1, "Cannot chdir1\n");
223 ret = create_simple_file("bar", "bar");
224 fail_if(ret == -1, "Cannot create file1\n");
227 ret = mkdir("subdir", 0700);
228 fail_if(ret == -1, "Cannot create subdir\n");
230 ret = chdir("subdir");
231 fail_if(ret == -1, "Cannot chdir\n");
233 ret = create_simple_file("foo", "foo");
234 fail_if(ret == -1, "Cannot create file\n");
237 ret = chdir(origpath);
238 fail_if(ret == -1, "Cannot chdir\n");
243 ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
244 fail_unless(ret == EOK, "copy_tree failed\n");
247 ret = access(dst_path, F_OK);
248 fail_unless(ret == 0, "destination directory not there\n");
251 ret = check_and_open_readonly(tmp, &fd, uid, gid, S_IFREG|S_IRWXU, 0);
252 fail_unless(ret == EOK, "Cannot open %s\n", tmp);
261 int ret;
272 ret = chdir(dir_path);
273 fail_if(ret == -1, "Cannot chdir1\n");
275 ret = create_simple_file("foo", "foo");
276 fail_if(ret == -1, "Cannot create foo\n");
281 ret = chdir(origpath);
282 fail_if(ret == -1, "Cannot chdir1\n");
287 ret = copy_file_secure(foo_path, bar_path, 0700, uid, gid, 0);
288 fail_unless(ret == EOK, "copy_file_secure failed\n");
291 ret = access(bar_path, F_OK);
292 fail_unless(ret == 0, "destination file 'bar' not there\n");
294 ret = check_and_open_readonly(bar_path, &fd, uid, gid, S_IFREG|S_IRWXU, 0);
295 fail_unless(ret == EOK, "Cannot open %s\n", bar_path);
303 int ret;
313 ret = chdir(dir_path);
314 fail_if(ret == -1, "Cannot chdir\n");
316 ret = create_simple_file("footarget", "foo");
317 fail_if(ret == -1, "Cannot create file\n");
319 ret = symlink("footarget", "foolink");
320 fail_if(ret == -1, "Cannot create symlink\n");
323 ret = chdir(origpath);
324 fail_if(ret == -1, "Cannot chdir\n");
329 ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
330 fail_unless(ret == EOK, "copy_tree failed\n");
333 ret = access(dst_path, F_OK);
334 fail_unless(ret == 0, "destination directory not there\n");
337 ret = lstat(tmp, &statbuf);
338 fail_unless(ret == 0, "cannot stat the symlink %s\n", tmp);
346 int ret;
355 ret = chdir(dir_path);
356 fail_if(ret == -1, "Cannot chdir\n");
358 ret = mknod("testnode", S_IFIFO | S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH, 0);
359 fail_unless(ret == 0, "cannot stat /dev/null: %s", strerror(errno));
362 ret = chdir(origpath);
363 fail_if(ret == -1, "Cannot chdir\n");
368 ret = copy_tree(dir_path, dst_path, 0700, uid, gid);
369 fail_unless(ret == EOK, "copy_tree failed\n");
372 ret = access(dst_path, F_OK);
373 fail_unless(ret == 0, "destination directory not there\n");
376 ret = access(tmp, F_OK);
377 fail_unless(ret == -1, "special file %s exists, it shouldn't\n", tmp);