From 180d3f74e4738ee107e269cbb949481075dd789a Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 4 Jan 2004 16:28:35 +0000 Subject: * Fix problems caused by Robert Schwebel's cramfs patch * Patch by Scott McNutt, 02 Jan 2004: Add support for the Nios Active Serial Memory Interface (ASMI) on Cyclone devices * Patch by Andrea Marson, 16 Dec 2003: Add support for the PPChameleon ME and HI modules * Patch by Yuli Barcohen, 22 Dec 2003: Add support for Motorola DUET ADS board (MPC87x/88x) --- fs/cramfs/cramfs.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'fs/cramfs/cramfs.c') diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c index 1e35104..98ff567 100644 --- a/fs/cramfs/cramfs.c +++ b/fs/cramfs/cramfs.c @@ -31,8 +31,9 @@ #include #include +#include #include -#include "cramfs_fs.h" +#include /* These two macros may change in future, to provide better st_ino semantics. */ @@ -198,36 +199,6 @@ int cramfs_load (char *loadoffset, struct part_info *info, char *filename) (unsigned long) loadoffset); } -static char *mkmodestr (unsigned long mode, char *str) -{ - static const char *l = "xwr"; - int mask = 1, i; - char c; - - switch (mode & S_IFMT) { - case S_IFDIR: str[0] = 'd'; break; - case S_IFBLK: str[0] = 'b'; break; - case S_IFCHR: str[0] = 'c'; break; - case S_IFIFO: str[0] = 'f'; break; - case S_IFLNK: str[0] = 'l'; break; - case S_IFSOCK: str[0] = 's'; break; - case S_IFREG: str[0] = '-'; break; - default: str[0] = '?'; break; - } - - for (i = 0; i < 9; i++) { - c = l[i % 3]; - str[9 - i] = (mode & mask) ? c : '-'; - mask = mask << 1; - } - - if (mode & S_ISUID) str[3] = (mode & S_IXUSR) ? 's' : 'S'; - if (mode & S_ISGID) str[6] = (mode & S_IXGRP) ? 's' : 'S'; - if (mode & S_ISVTX) str[9] = (mode & S_IXOTH) ? 't' : 'T'; - str[10] = '\0'; - return str; -} - static int cramfs_list_inode (struct part_info *info, unsigned long offset) { struct cramfs_inode *inode = (struct cramfs_inode *) -- cgit v1.1