From nobody Mon Feb 9 00:30:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646643684; cv=none; d=zohomail.com; s=zohoarc; b=mEWuLTtzZro3aMliB8LLFGC+WeHWDn1grzrm5v55WMvzDY0LxkLXIn3RIVJx9vofhErZELrPrzgIRgPCr3Ap5/8gvjxIYYYTP3tCMd+63mM6Ecgcc5Yl6BbbsVtwnYV6dboEZqKD1NCvg1E9s5TdCNve8IJdzxxF1VmaCwCUJI8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646643684; h=Content-Type:Content-Transfer-Encoding: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; bh=XvkWGMUUL/mEILf/sRYOZA+omNQaR8dX/nwuzpkd1nY=; b=MsFqApwBssWLw7y1TxFQGyImzqBbPXv8V2aWDhXJuT07GksOdPE0oHOQefoB0g48EJR1EK9/WOLjmEWw+wxnRhGwy+T4ZLFiwhnikCkoKefITBFOz06U/xV97z60ppAWk9aUymuHUqmN+LOTd6yMND6ptztpdPbggwceBQv6q5Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1646643684979481.3307401887987; Mon, 7 Mar 2022 01:01:24 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-408-H2nyUls5OJGtqGULIMiapg-1; Mon, 07 Mar 2022 04:01:19 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA7932999B21; Mon, 7 Mar 2022 09:01:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 968BEC0809D; Mon, 7 Mar 2022 09:01:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5CF701931BF4; Mon, 7 Mar 2022 09:01:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 515181931BD1 for ; Mon, 7 Mar 2022 09:01:15 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0F1C91F470; Mon, 7 Mar 2022 09:01:15 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82E091FD3D for ; Mon, 7 Mar 2022 09:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646643684; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XvkWGMUUL/mEILf/sRYOZA+omNQaR8dX/nwuzpkd1nY=; b=V1D9RsiN1rc8DW32WZh0DMyQWlwD7A1yGcC1f0MyFEpe8HiomV4lzT5hcmtcSFaw84gYV+ NuLpWIFBT3/QszFGJ6L5sdsRVkHXdlC94B3YRpHsm9b0GHZEO3gjK9PV4KIYm3a+vKia1Y burPu/oylyyffJe539OCzBIgy1D/WAU= X-MC-Unique: H2nyUls5OJGtqGULIMiapg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 06/17] lxc_fuse.c: Modernize function declarations Date: Mon, 7 Mar 2022 10:00:56 +0100 Message-Id: <8f60703df6bda13977ea9ef24c2236850e37c786.1646643526.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1646643685765100005 Content-Type: text/plain; charset="utf-8" Our style of writing function declarations has changed since the time the file was introduced. Fix the whole file. Signed-off-by: Michal Privoznik --- src/lxc/lxc_fuse.c | 71 ++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index 6c61cbdf02..b6b653e8cd 100644 --- a/src/lxc/lxc_fuse.c +++ b/src/lxc/lxc_fuse.c @@ -54,7 +54,9 @@ struct virLXCFuse { =20 static const char *fuse_meminfo_path =3D "/meminfo"; =20 -static int lxcProcGetattr(const char *path, struct stat *stbuf) +static int +lxcProcGetattr(const char *path, + struct stat *stbuf) { g_autofree char *mempath =3D NULL; struct stat sb; @@ -88,10 +90,12 @@ static int lxcProcGetattr(const char *path, struct stat= *stbuf) return 0; } =20 -static int lxcProcReaddir(const char *path, void *buf, - fuse_fill_dir_t filler, - off_t offset G_GNUC_UNUSED, - struct fuse_file_info *fi G_GNUC_UNUSED) +static int +lxcProcReaddir(const char *path, + void *buf, + fuse_fill_dir_t filler, + off_t offset G_GNUC_UNUSED, + struct fuse_file_info *fi G_GNUC_UNUSED) { if (STRNEQ(path, "/")) return -ENOENT; @@ -103,8 +107,9 @@ static int lxcProcReaddir(const char *path, void *buf, return 0; } =20 -static int lxcProcOpen(const char *path, - struct fuse_file_info *fi) +static int +lxcProcOpen(const char *path, + struct fuse_file_info *fi) { if (STRNEQ(path, fuse_meminfo_path)) return -ENOENT; @@ -115,7 +120,11 @@ static int lxcProcOpen(const char *path, return 0; } =20 -static int lxcProcHostRead(char *path, char *buf, size_t size, off_t offse= t) +static int +lxcProcHostRead(char *path, + char *buf, + size_t size, + off_t offset) { int fd; int res; @@ -131,8 +140,12 @@ static int lxcProcHostRead(char *path, char *buf, size= _t size, off_t offset) return res; } =20 -static int lxcProcReadMeminfo(char *hostpath, virDomainDef *def, - char *buf, size_t size, off_t offset) +static int +lxcProcReadMeminfo(char *hostpath, + virDomainDef *def, + char *buf, + size_t size, + off_t offset) { int res; FILE *fd =3D NULL; @@ -242,11 +255,12 @@ static int lxcProcReadMeminfo(char *hostpath, virDoma= inDef *def, return res; } =20 -static int lxcProcRead(const char *path, - char *buf, - size_t size, - off_t offset, - struct fuse_file_info *fi G_GNUC_UNUSED) +static int +lxcProcRead(const char *path, + char *buf, + size_t size, + off_t offset, + struct fuse_file_info *fi G_GNUC_UNUSED) { int res =3D -ENOENT; g_autofree char *hostpath =3D NULL; @@ -273,7 +287,8 @@ static struct fuse_operations lxcProcOper =3D { .read =3D lxcProcRead, }; =20 -static void lxcFuseDestroy(struct virLXCFuse *fuse) +static void +lxcFuseDestroy(struct virLXCFuse *fuse) { VIR_LOCK_GUARD lock =3D virLockGuardLock(&fuse->lock); =20 @@ -281,7 +296,8 @@ static void lxcFuseDestroy(struct virLXCFuse *fuse) g_clear_pointer(&fuse->fuse, fuse_destroy); } =20 -static void lxcFuseRun(void *opaque) +static void +lxcFuseRun(void *opaque) { struct virLXCFuse *fuse =3D opaque; =20 @@ -292,7 +308,9 @@ static void lxcFuseRun(void *opaque) lxcFuseDestroy(fuse); } =20 -int lxcSetupFuse(struct virLXCFuse **f, virDomainDef *def) +int +lxcSetupFuse(struct virLXCFuse **f, + virDomainDef *def) { int ret =3D -1; struct fuse_args args =3D FUSE_ARGS_INIT(0, NULL); @@ -342,7 +360,8 @@ int lxcSetupFuse(struct virLXCFuse **f, virDomainDef *d= ef) goto cleanup; } =20 -int lxcStartFuse(struct virLXCFuse *fuse) +int +lxcStartFuse(struct virLXCFuse *fuse) { if (virThreadCreateFull(&fuse->thread, false, lxcFuseRun, "lxc-fuse", false, (void *)fuse) < 0) { @@ -353,7 +372,8 @@ int lxcStartFuse(struct virLXCFuse *fuse) return 0; } =20 -void lxcFreeFuse(struct virLXCFuse **f) +void +lxcFreeFuse(struct virLXCFuse **f) { struct virLXCFuse *fuse =3D *f; /* lxcFuseRun thread create success */ @@ -370,18 +390,21 @@ void lxcFreeFuse(struct virLXCFuse **f) } } #else -int lxcSetupFuse(struct virLXCFuse **f G_GNUC_UNUSED, - virDomainDef *def G_GNUC_UNUSED) +int +lxcSetupFuse(struct virLXCFuse **f G_GNUC_UNUSED, + virDomainDef *def G_GNUC_UNUSED) { return 0; } =20 -int lxcStartFuse(struct virLXCFuse *f G_GNUC_UNUSED) +int +lxcStartFuse(struct virLXCFuse *f G_GNUC_UNUSED) { return 0; } =20 -void lxcFreeFuse(struct virLXCFuse **f G_GNUC_UNUSED) +void +lxcFreeFuse(struct virLXCFuse **f G_GNUC_UNUSED) { } #endif --=20 2.34.1