Lines Matching refs:dj

2515 				DIR dj;  local
2517 res = load_obj_xdir(&dj, &dp->obj); /* Load the object status */
2523 res = store_xdir(&dj); /* Store the object status */
3096 DIR dj; local
3101 res = load_obj_xdir(&dj, &dp->obj);
3739 DIR dj; local
3755 dj.obj.fs = fs;
3757 res = follow_path(&dj, path); /* Follow the file path */
3760 if (dj.fn[NSFLAG] & NS_NONAME) { /* Origin directory itself? */
3765 res = chk_share(&dj, (mode & ~FA_READ) ? 1 : 0); /* Check if the file can be used */
3774 res = enq_share() ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES;
3776 res = dir_register(&dj);
3782 if (dj.obj.attr & (AM_RDO | AM_DIR)) { /* Cannot overwrite it (R/O or DIR) */
3800 res = store_xdir(&dj);
3810 st_dword(dj.dir + DIR_CrtTime, tm);
3811 st_dword(dj.dir + DIR_ModTime, tm);
3812 cl = ld_clust(fs, dj.dir); /* Get current cluster chain */
3813 dj.dir[DIR_Attr] = AM_ARC; /* Reset attribute */
3814 st_clust(fs, dj.dir, 0); /* Reset file allocation info */
3815 st_dword(dj.dir + DIR_FileSize, 0);
3819 res = remove_chain(&dj.obj, cl, 0);
3830 if (dj.obj.attr & AM_DIR) { /* File open against a directory */
3833 if ((mode & FA_WRITE) && (dj.obj.attr & AM_RDO)) { /* Write mode open against R/O file */
3842 fp->dir_ptr = dj.dir;
3844 fp->obj.lockid = inc_share(&dj, (mode & ~FA_READ) ? 1 : 0); /* Lock the file for this session */
3850 if (dj.fn[NSFLAG] & NS_NONAME) { /* Is it origin directory itself? */
3853 if (dj.obj.attr & AM_DIR) { /* Is it a directory? */
3863 fp->obj.c_scl = dj.obj.sclust; /* Get containing directory info */
3864 fp->obj.c_size = ((DWORD)dj.obj.objsize & 0xFFFFFF00) | dj.obj.stat;
3865 fp->obj.c_ofs = dj.blk_ofs;
3870 fp->obj.sclust = ld_clust(fs, dj.dir); /* Get object allocation info */
3871 fp->obj.objsize = ld_dword(dj.dir + DIR_FileSize);
4178 DIR dj; local
4182 res = load_obj_xdir(&dj, &fp->obj); /* Load directory entry block */
4192 res = store_xdir(&dj); /* Restore it to the directory */
4292 DIR dj; local
4300 dj.obj.fs = fs;
4302 res = follow_path(&dj, path); /* Follow the path */
4304 if (dj.fn[NSFLAG] & NS_NONAME) { /* Is it the start directory itself? */
4305 fs->cdir = dj.obj.sclust;
4308 fs->cdc_scl = dj.obj.c_scl;
4309 fs->cdc_size = dj.obj.c_size;
4310 fs->cdc_ofs = dj.obj.c_ofs;
4314 if (dj.obj.attr & AM_DIR) { /* It is a sub-directory */
4318 fs->cdc_scl = dj.obj.sclust; /* Save containing directory information */
4319 fs->cdc_size = ((DWORD)dj.obj.objsize & 0xFFFFFF00) | dj.obj.stat;
4320 fs->cdc_ofs = dj.blk_ofs;
4324 fs->cdir = ld_clust(fs, dj.dir); /* Sub-directory cluster */
4352 DIR dj; local
4371 dj.obj.fs = fs;
4377 dj.obj.sclust = fs->cdir; /* Start to follow upper directory from current directory */
4378 while ((ccl = dj.obj.sclust) != 0) { /* Repeat while current directory is a sub-directory */
4379 res = dir_sdi(&dj, 1 * SZDIRE); /* Get parent directory */
4381 res = move_window(fs, dj.sect);
4383 dj.obj.sclust = ld_clust(fs, dj.dir); /* Goto parent directory */
4384 res = dir_sdi(&dj, 0);
4387 res = DIR_READ_FILE(&dj);
4389 if (ccl == ld_clust(fs, dj.dir)) break; /* Found the entry */
4390 res = dir_next(&dj, 0);
4394 get_fileinfo(&dj, &fno); /* Get the directory name and push it to the buffer */
4802 DIR dj; local
4807 res = mount_volume(&path, &dj.obj.fs, 0);
4809 INIT_NAMBUF(dj.obj.fs);
4810 res = follow_path(&dj, path); /* Follow the file path */
4812 if (dj.fn[NSFLAG] & NS_NONAME) { /* It is origin directory */
4815 if (fno) get_fileinfo(&dj, fno);
4821 LEAVE_FF(dj.obj.fs, res);
4983 DIR dj, sdj; local
4994 dj.obj.fs = fs;
4996 res = follow_path(&dj, path); /* Follow the file path */
4997 if (FF_FS_RPATH && res == FR_OK && (dj.fn[NSFLAG] & NS_DOT)) {
5001 if (res == FR_OK) res = chk_share(&dj, 2); /* Check if it is an open object */
5004 if (dj.fn[NSFLAG] & NS_NONAME) {
5007 if (dj.obj.attr & AM_RDO) {
5020 dclst = ld_clust(fs, dj.dir);
5022 if (dj.obj.attr & AM_DIR) { /* Is it a sub-directory? */
5047 res = dir_remove(&dj); /* Remove the directory entry */
5052 res = remove_chain(&dj.obj, dclst, 0);
5077 DIR dj; local
5085 dj.obj.fs = fs;
5087 res = follow_path(&dj, path); /* Follow the file path */
5089 if (FF_FS_RPATH && res == FR_NO_FILE && (dj.fn[NSFLAG] & NS_DOT)) { /* Invalid name? */
5110 fs->win[SZDIRE + 1] = '.'; pcl = dj.obj.sclust;
5114 res = dir_register(&dj); /* Register the object to the parent directory */
5126 res = store_xdir(&dj);
5130 st_dword(dj.dir + DIR_ModTime, tm); /* Created time */
5131 st_clust(fs, dj.dir, dcl); /* Table start cluster */
5132 dj.dir[DIR_Attr] = AM_DIR; /* Attribute */
5273 DIR dj; local
5279 dj.obj.fs = fs;
5281 res = follow_path(&dj, path); /* Follow the file path */
5282 …if (res == FR_OK && (dj.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check object…
5288 res = store_xdir(&dj);
5292dj.dir[DIR_Attr] = (attr & mask) | (dj.dir[DIR_Attr] & (BYTE)~mask); /* Apply attribute change */
5319 DIR dj; local
5325 dj.obj.fs = fs;
5327 res = follow_path(&dj, path); /* Follow the file path */
5328 …if (res == FR_OK && (dj.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check object…
5333 res = store_xdir(&dj);
5337 st_dword(dj.dir + DIR_ModTime, (DWORD)fno->fdate << 16 | fno->ftime);
5367 DIR dj; local
5376 dj.obj.fs = fs; dj.obj.sclust = 0; /* Open root directory */
5377 res = dir_sdi(&dj, 0);
5379 res = DIR_READ_LABEL(&dj); /* Find a volume label entry */
5386 …for (si = di = hs = 0; si < dj.dir[XDIR_NumLabel]; si++) { /* Extract volume label from 83 entry */
5387 wc = ld_word(dj.dir + XDIR_Label + si * 2);
5405 wc = dj.dir[si++];
5407 if (dbc_1st((BYTE)wc) && si < 11) wc = wc << 8 | dj.dir[si++]; /* Is it a DBC? */
5466 DIR dj; local
5530 dj.obj.fs = fs; dj.obj.sclust = 0; /* Open root directory */
5531 res = dir_sdi(&dj, 0);
5533 res = DIR_READ_LABEL(&dj); /* Get volume label entry */
5536 dj.dir[XDIR_NumLabel] = (BYTE)di; /* Change the volume label */
5537 memcpy(dj.dir + XDIR_Label, dirvn, 22);
5540 memcpy(dj.dir, dirvn, 11); /* Change the volume label */
5542 dj.dir[DIR_Name] = DDEM; /* Remove the volume label */
5551 res = dir_alloc(&dj, 1); /* Allocate an entry */
5553 memset(dj.dir, 0, SZDIRE); /* Clean the entry */
5555 dj.dir[XDIR_Type] = ET_VLABEL; /* Create volume label entry */
5556 dj.dir[XDIR_NumLabel] = (BYTE)di;
5557 memcpy(dj.dir + XDIR_Label, dirvn, 22);
5559 dj.dir[DIR_Attr] = AM_VOL; /* Create volume label entry */
5560 memcpy(dj.dir, dirvn, 11);