Lines Matching refs:res

17 	int res;  in test_file_open()  local
19 res = open(TEST_FILE, O_CREAT | O_RDWR, 0660); in test_file_open()
20 if (res < 0) { in test_file_open()
21 TC_ERROR("Failed opening file: %d, errno=%d\n", res, errno); in test_file_open()
23 __ASSERT_NO_MSG(res >= 0); in test_file_open()
26 file = res; in test_file_open()
34 off_t res; in test_file_write() local
36 res = lseek(file, 0, SEEK_SET); in test_file_write()
37 if (res != 0) { in test_file_write()
38 TC_PRINT("lseek failed [%d]\n", (int)res); in test_file_write()
60 return res; in test_file_write()
66 off_t res; in test_file_read() local
70 res = lseek(file, 0, SEEK_SET); in test_file_read()
71 if (res != 0) { in test_file_read()
72 TC_PRINT("lseek failed [%d]\n", (int)res); in test_file_read()
96 res = lseek(file, 2, SEEK_SET); in test_file_read()
97 if (res != 2) { in test_file_read()
98 TC_PRINT("lseek failed [%d]\n", (int)res); in test_file_read()
128 int res = 0; in test_file_close() local
131 res = close(file); in test_file_close()
132 if (res < 0) { in test_file_close()
133 TC_ERROR("Failed closing file: %d, errno=%d\n", res, errno); in test_file_close()
135 __ASSERT_NO_MSG(res == 0); in test_file_close()
141 return res; in test_file_close()
146 int res = 0; in test_file_fsync() local
149 return res; in test_file_fsync()
152 res = fsync(file); in test_file_fsync()
153 if (res < 0) { in test_file_fsync()
154 TC_ERROR("Failed to sync file: %d, errno = %d\n", res, errno); in test_file_fsync()
155 res = TC_FAIL; in test_file_fsync()
160 return res; in test_file_fsync()
166 int res = 0; in test_file_fdatasync() local
169 return res; in test_file_fdatasync()
172 res = fdatasync(file); in test_file_fdatasync()
173 if (res < 0) { in test_file_fdatasync()
174 TC_ERROR("Failed to sync file: %d, errno = %d\n", res, errno); in test_file_fdatasync()
175 res = TC_FAIL; in test_file_fdatasync()
180 return res; in test_file_fdatasync()
186 int res = 0; in test_file_truncate() local
190 return res; in test_file_truncate()
193 res = ftruncate(file, truncate_size); in test_file_truncate()
194 if (res) { in test_file_truncate()
195 TC_PRINT("Error truncating file [%d]\n", res); in test_file_truncate()
196 res = TC_FAIL; in test_file_truncate()
201 return res; in test_file_truncate()
206 int res; in test_file_delete() local
208 res = unlink(TEST_FILE); in test_file_delete()
209 if (res) { in test_file_delete()
210 TC_PRINT("Error deleting file [%d]\n", res); in test_file_delete()
211 return res; in test_file_delete()
214 return res; in test_file_delete()