[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/9] virtiofsd: Convert some functions to return bool
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 5/9] virtiofsd: Convert some functions to return bool |
Date: |
Mon, 15 Mar 2021 20:12:11 +0000 |
From: Greg Kurz <groug@kaod.org>
Both currently only return 0 or 1.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20210312141003.819108-3-groug@kaod.org>
Reviewed-by: Connor Kuehl <ckuehl@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
tools/virtiofsd/passthrough_ll.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index cf453eea9b..b144320e48 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -223,17 +223,17 @@ static struct lo_inode *lo_find(struct lo_data *lo,
struct stat *st,
static int xattr_map_client(const struct lo_data *lo, const char *client_name,
char **out_name);
-static int is_dot_or_dotdot(const char *name)
+static bool is_dot_or_dotdot(const char *name)
{
return name[0] == '.' &&
(name[1] == '\0' || (name[1] == '.' && name[2] == '\0'));
}
/* Is `path` a single path component that is not "." or ".."? */
-static int is_safe_path_component(const char *path)
+static bool is_safe_path_component(const char *path)
{
if (strchr(path, '/')) {
- return 0;
+ return false;
}
return !is_dot_or_dotdot(path);
--
2.30.2
- [PULL 0/9] virtiofs and migration queue, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 1/9] virtiofsd: Release vu_dispatch_lock when stopping queue, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 2/9] virtiofsd: Add qemu version and copyright info, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 3/9] virtiofsd: Don't allow empty filenames, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 4/9] virtiofsd: Don't allow empty paths in lookup_name(), Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 7/9] migration/tls: add error handling in multifd_tls_handshake_thread, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 5/9] virtiofsd: Convert some functions to return bool,
Dr. David Alan Gilbert (git) <=
- [PULL 8/9] monitor: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 6/9] migration/tls: fix inverted semantics in multifd_channel_connect, Dr. David Alan Gilbert (git), 2021/03/15
- [PULL 9/9] migration: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD, Dr. David Alan Gilbert (git), 2021/03/15
- Re: [PULL 0/9] virtiofs and migration queue, Peter Maydell, 2021/03/17