From nobody Fri Nov 29 12:34:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1642322041; cv=none; d=zohomail.com; s=zohoarc; b=PfK9xnOO3lvTkda53Q9tvYg86W4lMkW0/WZ6rplw6HYbhMo2alTEviEIvICEXOGXsrTle6MNmeE+H+03fM4VV0ig9QH5XANDngF6TihgR2bP8YS0oAXtyfzQY/QXU9XjEORXUxiVbKZxCkQg/5ROAPTiiFVbrfbNyVY0UeZuY34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642322041; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oOgPnC87mBVmQF7jR57eu5ZPcD/ugF9PvO1qiNK3tw0=; b=WZdCZXT3y+i1kYnLIXlkWYS1rr7uV3x1q+yZP6HOkvNWHwyfOyRsp95RmDvtSNFmqXbMbY0Wsj/bWjLCaTZkZ6EOQk+48+1xk4qRub+JA51AImrgdo619zKxxTpDQNO33ZeZ0q86VRvWEh4EUxMDk6PGJ+hlwfsj4u9G4X7xBro= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1642322041699912.1898047686774; Sun, 16 Jan 2022 00:34:01 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.257838.443286 (Exim 4.92) (envelope-from ) id 1n90yw-0002JR-85; Sun, 16 Jan 2022 08:33:46 +0000 Received: by outflank-mailman (output) from mailman id 257838.443286; Sun, 16 Jan 2022 08:33:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n90yv-0002Ef-7M; Sun, 16 Jan 2022 08:33:45 +0000 Received: by outflank-mailman (input) for mailman id 257838; Sun, 16 Jan 2022 08:33:41 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n90yq-0008IQ-VW for xen-devel@lists.xenproject.org; Sun, 16 Jan 2022 08:33:40 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fd22d509-76a6-11ec-9bbc-9dff3e4ee8c5; Sun, 16 Jan 2022 09:33:32 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E6C091F3B3; Sun, 16 Jan 2022 08:33:32 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BCFAB1346A; Sun, 16 Jan 2022 08:33:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EPjeLFzY42HyFQAAMHmgww (envelope-from ); Sun, 16 Jan 2022 08:33:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fd22d509-76a6-11ec-9bbc-9dff3e4ee8c5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1642322012; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oOgPnC87mBVmQF7jR57eu5ZPcD/ugF9PvO1qiNK3tw0=; b=HdBkVf2IlC6eWGmvrIixjb+2K/YwN1MUNDEScGcmGfxlV4b5RnkNiXoNxsQ5AZohqT2jFe +feJmN4FboDawfwO5jShMtHnttg1SpDpZmcS68zURnwstJxl4Smf2F8Zlp2AhoO4zFJjPi rDf7PtjLkmYTgBg3u82uLB3XHJHEF/w= From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Cc: samuel.thibault@ens-lyon.org, wl@xen.org, Juergen Gross Subject: [MINIOS PATCH v3 12/12] make files array private to sys.c Date: Sun, 16 Jan 2022 09:33:28 +0100 Message-Id: <20220116083328.26524-13-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220116083328.26524-1-jgross@suse.com> References: <20220116083328.26524-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1642322043318100019 Content-Type: text/plain; charset="utf-8" There is no user of the files[] array outside of lib/sys.c left, so it can be made static. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- include/lib.h | 2 -- lib/sys.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/lib.h b/include/lib.h index e815e0a3..bec99646 100644 --- a/include/lib.h +++ b/include/lib.h @@ -175,8 +175,6 @@ struct file { }; }; =20 -extern struct file files[]; - struct file_ops { const char *name; int (*read)(struct file *file, void *buf, size_t nbytes); diff --git a/lib/sys.c b/lib/sys.c index 7f3dc4e4..8f8a3de2 100644 --- a/lib/sys.c +++ b/lib/sys.c @@ -89,7 +89,7 @@ extern void minios_evtchn_close_fd(int fd); extern void minios_gnttab_close_fd(int fd); =20 pthread_mutex_t fd_lock =3D PTHREAD_MUTEX_INITIALIZER; -struct file files[NOFILE] =3D { +static struct file files[NOFILE] =3D { { .type =3D FTYPE_CONSOLE }, /* stdin */ { .type =3D FTYPE_CONSOLE }, /* stdout */ { .type =3D FTYPE_CONSOLE }, /* stderr */ --=20 2.26.2