mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend: remove BOOKMARKFS_BOOKMARK_DELETE_DIR
It's up to the backend to check whether it's deleting a directory.
This commit is contained in:
parent
557cc17449
commit
fef7b4d3a8
2 changed files with 5 additions and 6 deletions
|
@ -58,7 +58,6 @@
|
|||
#define BOOKMARKFS_FRONTEND_MKFS ( 1u << 18 )
|
||||
|
||||
#define BOOKMARKFS_BOOKMARK_CREATE_DIR ( 1u << 0 )
|
||||
#define BOOKMARKFS_BOOKMARK_DELETE_DIR ( 1u << 0 )
|
||||
#define BOOKMARKFS_BOOKMARK_LIST_WITHSTAT ( 1u << 0 )
|
||||
#define BOOKMARKFS_BOOKMARK_RENAME_NOREPLACE ( 1u << 0 )
|
||||
#define BOOKMARKFS_BOOKMARK_SET_TIME ( 1u << 0 )
|
||||
|
|
10
src/fs_ops.c
10
src/fs_ops.c
|
@ -223,7 +223,7 @@ static int bm_setxattr (uint64_t, char const *, void const *, size_t);
|
|||
static int bm_write (fuse_req_t, int, char const *, size_t, off_t,
|
||||
struct fs_file_handle *);
|
||||
static int current_time (struct timespec *);
|
||||
static void do_delete (fuse_req_t, fuse_ino_t, char const *, uint32_t);
|
||||
static void do_delete (fuse_req_t, fuse_ino_t, char const *);
|
||||
static void do_readdir (fuse_req_t, fuse_ino_t, size_t, off_t, uint32_t,
|
||||
struct fuse_file_info const *);
|
||||
static unsigned long
|
||||
|
@ -1202,11 +1202,11 @@ static void
|
|||
do_delete (
|
||||
fuse_req_t req,
|
||||
fuse_ino_t parent,
|
||||
char const *name,
|
||||
uint32_t flags
|
||||
char const *name
|
||||
) {
|
||||
int status = -EIO;
|
||||
|
||||
uint32_t flags = 0;
|
||||
switch (INODE_SUBSYS_TYPE(parent)) {
|
||||
case SUBSYS_TYPE_INTERNAL:
|
||||
status = intfs_delete(INODE_SUBSYS_ID(parent), name, flags);
|
||||
|
@ -2316,7 +2316,7 @@ fs_op_rmdir (
|
|||
fuse_ino_t parent,
|
||||
char const *name
|
||||
) {
|
||||
do_delete(req, parent, name, BOOKMARK_FLAG(DELETE_DIR));
|
||||
do_delete(req, parent, name);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2376,7 +2376,7 @@ fs_op_unlink (
|
|||
fuse_ino_t parent,
|
||||
char const *name
|
||||
) {
|
||||
do_delete(req, parent, name, 0);
|
||||
do_delete(req, parent, name);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue