From nobody Tue Oct 28 12:35:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515421847379430.99995985550754; Mon, 8 Jan 2018 06:30:47 -0800 (PST) Received: from localhost ([::1]:37549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYYRq-0003xj-Ag for importer@patchew.org; Mon, 08 Jan 2018 09:30:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYYQ5-0002r7-Gl for qemu-devel@nongnu.org; Mon, 08 Jan 2018 09:29:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYYQ2-00067S-Nw for qemu-devel@nongnu.org; Mon, 08 Jan 2018 09:28:57 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51026 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYYQ2-00066o-JE for qemu-devel@nongnu.org; Mon, 08 Jan 2018 09:28:54 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.21) with SMTP id w08ESnKK192073 for ; Mon, 8 Jan 2018 09:28:53 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fc8cfpr5j-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 08 Jan 2018 09:28:52 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Jan 2018 14:28:48 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 8 Jan 2018 14:28:47 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w08ESkEP41746528; Mon, 8 Jan 2018 14:28:46 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 65848AE058; Mon, 8 Jan 2018 14:20:49 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A27EAE053; Mon, 8 Jan 2018 14:20:49 +0000 (GMT) Received: from smtp.lab.toulouse-stg.fr.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 8 Jan 2018 14:20:49 +0000 (GMT) Received: from bahia.lan (icon-9-164-172-212.megacenter.de.ibm.com [9.164.172.212]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 38B3822036B; Mon, 8 Jan 2018 15:28:46 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org Date: Mon, 8 Jan 2018 15:28:22 +0100 X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180108142831.6638-1-groug@kaod.org> References: <20180108142831.6638-1-groug@kaod.org> X-TM-AS-GCONF: 00 x-cbid: 18010814-0040-0000-0000-0000040234D6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18010814-0041-0000-0000-0000260586D1 Message-Id: <20180108142831.6638-6-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-08_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=13 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801080210 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PULL 05/14] 9pfs: handle: fix type definition X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" To comply with the QEMU coding style. Signed-off-by: Greg Kurz --- hw/9pfs/9p-handle.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/hw/9pfs/9p-handle.c b/hw/9pfs/9p-handle.c index 9875f1894cc5..65b12de230c1 100644 --- a/hw/9pfs/9p-handle.c +++ b/hw/9pfs/9p-handle.c @@ -41,10 +41,10 @@ #define BTRFS_SUPER_MAGIC 0x9123683E #endif =20 -struct handle_data { +typedef struct HandleData { int mountfd; int handle_bytes; -}; +} HandleData; =20 static inline int name_to_handle(int dirfd, const char *name, struct file_handle *fh, int *mnt_id, int = flags) @@ -79,7 +79,7 @@ static int handle_lstat(FsContext *fs_ctx, V9fsPath *fs_p= ath, struct stat *stbuf) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_PATH); if (fd < 0) { @@ -94,7 +94,7 @@ static ssize_t handle_readlink(FsContext *fs_ctx, V9fsPat= h *fs_path, char *buf, size_t bufsz) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_PATH); if (fd < 0) { @@ -118,7 +118,7 @@ static int handle_closedir(FsContext *ctx, V9fsFidOpenS= tate *fs) static int handle_open(FsContext *ctx, V9fsPath *fs_path, int flags, V9fsFidOpenState *fs) { - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fs->fd =3D open_by_handle(data->mountfd, fs_path->data, flags); return fs->fd; @@ -207,7 +207,7 @@ static ssize_t handle_pwritev(FsContext *ctx, V9fsFidOp= enState *fs, static int handle_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *cred= p) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -222,7 +222,7 @@ static int handle_mknod(FsContext *fs_ctx, V9fsPath *di= r_path, const char *name, FsCred *credp) { int dirfd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 dirfd =3D open_by_handle(data->mountfd, dir_path->data, O_PATH); if (dirfd < 0) { @@ -240,7 +240,7 @@ static int handle_mkdir(FsContext *fs_ctx, V9fsPath *di= r_path, const char *name, FsCred *credp) { int dirfd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 dirfd =3D open_by_handle(data->mountfd, dir_path->data, O_PATH); if (dirfd < 0) { @@ -272,7 +272,7 @@ static int handle_open2(FsContext *fs_ctx, V9fsPath *di= r_path, const char *name, { int ret; int dirfd, fd; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 dirfd =3D open_by_handle(data->mountfd, dir_path->data, O_PATH); if (dirfd < 0) { @@ -297,7 +297,7 @@ static int handle_symlink(FsContext *fs_ctx, const char= *oldpath, V9fsPath *dir_path, const char *name, FsCred *cr= edp) { int fd, dirfd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 dirfd =3D open_by_handle(data->mountfd, dir_path->data, O_PATH); if (dirfd < 0) { @@ -322,7 +322,7 @@ static int handle_link(FsContext *ctx, V9fsPath *oldpat= h, V9fsPath *dirpath, const char *name) { int oldfd, newdirfd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 oldfd =3D open_by_handle(data->mountfd, oldpath->data, O_PATH); if (oldfd < 0) { @@ -342,7 +342,7 @@ static int handle_link(FsContext *ctx, V9fsPath *oldpat= h, static int handle_truncate(FsContext *ctx, V9fsPath *fs_path, off_t size) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK | O_WRO= NLY); if (fd < 0) { @@ -363,7 +363,7 @@ static int handle_rename(FsContext *ctx, const char *ol= dpath, static int handle_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *cred= p) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)fs_ctx->private; + HandleData *data =3D (HandleData *) fs_ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_PATH); if (fd < 0) { @@ -379,7 +379,7 @@ static int handle_utimensat(FsContext *ctx, V9fsPath *f= s_path, { int ret; int fd; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -418,7 +418,7 @@ static int handle_statfs(FsContext *ctx, V9fsPath *fs_p= ath, struct statfs *stbuf) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -433,7 +433,7 @@ static ssize_t handle_lgetxattr(FsContext *ctx, V9fsPat= h *fs_path, const char *name, void *value, size_t size) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -448,7 +448,7 @@ static ssize_t handle_llistxattr(FsContext *ctx, V9fsPa= th *fs_path, void *value, size_t size) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -463,7 +463,7 @@ static int handle_lsetxattr(FsContext *ctx, V9fsPath *f= s_path, const char *name, void *value, size_t size, int flags) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -478,7 +478,7 @@ static int handle_lremovexattr(FsContext *ctx, V9fsPath= *fs_path, const char *name) { int fd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 fd =3D open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK); if (fd < 0) { @@ -495,7 +495,7 @@ static int handle_name_to_path(FsContext *ctx, V9fsPath= *dir_path, char *buffer; struct file_handle *fh; int dirfd, ret, mnt_id; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 /* "." and ".." are not allowed */ if (!strcmp(name, ".") || !strcmp(name, "..")) { @@ -536,7 +536,7 @@ static int handle_renameat(FsContext *ctx, V9fsPath *ol= ddir, const char *new_name) { int olddirfd, newdirfd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; =20 olddirfd =3D open_by_handle(data->mountfd, olddir->data, O_PATH); if (olddirfd < 0) { @@ -557,7 +557,7 @@ static int handle_unlinkat(FsContext *ctx, V9fsPath *di= r, const char *name, int flags) { int dirfd, ret; - struct handle_data *data =3D (struct handle_data *)ctx->private; + HandleData *data =3D (HandleData *) ctx->private; int rflags; =20 dirfd =3D open_by_handle(data->mountfd, dir->data, O_PATH); @@ -609,7 +609,7 @@ static int handle_init(FsContext *ctx) int ret, mnt_id; struct statfs stbuf; struct file_handle fh; - struct handle_data *data =3D g_malloc(sizeof(struct handle_data)); + HandleData *data =3D g_malloc(sizeof(HandleData)); =20 data->mountfd =3D open(ctx->fs_root, O_DIRECTORY); if (data->mountfd < 0) { @@ -646,7 +646,7 @@ out: =20 static void handle_cleanup(FsContext *ctx) { - struct handle_data *data =3D ctx->private; + HandleData *data =3D ctx->private; =20 close(data->mountfd); g_free(data); --=20 2.13.6