Lines Matching refs:res

22 	int res;  in test_mkdir()  local
27 res = sprintf(file_path, "%s/%s", dir_path, file); in test_mkdir()
28 __ASSERT_NO_MSG(res < sizeof(file_path)); in test_mkdir()
41 res = fs_mkdir(dir_path); in test_mkdir()
42 if (res) { in test_mkdir()
43 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
44 return res; in test_mkdir()
47 res = fs_open(&filep, file_path, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
48 if (res) { in test_mkdir()
49 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
50 return res; in test_mkdir()
54 res = test_file_write(&filep, "NOTHING"); in test_mkdir()
55 if (res) { in test_mkdir()
57 return res; in test_mkdir()
60 res = fs_close(&filep); in test_mkdir()
61 if (res) { in test_mkdir()
62 TC_PRINT("Error closing file [%d]\n", res); in test_mkdir()
63 return res; in test_mkdir()
68 return res; in test_mkdir()
73 int res; in test_lsdir() local
82 res = fs_opendir(&dirp, path); in test_lsdir()
83 if (res) { in test_lsdir()
84 TC_PRINT("Error opening dir %s [%d]\n", path, res); in test_lsdir()
85 return res; in test_lsdir()
91 res = fs_readdir(&dirp, &entry); in test_lsdir()
94 if (res || entry.name[0] == 0) { in test_lsdir()
109 return res; in test_lsdir()
114 int res; in test_rmdir() local
125 res = fs_opendir(&dirp, dir_path); in test_rmdir()
126 if (res) { in test_rmdir()
127 TC_PRINT("Error opening dir[%d]\n", res); in test_rmdir()
128 return res; in test_rmdir()
135 res = fs_readdir(&dirp, &entry); in test_rmdir()
138 if (res || entry.name[0] == 0) { in test_rmdir()
144 __ASSERT_NO_MSG(res < sizeof(file_path)); in test_rmdir()
147 res = fs_unlink(file_path); in test_rmdir()
148 if (res) { in test_rmdir()
149 TC_PRINT("Error deleting file/dir [%d]\n", res); in test_rmdir()
151 return res; in test_rmdir()
158 res = fs_unlink(dir_path); in test_rmdir()
159 if (res) { in test_rmdir()
160 TC_PRINT("Error removing dir [%d]\n", res); in test_rmdir()
161 return res; in test_rmdir()
166 return res; in test_rmdir()