Skip to content

Commit d2ec1f3

Browse files
committed
[DFS] remove st_blksize in the struct stat
1 parent 1ac6bc6 commit d2ec1f3

File tree

13 files changed

+5
-19
lines changed

13 files changed

+5
-19
lines changed

bsp/efm32/copy_this_file_dfs_elm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ int dfs_elm_stat(struct dfs_filesystem *fs, const char *path, struct stat *st)
641641

642642
st->st_size = file_info.fsize;
643643
st->st_mtime = file_info.ftime;
644-
st->st_blksize = 512;
645644
}
646645

647646
#if _USE_LFN

bsp/simulator/drivers/dfs_win32.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,6 @@ static int dfs_win32_stat(struct dfs_filesystem *fs, const char *path, struct st
505505
st->st_mtime = time_tmp.QuadPart;
506506
}
507507

508-
st->st_blksize = 0;
509-
510508
FindClose(hFind);
511509

512510
return 0;

components/dfs/filesystems/devfs/devfs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ int dfs_device_fs_stat(struct dfs_filesystem *fs, const char *path, struct stat
213213

214214
st->st_size = 0;
215215
st->st_mtime = 0;
216-
st->st_blksize = 512;
217-
216+
218217
return DFS_STATUS_OK;
219218
}
220219
else
@@ -238,8 +237,7 @@ int dfs_device_fs_stat(struct dfs_filesystem *fs, const char *path, struct stat
238237

239238
st->st_size = 0;
240239
st->st_mtime = 0;
241-
st->st_blksize = 512;
242-
240+
243241
return DFS_STATUS_OK;
244242
}
245243
}

components/dfs/filesystems/elmfat/dfs_elm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,6 @@ int dfs_elm_stat(struct dfs_filesystem *fs, const char *path, struct stat *st)
738738
st->st_mode &= ~(DFS_S_IWUSR | DFS_S_IWGRP | DFS_S_IWOTH);
739739

740740
st->st_size = file_info.fsize;
741-
st->st_blksize = 512;
742741

743742
/* get st_mtime. */
744743
{

components/dfs/filesystems/jffs2/dfs_jffs2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static int dfs_jffs2_open(struct dfs_fd* file)
331331
return jffs2_result_to_dfs(result);
332332
}
333333

334-
/* save this pointer, it will be used when calling read()£¬write(),
334+
/* save this pointer, it will be used when calling read()��write(),
335335
flush(), lessk(), and will be rt_free when calling close()*/
336336
file->data = jffs2_file;
337337
file->pos = jffs2_file->f_offset;
@@ -686,7 +686,6 @@ static int dfs_jffs2_stat(struct dfs_filesystem* fs, const char *path, struct st
686686
st->st_dev = 0;
687687
st->st_size = s.st_size;
688688
st->st_mtime = s.st_mtime;
689-
st->st_blksize = 1;//fixme: what's this field?
690689

691690
return 0;
692691
}

components/dfs/filesystems/nfs/dfs_nfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,6 @@ int nfs_stat(struct dfs_filesystem *fs, const char *path, struct stat *st)
850850

851851
st->st_size = info->size;
852852
st->st_mtime = info->mtime.seconds;
853-
st->st_blksize = 512;
854853

855854
xdr_free((xdrproc_t)xdr_GETATTR3res, (char *)&res);
856855
xdr_free((xdrproc_t)xdr_nfs_fh3, (char *)handle);

components/dfs/filesystems/ramfs/dfs_ramfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ int dfs_ramfs_stat(struct dfs_filesystem *fs,
292292

293293
st->st_size = dirent->size;
294294
st->st_mtime = 0;
295-
st->st_blksize = 512;
296295

297296
return DFS_STATUS_OK;
298297
}

components/dfs/filesystems/romfs/dfs_romfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ int dfs_romfs_stat(struct dfs_filesystem *fs, const char *path, struct stat *st)
245245

246246
st->st_size = dirent->size;
247247
st->st_mtime = 0;
248-
st->st_blksize = 512;
249248

250249
return DFS_STATUS_OK;
251250
}

components/dfs/filesystems/uffs/dfs_uffs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static int dfs_uffs_open(struct dfs_fd* file)
347347
return uffs_result_to_dfs(uffs_get_error());
348348
}
349349

350-
/* save this pointer, it will be used when calling read()£¬write(),
350+
/* save this pointer, it will be used when calling read()��write(),
351351
* flush(), seek(), and will be free when calling close()*/
352352

353353
file->data = (void *)fd;
@@ -619,7 +619,6 @@ static int dfs_uffs_stat(struct dfs_filesystem* fs, const char *path, struct sta
619619
st->st_mtime = s.st_mtime;
620620

621621
mtd = RT_MTD_NAND_DEVICE(fs->dev_id);
622-
st->st_blksize = mtd->page_size;
623622

624623
return 0;
625624
}

components/dfs/include/dfs_def.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ struct stat
261261
rt_uint16_t st_mode;
262262
rt_uint32_t st_size;
263263
rt_time_t st_mtime;
264-
rt_uint32_t st_blksize;
265264
};
266265

267266
struct statfs

0 commit comments

Comments
 (0)