From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 3 of 3] xl: allow for node-wise specification of vcpu pinning Date: Thu, 18 Oct 2012 15:11:07 +0200 Message-ID: <1350565867.24760.9.camel@Abyss> References: <6d7a403305dd057f61bd.1350408388@Solace> <1350559390.2460.124.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1955831591141418740==" Return-path: In-Reply-To: <1350559390.2460.124.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Andre Przywara , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============1955831591141418740== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TqI0ElFErC3rnAjyLiYJ" --=-TqI0ElFErC3rnAjyLiYJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2012-10-18 at 12:23 +0100, Ian Campbell wrote:=20 > On Tue, 2012-10-16 at 18:26 +0100, Dario Faggioli wrote: >=20 > > + isnot =3D 1; > > + } > > + /* Check if we're dealing with a full node */ > > + if (strstr(toka, "node:") =3D=3D toka || strstr(toka, "nodes:"= ) =3D=3D toka) { >=20 > Isn't strstr(FOO, "thing") =3D=3D FOO just an expensive way of writing > strncmp(FOO, "ting", sizeof(...))? >=20 Mmm... what I wanted was to make sure that "thing" not only is part of FOO, but that also is the very beginning of that same string. That's why I exploited the fact that strstr() returns a pointer to the beginning of the substring "thing" within FOO. Now that you mentioned it, I think that I actually can achieve the same with strncmp, limiting the comparison at strlen("thing"). If that was what you meant, the answer is yes, I can do that (and I agree it's probably better). Thanks for looking into this, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-TqI0ElFErC3rnAjyLiYJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlB//+wACgkQk4XaBE3IOsSjwQCeJL44zfytkembqsXxhVxceXET BoQAoIge9m39HwaQnwhR8hVogmu02mYV =iwqb -----END PGP SIGNATURE----- --=-TqI0ElFErC3rnAjyLiYJ-- --===============1955831591141418740== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1955831591141418740==--