comparison src/impl/fs_impl.cbc @ 312:b527f27761bf

tweak
author menikon
date Wed, 05 Feb 2020 15:35:04 +0900 (2020-02-05)
parents b40deb55b7db
children 66a6aedf60f9
comparison
equal deleted inserted replaced
311:b40deb55b7db 312:b527f27761bf
170 __code namecmpfs_impl(struct fs_impl* fs, const char* s, const char* t, __code next(int strncmp_val, ...)) { 170 __code namecmpfs_impl(struct fs_impl* fs, const char* s, const char* t, __code next(int strncmp_val, ...)) {
171 strncmp_val = strncmp(s, t, DIRSIZ); 171 strncmp_val = strncmp(s, t, DIRSIZ);
172 goto next(strncmp_val, ...); 172 goto next(strncmp_val, ...);
173 } 173 }
174 174
175 __code dirlookupfs_impl(struct fs_impl* fs, struct inode* dp, char* name, uint* poff, dirent* de, __code next(...)) { //:skip 175 __code dirlookupfs_impl(struct fs_impl* fs, struct inode* dp, char* name, uint off, uint* poff, dirent* de, __code next(...)) { //:skip
176 if (dp->type != T_DIR) { 176 if (dp->type != T_DIR) {
177 /* 177 /*
178 panic("dirlookup not DIR"); 178 panic("dirlookup not DIR");
179 */ 179 */
180 } 180 }
181 goto dirlookup_loopcheck(fs, dp, name, poff, de, next(...)); 181 Gearef(cbc_context, fs)->off = 0;
182 goto dirlookup_loopcheck(fs, dp, name, off, poff, de, next(...));
182 } 183 }
183 184
184 __code dirlinkfs_impl(struct fs_impl* fs, struct inode* dp, char* name, uint inum, __code next(...)) { 185 __code dirlinkfs_impl(struct fs_impl* fs, struct inode* dp, char* name, uint inum, __code next(...)) {
185 186
186 goto next(...); 187 goto next(...);