Skip to content

Commit

Permalink
Add readonly mount support in the fs backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Klama committed Dec 19, 2019
1 parent 7ee92e7 commit 081fe6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2951,7 +2951,7 @@ fs_freefid(void *softc __unused, struct l9p_fid *fid)
}

int
l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd)
l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd, bool ro)
{
struct l9p_backend *backend;
struct fs_softc *sc;
Expand Down Expand Up @@ -3003,7 +3003,7 @@ l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd)

sc = l9p_malloc(sizeof(*sc));
sc->fs_rootfd = rootfd;
sc->fs_readonly = false;
sc->fs_readonly = ro;
backend->softc = sc;

#if defined(WITH_CASPER)
Expand Down
5 changes: 4 additions & 1 deletion backend/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#ifndef LIB9P_BACKEND_FS_H
#define LIB9P_BACKEND_FS_H

int l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd);
#include <stdbool.h>
#include "backend.h"

int l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd, bool ro);

#endif /* LIB9P_BACKEND_FS_H */

0 comments on commit 081fe6f

Please sign in to comment.