Message ID | 1405692053-7514-4-git-send-email-leif.lindholm@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDT5PUNIR4DBBLWSUSPAKGQEO5B2I6Q@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6672220CA0 for <linaro@patches.linaro.org>; Fri, 18 Jul 2014 14:03:27 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id eb12sf14909175oac.5 for <linaro@patches.linaro.org>; Fri, 18 Jul 2014 07:03:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=Sq/Jz+5gA72UEsiUnzBYPsJxueJl0Yqmbvf/nyjkN2E=; b=fn6MTwRDoeE/LbUsxnOZ1ObnJrzzkW92wEdnkOPLuUo6TFR0h7kelIAC6g8gKxPngY yk5ZH0QsvjQbi5PVwIJq7DcAgL2nhIdLUIg0623paJKKhtbUFxD6EVZ9LCfhptH52x/z pmQGHixtjkztrUQEtEWMbmbbvmXEGQVQgrET6JFCPjdbx72Qwt0LAv2DC22lnN62cR5n 9+N1RMmbDtR8SVeBwFr6zm95ukHWvnjx/deluGP3/bphrsoQpycvYaLN3hgn3qVJzQ5V sIymZ9OAeV8v38T+RPuDE19MjgdmXOCi6LXZ60qSqn1NlvNwBoJxeZprtnZsV58cyXzM P6Nw== X-Gm-Message-State: ALoCoQmnNN3KJJskK15VeG6zz4Z9/iltaJjm+EVbu1syRtskuaqnbV5uEhwIXEJSO9C/wKHP9jVU X-Received: by 10.42.119.148 with SMTP id b20mr2468336icr.33.1405692206119; Fri, 18 Jul 2014 07:03:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.236 with SMTP id g99ls989170qge.17.gmail; Fri, 18 Jul 2014 07:03:26 -0700 (PDT) X-Received: by 10.220.68.140 with SMTP id v12mr6057858vci.13.1405692206015; Fri, 18 Jul 2014 07:03:26 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id sv16si5766700vdb.55.2014.07.18.07.03.25 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 07:03:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so5819986vcb.38 for <patchwork-forward@linaro.org>; Fri, 18 Jul 2014 07:03:25 -0700 (PDT) X-Received: by 10.220.203.134 with SMTP id fi6mr6290037vcb.18.1405692205941; Fri, 18 Jul 2014 07:03:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp13818vcb; Fri, 18 Jul 2014 07:03:25 -0700 (PDT) X-Received: by 10.68.213.34 with SMTP id np2mr3087343pbc.167.1405692204970; Fri, 18 Jul 2014 07:03:24 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id aa8si6086559pbd.60.2014.07.18.07.03.24 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:03:24 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88jF-0005Np-Vz; Fri, 18 Jul 2014 14:01:42 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88it-0004xD-UX for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 14:01:22 +0000 Received: by mail-wi0-f174.google.com with SMTP id d1so926832wiv.7 for <linux-arm-kernel@lists.infradead.org>; Fri, 18 Jul 2014 07:00:57 -0700 (PDT) X-Received: by 10.180.187.113 with SMTP id fr17mr7905601wic.51.1405692057159; Fri, 18 Jul 2014 07:00:57 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id ft17sm14465308wjc.14.2014.07.18.07.00.55 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:00:56 -0700 (PDT) From: Leif Lindholm <leif.lindholm@linaro.org> To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux@arm.linux.org.uk Subject: [PATCH 3/7] arm: add strstr to compressed string.c Date: Fri, 18 Jul 2014 15:00:49 +0100 Message-Id: <1405692053-7514-4-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> References: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_070120_176999_54642EFC X-CRM114-Status: GOOD ( 13.08 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.174 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.174 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: roy.franz@linaro.org, matt.fleming@intel.com, ard.biesheuvel@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/arch/arm/boot/compressed/string.c b/arch/arm/boot/compressed/string.c index 36e53ef..5397792 100644 --- a/arch/arm/boot/compressed/string.c +++ b/arch/arm/boot/compressed/string.c @@ -111,6 +111,27 @@ char *strchr(const char *s, int c) return (char *)s; } +/** + * strstr - Find the first substring in a %NUL terminated string + * @s1: The string to be searched + * @s2: The string to search for + */ +char *strstr(const char *s1, const char *s2) +{ + size_t l1, l2; + + l2 = strlen(s2); + if (!l2) + return (char *)s1; + l1 = strlen(s1); + while (l1 >= l2) { + l1--; + if (!memcmp(s1, s2, l2)) + return (char *)s1; + s1++; + } + return NULL; +} #undef memset void *memset(void *s, int c, size_t count)