diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-10-03 19:57:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-10-03 19:57:46 +0200 |
commit | e5e965b7f4f9cfd4e66d4d0a9aa009c268a18522 (patch) | |
tree | 55ac4167d2cc21cf8ec8cbefb2d97b7c6785612e /fs | |
parent | 0fb965de2ca89400dbfd5185dfb3105e0ad2ec68 (diff) | |
download | barebox-e5e965b7f4f9cfd4e66d4d0a9aa009c268a18522.tar.gz barebox-e5e965b7f4f9cfd4e66d4d0a9aa009c268a18522.tar.xz |
change files and directories to 0777
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ramfs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ramfs.c b/fs/ramfs.c index 75178fede2..319c91ad6b 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -58,7 +58,7 @@ struct ramfs_priv { static struct ramfs_inode * lookup(struct ramfs_inode *node, const char *name) { debug("lookup: %s in %p\n",name, node); - if(node->mode != S_IFDIR) + if(!S_ISDIR(node->mode)) return NULL; node = node->child; @@ -184,16 +184,16 @@ static struct ramfs_inode* node_insert(struct ramfs_inode *parent_node, const ch node = parent_node->child; - if (mode & S_IFDIR) { + if (S_ISDIR(mode)) { struct ramfs_inode *n = ramfs_get_inode(); n->name = strdup("."); - n->mode = S_IFDIR; + n->mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO; n->child = n; n->parent = new_node; new_node->child = n; n = ramfs_get_inode(); n->name = strdup(".."); - n->mode = S_IFDIR; + n->mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO; n->parent = new_node; n->child = parent_node->child; new_node->child->next = n; @@ -463,7 +463,7 @@ static DIR* ramfs_opendir(struct device_d *dev, const char *pathname) if (!node) return NULL; - if (node->mode != S_IFDIR) + if (!S_ISDIR(node->mode)) return NULL; dir = xmalloc(sizeof(DIR)); @@ -513,7 +513,7 @@ static int ramfs_probe(struct device_d *dev) dev->priv = priv; priv->root.name = "/"; - priv->root.mode = S_IFDIR; + priv->root.mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO; priv->root.parent = &priv->root; n = ramfs_get_inode(); n->name = strdup("."); @@ -523,7 +523,7 @@ static int ramfs_probe(struct device_d *dev) priv->root.child = n; n = ramfs_get_inode(); n->name = strdup(".."); - n->mode = S_IFDIR; + n->mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO; n->parent = &priv->root; n->child = priv->root.child; priv->root.child->next = n; |