Message ID | 20211114172733.71602-6-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBHMOYWGAMGQE6X42KBA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=pTwaBF9f; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::23f; helo=mail-lj1-x23f.google.com; envelope-from=swupdate+bncbcxploxj6ikrbhmoywgamgqe6x42kba@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-lj1-x23f.google.com (mail-lj1-x23f.google.com [IPv6:2a00:1450:4864:20::23f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HsfRP1kVXz9t0G for <incoming@patchwork.ozlabs.org>; Mon, 15 Nov 2021 04:28:00 +1100 (AEDT) Received: by mail-lj1-x23f.google.com with SMTP id j11-20020a2ea90b000000b00218c174bb5dsf4414072ljq.22 for <incoming@patchwork.ozlabs.org>; Sun, 14 Nov 2021 09:28:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910878; cv=pass; d=google.com; s=arc-20160816; b=RnKAQ4YjMHsqHm0zK3A+psvywx3Vh3GhpKay170m6NLu9HReCwUQGC+IE9KVkc+BnV ci+z6gjmiqE5iN2HloltsekkZtmVHGHTUexdw632BKwWwVlMAzQpsb6yQc7ug3Za0+3z XNT+83nzK39PwxGv0HCENm5yiDxRxkK0t8v5kvDhjGd7L2mEmHNWQSo19nXGpYd7pBRN gDe2qqBqb/sc6yCWYMjY0Rp4Ri5GOv790fSCodK7pkXYWCIEeU774ZRtGOYGEs6MRmng xlvR4jqOTO4XdfiK9H61y7VvvUPKfbfy/erVJEnbO+sqV2zyszGt+eXb05/ohaHYq2IG W52A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=4ZTlcnXchLVuH0jqgqXIjKyM9G5ln8LcUaA5oKLMx3I=; b=NdbAtKMU3NMyeFT83KSYEV0miuFdDK+CwuD7Iy5OI/x9DSu42/jlBQP0ET5Pyzbk6g mHQ/dICzH70l27Ub7eVOU+xrG+hCGnVjphipzwum31EeXxumExSrF+998mH7PQnGW9ki Tf9UYtZuYMPuANv19/ptTw2as1xvvGWDpT4SVq8nKxSU4hWOTDoWvA6xTSSGSnRL2BBf NPzujSS2BH6/QfiTxi4z4gnHZJ+LYw/dMZsUK7qUlfrEU1+2X0TIGULhXvWumMo+UQQ8 0GfimFz1nuPNumc5CyifscbnuZXRcjioOWl1Ck8Q09Eo23EikurnqK1doi7lxHevjXm3 /dLg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=4ZTlcnXchLVuH0jqgqXIjKyM9G5ln8LcUaA5oKLMx3I=; b=pTwaBF9fCcsJ2L29kGQHsAKxGsxxps/gO5CKcTgdjOfuz3NwHR7F5Ue9dAFwnSmB26 /N3GP6ieUyiV1+hVuO3RNSyTGYy2cvvc/34nCO/3uD66ojfczREGklkKeCh68ciyKWRY x2/1kIasfgS4CAi8IhlYcNjfl6TMNBdVB8ZzRlA7tMr5qbDKLdxjtdDVCKmvgehj4hdR S7f4SLRX5ZaD2154IECqhkvDVu540d8ucOeqdG1Px9cB1xmrJ1obP5eKFbRAmZQSymm8 38Ly7M+HMlsuX7t5VvBxTIJIuNPffZ/j3WcZmCXr8C1Q31uQQnEMIQqqpyhn8AEfOB9E MNeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=4ZTlcnXchLVuH0jqgqXIjKyM9G5ln8LcUaA5oKLMx3I=; b=4eXVqZgCGz8+eQ5XUeyxuqACOOlkxj5fQcgbqaDvMjstThpis/dTLQOxY/6IfKXniD K/URCGv9Ryhjs4k8KRMWEgLVFXTCsjWMxIyDypwhv+xrbtDEa8MKfptn9EuUYXol+QNl IUjtOVEVOK3y7auqZOweGtrea5RXroHCk4MIk/11mMXldRd38gdlzfdV7tjBH6tmoJXU nEE154ZgzomVNYgGzD1XCjf1w0q+HYqJEWaZ1XRAP6dasLSLndhHYl5ABPOX8JBQrirt jkS6climabKRJgnddzTEAGDT2Ke0vLq/VO3XzqyTpZLKZLlq5GBhLFt/vBoM1xAQkHkC N8Jw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533T42nSy/F4TtPSIuLAz2HW16zRzYHVXwpoA1qeTuy2Q4YP1Fr6 XbniguB1m21Cq3dAnaD6BSI= X-Google-Smtp-Source: ABdhPJz2zCizRcc2UVi/bmLBrjimRkXPOEDRjFYEeUXXf3W6VJ2eBdd8+r1uawk/K6qlhfDoKC5P4w== X-Received: by 2002:a2e:bd82:: with SMTP id o2mr32202235ljq.96.1636910878117; Sun, 14 Nov 2021 09:27:58 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:3499:: with SMTP id v25ls4675185lfr.0.gmail; Sun, 14 Nov 2021 09:27:57 -0800 (PST) X-Received: by 2002:a05:6512:21cf:: with SMTP id d15mr28554979lft.394.1636910877250; Sun, 14 Nov 2021 09:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636910877; cv=none; d=google.com; s=arc-20160816; b=xPCuzh2RkmnYanQqDUgO1Pq5zbHo07Bw+hn9fhH/TwNdUL6FPvzBXb69VYgZJ0AOG2 z0qwNyhWHPDW/cIKBVtUI9UL3XgjZb0nN5jLJhZJZNxL3onKcInlJeV1LS2yMcM7xn9f Y3lBqW3GSCHNd+GuQvzRd7fxRq1xoFT++PM53Y6jCNBdzvARml918HfNBIB6JaPz7f/x 5Pc+cDboSiWYNpBgewRt0d+dajZRD2RHRfxY28NfqdcMoLJc0zD+7O3Gp98G3Ff6/x9+ YqPIiljUw1bX3l92ZTb03oGrT0OH4EvOfcPQ7w2P8KKMUh/9+IMR+ojZw0Jh0DpGm7T/ j/ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=eT8tfYPwy2yygQ6WCDJqFP7DgA6okRyNAfHkKTTrOZI=; b=0K/SOjkSyfwvdU72xI4aM0A41o7nJaiqx6fT3ci6xmWmT3aiWw0AU77foPy+Js00el Z5kF1gZH/g+M1wO5Sn2XRKX8cTggwTT3nWkSGNaZENy/tytjn6Bmo4JdeYKOYa6TSNH/ lTsTcU4rL0vj1Kzd7P9GgdWve9uodujG11ECHp+vltA3IDQqaOa6n0mJndY5Mbd9ZPht egDMLIteN8fvtzZh1gWmiDJHlCJ0/84Lm0LM2V03O6D/HnjQvCns/pLLvFNOGkKoFLbK DbDBJZ4QxexddvNbc6IWDm/7E1LujN5uhPNFd6SXsFXVB3WVpjSH1ZkEtNPb24rEMnA7 aH5w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id y7si654147ljp.7.2021.11.14.09.27.57 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 09:27:57 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HsfRJ5c5Tz1qwdP; Sun, 14 Nov 2021 18:27:56 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HsfRJ5ST2z1qqkB; Sun, 14 Nov 2021 18:27:56 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id RrAw7b8KcpXw; Sun, 14 Nov 2021 18:27:56 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sun, 14 Nov 2021 18:27:56 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id BE49545408E4; Sun, 14 Nov 2021 18:27:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kPs1_YFP1-vD; Sun, 14 Nov 2021 18:27:53 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 176284541BC4; Sun, 14 Nov 2021 18:27:45 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH V2 05/36] util: add function to convert string to lowercase Date: Sun, 14 Nov 2021 18:27:02 +0100 Message-Id: <20211114172733.71602-6-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211114172733.71602-1-sbabic@denx.de> References: <20211114172733.71602-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
DELTA Update
|
expand
|
diff --git a/core/util.c b/core/util.c index f5d7c63..3eeec41 100644 --- a/core/util.c +++ b/core/util.c @@ -281,6 +281,18 @@ char *substring(const char *src, int first, int len) { return s; } +/* + * Convert all chars of a string to lower, + * there is no ready to use function + */ + +char *string_tolower(char *s) +{ + char *p = s; + for ( ; *p; ++p) *p = tolower(*p); + return s; +} + int openfileoutput(const char *filename) { int fdout; diff --git a/include/util.h b/include/util.h index 4f2995b..091e41f 100644 --- a/include/util.h +++ b/include/util.h @@ -191,6 +191,7 @@ char **splitargs(char *args, int *argc); char *mstrcat(const char **nodes, const char *delim); char** string_split(const char* a_str, const char a_delim); char *substring(const char *src, int first, int len); +char *string_tolower(char *s); size_t snescape(char *dst, size_t n, const char *src); void freeargs (char **argv); int get_hw_revision(struct hw_type *hw);
No function available in libc, just add to utilities. Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/util.c | 12 ++++++++++++ include/util.h | 1 + 2 files changed, 13 insertions(+)