From patchwork Fri Nov 6 09:13:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 319828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA681C5517A for ; Fri, 6 Nov 2020 09:39:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39269208FE for ; Fri, 6 Nov 2020 09:39:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=crudebyte.com header.i=@crudebyte.com header.b="ok+CNsyu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39269208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=crudebyte.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kayDR-0007Zd-T6 for qemu-devel@archiver.kernel.org; Fri, 06 Nov 2020 04:39:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <01011733ea3177e437d8999b77c73caa93266896@lizzy.crudebyte.com>) id 1kayCA-0006Cv-Uo for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:12 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:54727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <01011733ea3177e437d8999b77c73caa93266896@lizzy.crudebyte.com>) id 1kayC9-000796-7J for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=cuovt0Feftktuski+XJazOvPm4C/mceIzl+3zbI0FZ8=; b=ok+CN syu6BAjYPGwGU0UYN2bpeYrTjLZdPh1CwzhezSepRKgrQvr2Uev6drbO1xxMBL/iBwX9J7UMdeRLJ SIkcsrK3FFGpBkjBxxr0EU2D9LGfaDW09bVkp6/pUF22rD0vSydGJe3J1T/qv+yFaajhqAcZAcDRr 6OtHteQFPJLlSmzrYNg/0Qe+eW4mwe9yl1sEp5dcxwv6K4V/YHu8ko04X7b5p2E6yUHqLK9jiYkYB 411lcz/91HQwdIZJelvj/8gvKOiumPOpJRwSJYXh/hmHaXF3kpZtWChkB3qOZ9I7vj9JMLOEJfWVZ SW7pSpOREUuL3NG2Y0urAQEHZBLRw==; Message-Id: <01011733ea3177e437d8999b77c73caa93266896.1604653990.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 06 Nov 2020 10:13:10 +0100 Subject: [PULL 1/4] hw/9pfs : add spaces around operator To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz , Xinhao Zhang , Kai Deng Received-SPF: none client-ip=91.194.90.13; envelope-from=01011733ea3177e437d8999b77c73caa93266896@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/06 04:36:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Xinhao Zhang Fix code style. Operator needs spaces both sides. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-1-zhangxinhao1@huawei.com> Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-local.c | 10 +++++----- hw/9pfs/9p.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 3107637209..af52c1daac 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -162,13 +162,13 @@ static void local_mapped_file_attr(int dirfd, const char *name, memset(buf, 0, ATTR_MAX); while (fgets(buf, ATTR_MAX, fp)) { if (!strncmp(buf, "virtfs.uid", 10)) { - stbuf->st_uid = atoi(buf+11); + stbuf->st_uid = atoi(buf + 11); } else if (!strncmp(buf, "virtfs.gid", 10)) { - stbuf->st_gid = atoi(buf+11); + stbuf->st_gid = atoi(buf + 11); } else if (!strncmp(buf, "virtfs.mode", 11)) { - stbuf->st_mode = atoi(buf+12); + stbuf->st_mode = atoi(buf + 12); } else if (!strncmp(buf, "virtfs.rdev", 11)) { - stbuf->st_rdev = atoi(buf+12); + stbuf->st_rdev = atoi(buf + 12); } memset(buf, 0, ATTR_MAX); } @@ -823,7 +823,7 @@ static int local_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name, if (fd == -1) { goto out; } - credp->fc_mode = credp->fc_mode|S_IFREG; + credp->fc_mode = credp->fc_mode | S_IFREG; if (fs_ctx->export_flags & V9FS_SM_MAPPED) { /* Set cleint credentials in xattr */ err = local_set_xattrat(dirfd, name, credp); diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 741d222c3f..94df440fc7 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1091,7 +1091,7 @@ static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension) } } - if (!(ret&~0777)) { + if (!(ret & ~0777)) { ret |= S_IFREG; } @@ -2776,7 +2776,7 @@ static void coroutine_fn v9fs_create(void *opaque) v9fs_path_unlock(s); } else { err = v9fs_co_open2(pdu, fidp, &name, -1, - omode_to_uflags(mode)|O_CREAT, perm, &stbuf); + omode_to_uflags(mode) | O_CREAT, perm, &stbuf); if (err < 0) { goto out; } @@ -3428,7 +3428,7 @@ static int v9fs_fill_statfs(V9fsState *s, V9fsPDU *pdu, struct statfs *stbuf) * compute bsize factor based on host file system block size * and client msize */ - bsize_factor = (s->msize - P9_IOHDRSZ)/stbuf->f_bsize; + bsize_factor = (s->msize - P9_IOHDRSZ) / stbuf->f_bsize; if (!bsize_factor) { bsize_factor = 1; } @@ -3440,9 +3440,9 @@ static int v9fs_fill_statfs(V9fsState *s, V9fsPDU *pdu, struct statfs *stbuf) * adjust(divide) the number of blocks, free blocks and available * blocks by bsize factor */ - f_blocks = stbuf->f_blocks/bsize_factor; - f_bfree = stbuf->f_bfree/bsize_factor; - f_bavail = stbuf->f_bavail/bsize_factor; + f_blocks = stbuf->f_blocks / bsize_factor; + f_bfree = stbuf->f_bfree / bsize_factor; + f_bavail = stbuf->f_bavail / bsize_factor; f_files = stbuf->f_files; f_ffree = stbuf->f_ffree; fsid_val = (unsigned int) stbuf->f_fsid.__val[0] | @@ -4185,6 +4185,6 @@ static void __attribute__((__constructor__)) v9fs_set_fd_limit(void) error_report("Failed to get the resource limit"); exit(1); } - open_fd_hw = rlim.rlim_cur - MIN(400, rlim.rlim_cur/3); - open_fd_rc = rlim.rlim_cur/2; + open_fd_hw = rlim.rlim_cur - MIN(400, rlim.rlim_cur / 3); + open_fd_rc = rlim.rlim_cur / 2; } From patchwork Fri Nov 6 09:13:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 322437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EACADC388F2 for ; Fri, 6 Nov 2020 09:39:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23B48208FE for ; Fri, 6 Nov 2020 09:39:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=crudebyte.com header.i=@crudebyte.com header.b="HBfE4ENs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23B48208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=crudebyte.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kayDT-0007cr-2T for qemu-devel@archiver.kernel.org; Fri, 06 Nov 2020 04:39:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <487729e9f667644ee0d6762b24269e7758ad2e5e@lizzy.crudebyte.com>) id 1kayCH-0006Fz-2E for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:17 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:47391) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <487729e9f667644ee0d6762b24269e7758ad2e5e@lizzy.crudebyte.com>) id 1kayCF-0007Bu-Br for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=XoZ2XPXVmz9CcXaU4iZPp15B80jRxnBP0iossRIbCUw=; b=HBfE4 ENsKNQMlNJXqX9jzHjtetWNfclHgdET/u1THEMiLMCp3NPwJnBu97qh6wh8CZIdIlxbsqz1jH87AO f4RRtiU7sdhmurpIKJT2DY7rpysu2CGERFaJiRbmoSgIYknGN23cYidsgfAu2RA+SMaNWNCjuf5eu 2ulT+/VZRh0CGFOzNxN2BeQjhY56baTSA76u5xU31Ku2Oc0msqngcRBds2/vImvRiOkCswcxYEOo8 zRr0qoKyjBm6o6RYU5caG0Dl/cgQSUae+/zq+6VkNo8ZVusKQCvu+95+Jp0IKRy0fTqCX8zri17gX Z8oMzuR+DvkBDrOceIhlneMmGjcSg==; Message-Id: <487729e9f667644ee0d6762b24269e7758ad2e5e.1604653990.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 06 Nov 2020 10:13:10 +0100 Subject: [PULL 2/4] hw/9pfs : open brace '{' following struct go on the same line To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz , Xinhao Zhang , Kai Deng Received-SPF: none client-ip=91.194.90.13; envelope-from=487729e9f667644ee0d6762b24269e7758ad2e5e@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/06 04:36:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Xinhao Zhang Fix code style. Open braces for struct should go on the same line. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-2-zhangxinhao1@huawei.com> Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index 3dd1b50b1a..32df81f360 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -143,8 +143,7 @@ typedef struct { */ QEMU_BUILD_BUG_ON(sizeof(P9MsgHeader) != 7); -struct V9fsPDU -{ +struct V9fsPDU { uint32_t size; uint16_t tag; uint8_t id; @@ -270,8 +269,7 @@ union V9fsFidOpenState { void *private; }; -struct V9fsFidState -{ +struct V9fsFidState { int fid_type; int32_t fid; V9fsPath path; @@ -338,8 +336,7 @@ typedef struct { uint64_t path; } QpfEntry; -struct V9fsState -{ +struct V9fsState { QLIST_HEAD(, V9fsPDU) free_list; QLIST_HEAD(, V9fsPDU) active_list; V9fsFidState *fid_list; From patchwork Fri Nov 6 09:13:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 319826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EECAC2D0A3 for ; Fri, 6 Nov 2020 09:42:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8825E208FE for ; Fri, 6 Nov 2020 09:42:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=crudebyte.com header.i=@crudebyte.com header.b="OZ1LAp7w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8825E208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=crudebyte.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kayGS-0003CX-I7 for qemu-devel@archiver.kernel.org; Fri, 06 Nov 2020 04:42:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <22e13675874dabcb314de98134fe6142cd9864a7@lizzy.crudebyte.com>) id 1kayCU-0006h2-RI for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:30 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:35461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <22e13675874dabcb314de98134fe6142cd9864a7@lizzy.crudebyte.com>) id 1kayCT-0007GK-AM for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=kE1Rd2lNhe5C4t2nRY+ov+TdCYGfSEXqermgTf+ZyXo=; b=OZ1LA p7wIrEQ/FaBvd24ilZddJ8vogTrHHTEcX2fzr9Z8lrNYe/hWat5PzF1DApVa81SKW9581ed7BV4SA GQoixpSrLOgQspaUXYz6GrFEuIiQgXGayz20uJJGsNQ+sv9S17e+otvhTXg2F/fyFEq8WjclMbYEq 7JbfI2BCyy/zZ/OtNrkvRNv5lrOdtwAACsNwU3lPX7c80GhheDzcwts/qDBx1PAwG9yIxtwNXxeUf CDMvq3bo8iwZBlNbe4mHuDgL7I0ROvpUEUL7Wo1Oc8xp9gdjOo2KhHbg0Z1MgohvDwaBdvfu06DkP avbCf0BGW9lBi8uspDzJHxQfqQskw==; Message-Id: <22e13675874dabcb314de98134fe6142cd9864a7.1604653990.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 06 Nov 2020 10:13:10 +0100 Subject: [PULL 3/4] hw/9pfs : add space before the open parenthesis '(' To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz , Xinhao Zhang , Kai Deng Received-SPF: none client-ip=91.194.90.13; envelope-from=22e13675874dabcb314de98134fe6142cd9864a7@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/06 04:36:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Xinhao Zhang Fix code style. Space required before the open parenthesis '('. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-3-zhangxinhao1@huawei.com> Signed-off-by: Christian Schoenebeck --- hw/9pfs/cofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/cofs.c b/hw/9pfs/cofs.c index 55991916ec..0b321b456e 100644 --- a/hw/9pfs/cofs.c +++ b/hw/9pfs/cofs.c @@ -23,7 +23,7 @@ static ssize_t __readlink(V9fsState *s, V9fsPath *path, V9fsString *buf) ssize_t len, maxlen = PATH_MAX; buf->data = g_malloc(PATH_MAX); - for(;;) { + for (;;) { len = s->ops->readlink(&s->ctx, path, buf->data, maxlen); if (len < 0) { g_free(buf->data); From patchwork Fri Nov 6 09:13:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Schoenebeck X-Patchwork-Id: 319827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD901C2D0A3 for ; Fri, 6 Nov 2020 09:40:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38251208FE for ; Fri, 6 Nov 2020 09:40:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=crudebyte.com header.i=@crudebyte.com header.b="T7qCuhtJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38251208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=crudebyte.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kayEn-00014v-5I for qemu-devel@archiver.kernel.org; Fri, 06 Nov 2020 04:40:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kayCg-00078H-FF for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:42 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:55521) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kayCe-0007Ka-Nk for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:References:In-Reply-To:Message-Id:Content-ID: Content-Description; bh=9O9qnIXKsiM/2WWp2zKQN9RJK3qY86a6TuCkInAuTWo=; b=T7qCu htJN7dVxwtglFtppc1UKv34HDSdNB84EfMswzNq8fNulOmwU+/z0S0a+d0aEDhLD2eq6c5MIx/eO5 BeLc+moqDFWsedJS1OdN15c9c3Ih3CYBMWLmWQv11WbJcy6TjbRRqiXpcSvQjf0B30NMqujxabtXZ 60gQ7HCwXlbUMPmi8Umky2kJQ5iRnMV2Wo7i00Zm4hcjjjMiqQRfbtZu8D06oNilRSHdkAOIBSMEe ScsetUePlAljuq2NvbLlaFU9Z7nOqQgQIrsefaL+5jsQ/ySGrSkcQ2glIwLRq0LfploRhRM7zE3kF ZggVV5nf4O4SVekmkYdPESQh0CjqA==; Message-Id: In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 06 Nov 2020 10:13:10 +0100 Subject: [PULL 4/4] hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen MIME-Version: 1.0 To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz , Philippe Mathieu-Daud?? Received-SPF: none client-ip=91.194.90.13; envelope-from=e6b99460b14469e0b83febc8d5a501947d1d5c7c@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/06 04:36:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Commit b2c00bce54c ("meson: convert hw/9pfs, cleanup") introduced CONFIG_9PFS (probably a wrong conflict resolution). This config is not used anywhere. Backends depend on CONFIG_FSDEV_9P which itself depends on CONFIG_VIRTFS. Remove the invalid CONFIG_9PFS and use CONFIG_FSDEV_9P instead, to fix the './configure --without-default-devices --enable-xen' build: /usr/bin/ld: libcommon.fa.p/hw_xen_xen-legacy-backend.c.o: in function `xen_be_register_common': hw/xen/xen-legacy-backend.c:754: undefined reference to `xen_9pfs_ops' /usr/bin/ld: libcommon.fa.p/fsdev_qemu-fsdev.c.o:(.data.rel+0x8): undefined reference to `local_ops' /usr/bin/ld: libcommon.fa.p/fsdev_qemu-fsdev.c.o:(.data.rel+0x20): undefined reference to `synth_ops' /usr/bin/ld: libcommon.fa.p/fsdev_qemu-fsdev.c.o:(.data.rel+0x38): undefined reference to `proxy_ops' collect2: error: ld returned 1 exit status Fixes: b2c00bce54c ("meson: convert hw/9pfs, cleanup") Suggested-by: Paolo Bonzini Acked-by: Greg Kurz Tested-by: Greg Kurz Signed-off-by: Philippe Mathieu-Daudé Acked-by: Christian Schoenebeck Message-Id: <20201104115706.3101190-3-philmd@redhat.com> Signed-off-by: Christian Schoenebeck --- hw/9pfs/Kconfig | 4 ---- hw/9pfs/meson.build | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/9pfs/Kconfig b/hw/9pfs/Kconfig index d3ebd73730..3ae5749661 100644 --- a/hw/9pfs/Kconfig +++ b/hw/9pfs/Kconfig @@ -2,12 +2,8 @@ config FSDEV_9P bool depends on VIRTFS -config 9PFS - bool - config VIRTIO_9P bool default y depends on VIRTFS && VIRTIO select FSDEV_9P - select 9PFS diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build index cc09426212..99be5d9119 100644 --- a/hw/9pfs/meson.build +++ b/hw/9pfs/meson.build @@ -15,6 +15,6 @@ fs_ss.add(files( 'coxattr.c', )) fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c')) -softmmu_ss.add_all(when: 'CONFIG_9PFS', if_true: fs_ss) +softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss) specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c'))