From nobody Sun Apr 28 21:39:52 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=1611761593; cv=none; d=zohomail.com; s=zohoarc; b=mmwjCzAAdTc8zk5AITmDoUNeRzRYqUZsffwk7IFwfM9+KrDsA1NlLg5fXY0S0yyOx9R9Ek0KghDwtS/dr+EErYNVko7/UptNerzXXec/FIVJyeh5O7fSqa0WSL6evOaZOTbf5XWKaVV1/p3hBKEfRKqmlQxEKq7REpdwOKqpOSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611761593; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NCBL+mR9JZqZiEcZqPjiRv52Fj+FD/XJTvWuF80jUWE=; b=FteXDm4KZ2NWE6yRsEbOZcgLi0esIligzuxKBFabREXP35IhsODrGqq/03WKT9fM5MruqLP5Pt9YauIaxl49KuwCVjRpbLIEe52qPGcZmvlJSQMUIZ5hH6erFA1hoOfAd91ifUbaCckTgn7drNsY1/ajBK6CBdV1+N7Yt0dLsx8= 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) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1611761593513284.44252662209976; Wed, 27 Jan 2021 07:33:13 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.76158.137295 (Exim 4.92) (envelope-from ) id 1l4moR-0001py-L1; Wed, 27 Jan 2021 15:32:55 +0000 Received: by outflank-mailman (output) from mailman id 76158.137295; Wed, 27 Jan 2021 15:32:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l4moR-0001pr-I4; Wed, 27 Jan 2021 15:32:55 +0000 Received: by outflank-mailman (input) for mailman id 76158; Wed, 27 Jan 2021 15:32:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l4moQ-0001pm-Ek for xen-devel@lists.xenproject.org; Wed, 27 Jan 2021 15:32:54 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 243aed72-fe80-4e26-abd1-23b47152ed9d; Wed, 27 Jan 2021 15:32:53 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 607C4B74D; Wed, 27 Jan 2021 15:32:52 +0000 (UTC) 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: 243aed72-fe80-4e26-abd1-23b47152ed9d X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1611761572; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NCBL+mR9JZqZiEcZqPjiRv52Fj+FD/XJTvWuF80jUWE=; b=UZJlEAwfdxIc8yvqzjykhzXIUbkDcm6ipkWxq8KwF68ypvbXlIoRT50be07+fnihZaolFw d4fS5hJ354S7AswGr6vkhgO0XY01U8WKLoR3wA9ogsFJiFsxI/jzr+z1GG2OP++y9GE0gy 9xORxJAQnGJrqQYKiLVemHcRhe2cQvY= To: "xen-devel@lists.xenproject.org" Cc: Ian Jackson , Wei Liu , Juergen Gross From: Jan Beulich Subject: [PATCH] xenstored: fix build on libc without O_CLOEXEC Message-ID: Date: Wed, 27 Jan 2021 16:32:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" The call to lu_read_state() would remain unresolved in this case. Frame the construct by a suitable #ifdef, and while at it also frame command line handling related pieces similarly. Fixes: 9777fa6b6ea0 ("tools/xenstore: evaluate the live update flag when st= arting") Signed-off-by: Jan Beulich Reviewed-by: Ian Jackson --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -2061,7 +2061,9 @@ static struct option options[] =3D { { "internal-db", 0, NULL, 'I' }, { "verbose", 0, NULL, 'V' }, { "watch-nb", 1, NULL, 'W' }, +#ifndef NO_LIVE_UPDATE { "live-update", 0, NULL, 'U' }, +#endif { NULL, 0, NULL, 0 } }; =20 extern void dump_conn(struct connection *conn);=20 @@ -2141,9 +2143,11 @@ int main(int argc, char *argv[]) case 'p': priv_domid =3D strtol(optarg, NULL, 10); break; +#ifndef NO_LIVE_UPDATE case 'U': live_update =3D true; break; +#endif } } if (optind !=3D argc) @@ -2206,9 +2210,11 @@ int main(int argc, char *argv[]) if (tracefile) tracefile =3D talloc_strdup(NULL, tracefile); =20 +#ifndef NO_LIVE_UPDATE /* Read state in case of live update. */ if (live_update) lu_read_state(); +#endif =20 /* Get ready to listen to the tools. */ initialize_fds(&sock_pollfd_idx, &timeout);