diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-06 20:33:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:10 -0400 |
commit | 4754b825571a6f2f7655245e420e8e486c4458f6 (patch) | |
tree | 5d24fe048b982c3e321fcde24a883ce999a4a4f5 /fs/hostfs/hostfs_user.c | |
parent | 39b743c6199a317ffac67fcae1dd05be3142633a (diff) |
hostfs: get rid of file_type(), fold init_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hostfs/hostfs_user.c')
-rw-r--r-- | fs/hostfs/hostfs_user.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c index 701d454a6791..91ebfcefa409 100644 --- a/fs/hostfs/hostfs_user.c +++ b/fs/hostfs/hostfs_user.c @@ -53,36 +53,6 @@ int stat_file(const char *path, struct hostfs_stat *p, int fd) return 0; } -int file_type(const char *path, int *maj, int *min) -{ - struct stat64 buf; - - if (lstat64(path, &buf) < 0) - return -errno; - /* - * We cannot pass rdev as is because glibc and the kernel disagree - * about its definition. - */ - if (maj != NULL) - *maj = os_major(buf.st_rdev); - if (min != NULL) - *min = os_minor(buf.st_rdev); - - if (S_ISDIR(buf.st_mode)) - return OS_TYPE_DIR; - else if (S_ISLNK(buf.st_mode)) - return OS_TYPE_SYMLINK; - else if (S_ISCHR(buf.st_mode)) - return OS_TYPE_CHARDEV; - else if (S_ISBLK(buf.st_mode)) - return OS_TYPE_BLOCKDEV; - else if (S_ISFIFO(buf.st_mode)) - return OS_TYPE_FIFO; - else if (S_ISSOCK(buf.st_mode)) - return OS_TYPE_SOCK; - else return OS_TYPE_FILE; -} - int access_file(char *path, int r, int w, int x) { int mode = 0; |