From nobody Tue Feb 10 13:18:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1557218962; cv=none; d=zoho.com; s=zohoarc; b=fGVQLHbVnX5KfGuqMHi53yKcdMU6sz3q4WhS6kTB1fWZ/Ch3kXhVxi0KQqkdxRpi2LVWAoFAR9b6wF91ZsPmiEQGY23e+0o/d4i8P/p55RbtEm8Wn+AYDPv/A10eFlgIk2Z7/iK3RfPbRag3710HkoPPt4Kx4LOXmc2uNGI9xe8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557218962; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ICh0rVm1650CBpQ4+4wH6LPxdXkRd/OB0BNutgZtOyw=; b=HrvsumtxrQTGvZt8zeFgYRTkhCqNiFC9oJE7/62zaNRcTpHzYiDqHZIcbY91Yf6EeVe67Sba7poXCCOxwYNUb7mXq/muNB80gs1MbeNNFA1cAUlsUW/5FePhQR164sCZFfUlqIKhZNQlNjSx0+7HYwwexASW6Rjg/jTAs74P5VQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557218962132663.7071194380776; Tue, 7 May 2019 01:49:22 -0700 (PDT) Received: from localhost ([127.0.0.1]:42445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvmp-0007AP-6h for importer@patchew.org; Tue, 07 May 2019 04:49:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvil-0004LQ-NZ for qemu-devel@nongnu.org; Tue, 07 May 2019 04:45:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvik-0006QZ-Ls for qemu-devel@nongnu.org; Tue, 07 May 2019 04:45:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52816 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 1hNvik-0006QO-FT for qemu-devel@nongnu.org; Tue, 07 May 2019 04:45:06 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x478ffgg047187 for ; Tue, 7 May 2019 04:45:06 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sb6m2rejp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 07 May 2019 04:45:05 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 May 2019 09:45:04 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 7 May 2019 09:45:02 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x478j1kv50856062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 May 2019 08:45:01 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 011D711C05B; Tue, 7 May 2019 08:45:01 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C604F11C05E; Tue, 7 May 2019 08:45:00 +0000 (GMT) Received: from bahia.lan (unknown [9.145.26.205]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 7 May 2019 08:45:00 +0000 (GMT) From: Greg Kurz To: qemu-devel@nongnu.org Date: Tue, 07 May 2019 10:45:00 +0200 In-Reply-To: <155721868351.451636.16735088470797960209.stgit@bahia.lan> References: <155721868351.451636.16735088470797960209.stgit@bahia.lan> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19050708-0008-0000-0000-000002E41364 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050708-0009-0000-0000-000022508F08 Message-Id: <155721870044.451636.8272207759150286399.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-07_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=951 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905070057 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH 3/6] fsdev: Move some types definition to qemu-fsdev.c 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: Paolo Bonzini , Thomas Huth , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" It would make sense for these types to be defined in a header file if we had an API for fsdrivers to register themselves. In practice, we only have three of them and it is very unlikely we add new ones since the future of file sharing between host and guest is the upcoming virtio-fs. Move the types to qemu-fsdev.c instead since they are only used there. Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth --- fsdev/qemu-fsdev.c | 23 +++++++++++++++++++++++ fsdev/qemu-fsdev.h | 24 ------------------------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index 54cb36a2124b..e972bd698cf5 100644 --- a/fsdev/qemu-fsdev.c +++ b/fsdev/qemu-fsdev.c @@ -18,6 +18,29 @@ #include "qemu/error-report.h" #include "qemu/option.h" =20 +/* + * A table to store the various file systems and their callback operations. + * ----------------- + * fstype | ops + * ----------------- + * local | local_ops + * . | + * . | + * . | + * . | + * ----------------- + * etc + */ +typedef struct FsDriverTable { + const char *name; + FileOperations *ops; +} FsDriverTable; + +typedef struct FsDriverListEntry { + FsDriverEntry fse; + QTAILQ_ENTRY(FsDriverListEntry) next; +} FsDriverListEntry; + static QTAILQ_HEAD(, FsDriverListEntry) fsdriver_entries =3D QTAILQ_HEAD_INITIALIZER(fsdriver_entries); =20 diff --git a/fsdev/qemu-fsdev.h b/fsdev/qemu-fsdev.h index 844159d1e1ff..52a53977701a 100644 --- a/fsdev/qemu-fsdev.h +++ b/fsdev/qemu-fsdev.h @@ -14,30 +14,6 @@ #define QEMU_FSDEV_H #include "file-op-9p.h" =20 - -/* - * A table to store the various file systems and their callback operations. - * ----------------- - * fstype | ops - * ----------------- - * local | local_ops - * . | - * . | - * . | - * . | - * ----------------- - * etc - */ -typedef struct FsDriverTable { - const char *name; - FileOperations *ops; -} FsDriverTable; - -typedef struct FsDriverListEntry { - FsDriverEntry fse; - QTAILQ_ENTRY(FsDriverListEntry) next; -} FsDriverListEntry; - int qemu_fsdev_add(QemuOpts *opts, Error **errp); FsDriverEntry *get_fsdev_fsentry(char *id); extern FileOperations local_ops;