Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296409
b: refs/heads/master
c: 3ee6bd8
h: refs/heads/master
i:
  296407: 742364c
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Richard Weinberger committed Mar 24, 2012
1 parent 7e13614 commit 96313f7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0b79a90b1556a7e51d7a49a655eb60306f6258d
refs/heads/master: 3ee6bd8e8dc0c58b9ba5bab7ef8a7a131da346eb
3 changes: 2 additions & 1 deletion trunk/fs/hostfs/hostfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ extern int access_file(char *path, int r, int w, int x);
extern int open_file(char *path, int r, int w, int append);
extern void *open_dir(char *path, int *err_out);
extern char *read_dir(void *stream, unsigned long long *pos,
unsigned long long *ino_out, int *len_out);
unsigned long long *ino_out, int *len_out,
unsigned int *type_out);
extern void close_file(void *stream);
extern int replace_file(int oldfd, int fd);
extern void close_dir(void *stream);
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)
char *name;
unsigned long long next, ino;
int error, len;
unsigned int type;

name = dentry_name(file->f_path.dentry);
if (name == NULL)
Expand All @@ -292,9 +293,9 @@ int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)
if (dir == NULL)
return -error;
next = file->f_pos;
while ((name = read_dir(dir, &next, &ino, &len)) != NULL) {
while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) {
error = (*filldir)(ent, name, len, file->f_pos,
ino, DT_UNKNOWN);
ino, type);
if (error) break;
file->f_pos = next;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/hostfs/hostfs_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ void *open_dir(char *path, int *err_out)
}

char *read_dir(void *stream, unsigned long long *pos,
unsigned long long *ino_out, int *len_out)
unsigned long long *ino_out, int *len_out,
unsigned int *type_out)
{
DIR *dir = stream;
struct dirent *ent;
Expand All @@ -109,6 +110,7 @@ char *read_dir(void *stream, unsigned long long *pos,
return NULL;
*len_out = strlen(ent->d_name);
*ino_out = ent->d_ino;
*type_out = ent->d_type;
*pos = telldir(dir);
return ent->d_name;
}
Expand Down

0 comments on commit 96313f7

Please sign in to comment.