Skip to content

Commit

Permalink
fscache: remember the reparse tag for each entry
Browse files Browse the repository at this point in the history
We will use this in the next commit to implement an FSCache-aware
version of is_mount_point().

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 24, 2024
1 parent c702d42 commit a39b0cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compat/win32/fscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static struct trace_key trace_fscache = TRACE_KEY_INIT(FSCACHE);
struct fsentry {
struct hashmap_entry ent;
mode_t st_mode;
ULONG reparse_tag;
/* Pointer to the directory listing, or NULL for the listing itself. */
struct fsentry *list;
/* Pointer to the next file entry of the list. */
Expand Down Expand Up @@ -197,6 +198,10 @@ static struct fsentry *fseentry_create_entry(struct fscache *cache,

fse = fsentry_alloc(cache, list, buf, len);

fse->reparse_tag =
fdata->FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT ?
fdata->EaSize : 0;

fse->st_mode = file_attr_to_st_mode(fdata->FileAttributes);
fse->dirent.d_type = S_ISDIR(fse->st_mode) ? DT_DIR : DT_REG;
fse->u.s.st_size = fdata->EndOfFile.LowPart |
Expand Down

0 comments on commit a39b0cb

Please sign in to comment.