OSDN Git Service

Permitted write in libexfat.
authorresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sat, 24 Oct 2009 07:20:49 +0000 (07:20 +0000)
committerresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sat, 24 Oct 2009 07:20:49 +0000 (07:20 +0000)
git-svn-id: http://exfat.googlecode.com/svn/trunk@32 60bc1c72-a15a-11de-b98f-4500b42dc123

libexfat/mount.c
libexfat/utils.c

index c14f1ec..64e8968 100644 (file)
@@ -41,7 +41,7 @@ int exfat_mount(struct exfat* ef, const char* spec)
                return -ENOMEM;
        }
 
-       ef->fd = open(spec, O_RDONLY); /* currently read only */
+       ef->fd = open(spec, O_RDWR);
        if (ef->fd < 0)
        {
                free(ef->sb);
index ac8ed87..214025a 100644 (file)
@@ -18,7 +18,7 @@ void exfat_stat(const struct exfat_node* node, struct stat *stbuf)
        if (node->flags & EXFAT_ATTRIB_DIR)
                stbuf->st_mode = S_IFDIR | 0755;
        else
-               stbuf->st_mode = S_IFREG | 0444;
+               stbuf->st_mode = S_IFREG | 0644;
        stbuf->st_nlink = 1;
        stbuf->st_size = node->size;
        stbuf->st_mtime = node->mtime;