summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-07-05 15:12:13 +0200
committerGravatar Matt Colyer2009-07-07 08:32:00 -0700
commite764222b0709cec5992f6120fd3a198d1c60b5e8 (patch)
treefbb4586cc864f21f4d43f57784052e69f06a0f48
parent5f46d10d6bb650abdda1e5a691747d315395a9ea (diff)
downloadifuse-e764222b0709cec5992f6120fd3a198d1c60b5e8.tar.gz
ifuse-e764222b0709cec5992f6120fd3a198d1c60b5e8.tar.bz2
support for listing special files
[#55 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
-rw-r--r--src/ifuse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index f117885..d8c6ddc 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -90,6 +90,14 @@ static int ifuse_getattr(const char *path, struct stat *stbuf)
stbuf->st_mode = S_IFDIR;
} else if (!strcmp(info[i+1], "S_IFLNK")) {
stbuf->st_mode = S_IFLNK;
+ } else if (!strcmp(info[i+1], "S_IFBLK")) {
+ stbuf->st_mode = S_IFBLK;
+ } else if (!strcmp(info[i+1], "S_IFCHR")) {
+ stbuf->st_mode = S_IFCHR;
+ } else if (!strcmp(info[i+1], "S_IFIFO")) {
+ stbuf->st_mode = S_IFIFO;
+ } else if (!strcmp(info[i+1], "S_IFSOCK")) {
+ stbuf->st_mode = S_IFSOCK;
}
} else if (!strcmp(info[i], "st_nlink")) {
stbuf->st_nlink = atoi(info[i+1]);