Lines Matching refs:dj
2462 DIR dj; local
2464 res = load_obj_xdir(&dj, &dp->obj); /* Load the object status */
2470 res = store_xdir(&dj); /* Store the object status */
3026 DIR dj; local
3031 res = load_obj_xdir(&dj, &dp->obj);
3660 DIR dj; local
3676 dj.obj.fs = fs;
3678 res = follow_path(&dj, path); /* Follow the file path */
3681 if (dj.fn[NSFLAG] & NS_NONAME) { /* Origin directory itself? */
3686 res = chk_lock(&dj, (mode & ~FA_READ) ? 1 : 0); /* Check if the file can be used */
3695 res = enq_lock() ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES;
3697 res = dir_register(&dj);
3703 if (dj.obj.attr & (AM_RDO | AM_DIR)) { /* Cannot overwrite it (R/O or DIR) */
3721 res = store_xdir(&dj);
3731 st_dword(dj.dir + DIR_CrtTime, tm);
3732 st_dword(dj.dir + DIR_ModTime, tm);
3733 cl = ld_clust(fs, dj.dir); /* Get current cluster chain */
3734 dj.dir[DIR_Attr] = AM_ARC; /* Reset attribute */
3735 st_clust(fs, dj.dir, 0); /* Reset file allocation info */
3736 st_dword(dj.dir + DIR_FileSize, 0);
3740 res = remove_chain(&dj.obj, cl, 0);
3751 if (dj.obj.attr & AM_DIR) { /* File open against a directory */
3754 if ((mode & FA_WRITE) && (dj.obj.attr & AM_RDO)) { /* Write mode open against R/O file */
3763 fp->dir_ptr = dj.dir;
3765 fp->obj.lockid = inc_lock(&dj, (mode & ~FA_READ) ? 1 : 0); /* Lock the file for this session */
3771 if (dj.fn[NSFLAG] & NS_NONAME) { /* Is it origin directory itself? */
3774 if (dj.obj.attr & AM_DIR) { /* Is it a directory? */
3784 fp->obj.c_scl = dj.obj.sclust; /* Get containing directory info */
3785 fp->obj.c_size = ((DWORD)dj.obj.objsize & 0xFFFFFF00) | dj.obj.stat;
3786 fp->obj.c_ofs = dj.blk_ofs;
3791 fp->obj.sclust = ld_clust(fs, dj.dir); /* Get object allocation info */
3792 fp->obj.objsize = ld_dword(dj.dir + DIR_FileSize);
4099 DIR dj; local
4103 res = load_obj_xdir(&dj, &fp->obj); /* Load directory entry block */
4113 res = store_xdir(&dj); /* Restore it to the directory */
4213 DIR dj; local
4221 dj.obj.fs = fs;
4223 res = follow_path(&dj, path); /* Follow the path */
4225 if (dj.fn[NSFLAG] & NS_NONAME) { /* Is it the start directory itself? */
4226 fs->cdir = dj.obj.sclust;
4229 fs->cdc_scl = dj.obj.c_scl;
4230 fs->cdc_size = dj.obj.c_size;
4231 fs->cdc_ofs = dj.obj.c_ofs;
4235 if (dj.obj.attr & AM_DIR) { /* It is a sub-directory */
4239 fs->cdc_scl = dj.obj.sclust; /* Save containing directory information */
4240 fs->cdc_size = ((DWORD)dj.obj.objsize & 0xFFFFFF00) | dj.obj.stat;
4241 fs->cdc_ofs = dj.blk_ofs;
4245 fs->cdir = ld_clust(fs, dj.dir); /* Sub-directory cluster */
4273 DIR dj; local
4292 dj.obj.fs = fs;
4298 dj.obj.sclust = fs->cdir; /* Start to follow upper directory from current directory */
4299 while ((ccl = dj.obj.sclust) != 0) { /* Repeat while current directory is a sub-directory */
4300 res = dir_sdi(&dj, 1 * SZDIRE); /* Get parent directory */
4302 res = move_window(fs, dj.sect);
4304 dj.obj.sclust = ld_clust(fs, dj.dir); /* Goto parent directory */
4305 res = dir_sdi(&dj, 0);
4308 res = DIR_READ_FILE(&dj);
4310 if (ccl == ld_clust(fs, dj.dir)) break; /* Found the entry */
4311 res = dir_next(&dj, 0);
4315 get_fileinfo(&dj, &fno); /* Get the directory name and push it to the buffer */
4721 DIR dj; local
4726 res = mount_volume(&path, &dj.obj.fs, 0);
4728 INIT_NAMBUF(dj.obj.fs);
4729 res = follow_path(&dj, path); /* Follow the file path */
4731 if (dj.fn[NSFLAG] & NS_NONAME) { /* It is origin directory */
4734 if (fno) get_fileinfo(&dj, fno);
4740 LEAVE_FF(dj.obj.fs, res);
4897 DIR dj, sdj; local
4909 dj.obj.fs = fs;
4911 res = follow_path(&dj, path); /* Follow the file path */
4912 if (FF_FS_RPATH && res == FR_OK && (dj.fn[NSFLAG] & NS_DOT)) {
4916 if (res == FR_OK) res = chk_lock(&dj, 2); /* Check if it is an open object */
4919 if (dj.fn[NSFLAG] & NS_NONAME) {
4922 if (dj.obj.attr & AM_RDO) {
4935 dclst = ld_clust(fs, dj.dir);
4937 if (dj.obj.attr & AM_DIR) { /* Is it a sub-directory? */
4962 res = dir_remove(&dj); /* Remove the directory entry */
4967 res = remove_chain(&dj.obj, dclst, 0);
4991 DIR dj; local
5000 dj.obj.fs = fs;
5002 res = follow_path(&dj, path); /* Follow the file path */
5004 if (FF_FS_RPATH && res == FR_NO_FILE && (dj.fn[NSFLAG] & NS_DOT)) { /* Invalid name? */
5025 fs->win[SZDIRE + 1] = '.'; pcl = dj.obj.sclust;
5029 res = dir_register(&dj); /* Register the object to the parent directoy */
5041 res = store_xdir(&dj);
5045 st_dword(dj.dir + DIR_ModTime, tm); /* Created time */
5046 st_clust(fs, dj.dir, dcl); /* Table start cluster */
5047 dj.dir[DIR_Attr] = AM_DIR; /* Attribute */
5187 DIR dj; local
5194 dj.obj.fs = fs;
5196 res = follow_path(&dj, path); /* Follow the file path */
5197 …if (res == FR_OK && (dj.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check object…
5203 res = store_xdir(&dj);
5207 … dj.dir[DIR_Attr] = (attr & mask) | (dj.dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */
5233 DIR dj; local
5240 dj.obj.fs = fs;
5242 res = follow_path(&dj, path); /* Follow the file path */
5243 …if (res == FR_OK && (dj.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check object…
5248 res = store_xdir(&dj);
5252 st_dword(dj.dir + DIR_ModTime, (DWORD)fno->fdate << 16 | fno->ftime);
5281 DIR dj; local
5291 dj.obj.fs = fs; dj.obj.sclust = 0; /* Open root directory */
5292 res = dir_sdi(&dj, 0);
5294 res = DIR_READ_LABEL(&dj); /* Find a volume label entry */
5301 …for (si = di = hs = 0; si < dj.dir[XDIR_NumLabel]; si++) { /* Extract volume label from 83 entry */
5302 wc = ld_word(dj.dir + XDIR_Label + si * 2);
5318 wc = dj.dir[si++];
5320 if (dbc_1st((BYTE)wc) && si < 11) wc = wc << 8 | dj.dir[si++]; /* Is it a DBC? */
5376 DIR dj; local
5438 dj.obj.fs = fs; dj.obj.sclust = 0; /* Open root directory */
5439 res = dir_sdi(&dj, 0);
5441 res = DIR_READ_LABEL(&dj); /* Get volume label entry */
5444 dj.dir[XDIR_NumLabel] = (BYTE)di; /* Change the volume label */
5445 memcpy(dj.dir + XDIR_Label, dirvn, 22);
5448 memcpy(dj.dir, dirvn, 11); /* Change the volume label */
5450 dj.dir[DIR_Name] = DDEM; /* Remove the volume label */
5459 res = dir_alloc(&dj, 1); /* Allocate an entry */
5461 memset(dj.dir, 0, SZDIRE); /* Clean the entry */
5463 dj.dir[XDIR_Type] = ET_VLABEL; /* Create volume label entry */
5464 dj.dir[XDIR_NumLabel] = (BYTE)di;
5465 memcpy(dj.dir + XDIR_Label, dirvn, 22);
5467 dj.dir[DIR_Attr] = AM_VOL; /* Create volume label entry */
5468 memcpy(dj.dir, dirvn, 11);