From nobody Tue Nov 11 07:31:04 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1570461384; cv=none; d=zoho.com; s=zohoarc; b=W4zTl0hglmk1LtK81q5YQiZSGhlCRjxr2mMH1Y/efz3Q6XS1ZKlY3nVRYKNwpm5rUqtmxveLi5NoKZVtMG9AnDLWY0JS2rVtbLUWPVEuNCFhmPMjcHFiIjCuzyvcmM5YjmycfcdSj3QsQqiPLvGKv5XaIiP2/7FbFGFyIK4LxlU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570461384; h=Content-Type: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:ARC-Authentication-Results; bh=H4y2TuQLJMT9r6g+nvQVwzJx+DZPoWAu/5usn60t1PE=; b=b4l3mPjckyJYYKPW2Vi9GlqMJ/QuERxrLqC2NqBBBoAOJsRPl6UX2ud6aBrtFErxMsNwENveqZ1pHm2KQ60a+nUWFy9W+2f+pbl7tgplkOSmNWksHDAz8KVq3SFaN39yp9sEpgnkGWVXd30IDNoaD0h9Us0rUupcpv3Pt8VHXAw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1570461384879743.2369418148372; Mon, 7 Oct 2019 08:16:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iHUjA-0007yl-MC; Mon, 07 Oct 2019 15:15:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iHUj9-0007xk-QP for xen-devel@lists.xenproject.org; Mon, 07 Oct 2019 15:15:11 +0000 Received: from mail-qt1-x841.google.com (unknown [2607:f8b0:4864:20::841]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0d3821aa-e915-11e9-9bee-bc764e2007e4; Mon, 07 Oct 2019 15:13:43 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id u22so19592653qtq.13 for ; Mon, 07 Oct 2019 08:13:43 -0700 (PDT) Received: from five.crux.rad.ainfosec.com (209-217-208-226.northland.net. [209.217.208.226]) by smtp.googlemail.com with ESMTPSA id c185sm8354313qkg.74.2019.10.07.08.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 08:13:42 -0700 (PDT) X-Inumbo-ID: 0d3821aa-e915-11e9-9bee-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3jlbshyhsnKwUe+1UF5DET0VROjnqCsc7bkrYu/FoCc=; b=t2iuLvbxglpe4k2o8NK6Ts3SwCZ7HElL+Lu7fht5a/F7+WT3Zon3xU08IHA3KzxJSi X7S5rOoo9ilmDotU4h7eZskBmdwKYo8gL1TD7R+Vo+BgNIRnmPjmCibpFMBJkQ1lLTta 3cEOziHjA0SIZfv7oqbweIKQLW6+Lnng3ldnNkZWjUV3iHiGt4/iXbWqygRotyoH4RJp sH32fg4U1MqD7xe6oGe+Jt9VlMvf7ErhEfe0ymLR/wpkvRKUT1xte64PThfpU2hHb7uC hvT1MQ9iRdNZh7VIjmrAlVSjS0JfClKp3nT+0H3AVbUgWK5wSQne/3cKKSQNsO1v9i9q u1PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3jlbshyhsnKwUe+1UF5DET0VROjnqCsc7bkrYu/FoCc=; b=gYobAsRts0EF4sHaGzo1D/euSR2IO58WxMvcjoTv3dDhex2Xs4dpubbKpmrEH6/qWO j5Tpd9GGZqN+Y/M0VUVrlrSRrL3DH5iVIa9Gow5l/+jJMDbmqbqyHnTpUQOguLYv16x6 Ys7zQydk7ZEUD7ScaUxd+MWpVRLWv4H3bnAvvLyOMrUElpcgPf+rWVuLqAeyZHw0Hr+a oLMvJ8Tzs5+rF3z0yA/WvlRkBw/vibtwDsEwN/I5RED+uVh1oIT5E6n577goXvk0Mm/P sBVLcX4lSgx14ws2asbZS5L3hGJwiSHUyjwsRWa8iobvoIPwgOmhapRd7uLHg3dGafwb vnKw== X-Gm-Message-State: APjAAAURiUXcYlXrdwrkWqtOv8j3Jx7Tiw99Y5zH3dwnjWiaKgmjsPEH UsSQVaODW8p0QzyIJf8LsYV3Ux8V X-Google-Smtp-Source: APXvYqyWpxIb1FPExH6TAxXj0lVj8Z7Bp8zOrwWRbdiA7PEs+1b/Q2YSuidVKfR8Rs7FzbiWolJsCQ== X-Received: by 2002:aed:2ae6:: with SMTP id t93mr30231192qtd.384.1570461223079; Mon, 07 Oct 2019 08:13:43 -0700 (PDT) From: Nick Rosbrook To: xen-devel@lists.xenproject.org Date: Mon, 7 Oct 2019 11:13:10 -0400 Message-Id: <96e1b2bbb921981be2d05232e5cc1f38a97d7809.1570456846.git.rosbrookn@ainfosec.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 23/24] golang/xenlight: add error return type to Context.Cpupoolinfo X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Nick Rosbrook , Ian Jackson , kerriganb@ainfosec.com, George Dunlap , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Nick Rosbrook A previous commit that removed Context.CheckOpen revealed an ineffectual assignent to err in Context.Cpupoolinfo, as there is no error return type. Since it appears that the intent is to return an error here, add an error return value to the function signature. Signed-off-by: Nick Rosbrook --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu tools/golang/xenlight/xenlight.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenl= ight.go index e540b5413d..0a4f476451 100644 --- a/tools/golang/xenlight/xenlight.go +++ b/tools/golang/xenlight/xenlight.go @@ -530,17 +530,17 @@ func (Ctx *Context) ListCpupool() (list []Cpupoolinfo= ) { } =20 // int libxl_cpupool_info(libxl_ctx *ctx, libxl_cpupoolinfo *info, uint32_= t poolid); -func (Ctx *Context) CpupoolInfo(Poolid uint32) (pool Cpupoolinfo) { +func (Ctx *Context) CpupoolInfo(Poolid uint32) (pool Cpupoolinfo, err erro= r) { var c_cpupool C.libxl_cpupoolinfo =20 ret :=3D C.libxl_cpupool_info(Ctx.ctx, &c_cpupool, C.uint32_t(Poolid)) if ret !=3D 0 { - //err =3D Error(-ret) + err =3D Error(-ret) return } defer C.libxl_cpupoolinfo_dispose(&c_cpupool) =20 - _ =3D pool.fromC(&c_cpupool) + err =3D pool.fromC(&c_cpupool) =20 return } --=20 2.19.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel