diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-05-05 09:45:26 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2008-05-05 09:45:26 -0400 |
commit | a62332eeb2235ef1cbdd270323bc68e106c632ac (patch) | |
tree | b8333ec9dbe1d653ed2ea922fd6d05cd0daee9c1 /mkfs.c | |
parent | aaf38b3ebd2fa9cb6948ff1d6a2cfda063170a6e (diff) |
Add a readonly flag open_ctree to force RO opens
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -77,7 +77,7 @@ static int make_root_dir(int fd, const char *device_name) { u64 chunk_size = 0; int ret; - root = open_ctree_fd(fd, device_name, 0); + root = open_ctree_fd(fd, device_name, 0, O_RDWR); if (!root) { fprintf(stderr, "ctree init failed\n"); @@ -408,7 +408,7 @@ int main(int ac, char **av) fprintf(stderr, "failed to setup the root directory\n"); exit(1); } - root = open_ctree(file, 0); + root = open_ctree(file, 0, O_RDWR); root->fs_info->alloc_start = alloc_start; trans = btrfs_start_transaction(root, 1); |