From patchwork Thu Jun 24 19:05:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Salvaterra X-Patchwork-Id: 1496768 X-Patchwork-Delegate: mail@aparcar.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=a5xuli6c; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lq0veWe5; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 ozlabs.org (Postfix) with ESMTPS id 4G9qRF2LYbz9sPf for ; Fri, 25 Jun 2021 05:08:25 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qhKLFpoIpDKqkYJnMSqk/RG1yjaQ6LIv4k+c09sTER8=; b=a5xuli6cFbvFbk UKD8N+BcVkxgfzR6yNQ7MZFpq8yDWItHncZHOkTdoBh3SOn9GVa8NltF5TZE7e5Xpg6n7Q5I2vjym 5LPQ2vj1Eku5MTuCD3sIWJOzyJrkDyCW7uQLd+Ka1GHmxZIzqV3xFK+JKkM235QUAfHVq7Ok2/Ylk KZDsNKqdz1ml535nH/DTiiRNJGQGfH2rf7VZYklIcXcHrHeSJxk/nzlBgZkL2Yg2i8x1qw9s7YM1W fRAVTTWzgCidjc9gYuI7BcZGvW5J0N1OUPTJ42jISqRN+XlFtxSn2JcNPxmqcvjaQz1X26NFB/sUR tyCMuFE9LfmUyfvljSGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwUgP-00Fy1J-A1; Thu, 24 Jun 2021 19:06:37 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwUfN-00Fxfq-TJ for openwrt-devel@lists.openwrt.org; Thu, 24 Jun 2021 19:05:35 +0000 Received: by mail-ej1-x630.google.com with SMTP id nb6so11115663ejc.10 for ; Thu, 24 Jun 2021 12:05:33 -0700 (PDT) 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=qzezjjlUtQ9TfAu7Xjv1SrnJ6ArIhZlWhMakeoDwAW0=; b=lq0veWe5gv7uaMkEiAXTXmxAIfx8iNcrdFw5+V8jkTHGGbH3spzxMpdLBNj/ON2hqC vR9aNJ/YGJ/AXFNf/xqC4jGCxRzVvW+3vUWyVaL9jg3TbKXCgn0pwU+3YzjXan0/60Wb cbAwRwUT1EwBFurWLOmDgEiUKiDoX5UHcok8Uohl1lVJGXQwyiWRuE7Q5kRRya5/yrhS bDTk8VqTBTdhWYfW+J7ZUgvU/bYRVDdspPe+bhqbFIio2T/sODPdZ7jN5BaON3N4Nnxu lvqhYNp0AhoLHQjxfksS8eJRepVsFVkSHYhBmmWJV12qJShsUakYZ2idnRrOu4cTRdiv DJ0A== 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=qzezjjlUtQ9TfAu7Xjv1SrnJ6ArIhZlWhMakeoDwAW0=; b=Hx+o4+WHHcACTaCI2LvnBwWCRm3595SEuPqZZ1q40KvTep3L0Mlp2r++UsXIIgGuYS MZT9p5sC+901+q7d/mEVC1vc13k+9jdN9+cZzI/zvhjFHqH/yvykdbHjJF67BESswVtQ Oime7uqq62Wu8j2QcpXnfCUMN8eqkzyrM4CcKBR2+vtSnHh1sIqjY7MFE/kKqHXT2rck hXfLfehO2/RwrM8ARjPj2wTMX1iLFGVMmi+5WGVondWthYNZgnG0ZgTR+PCWVZz38oFO Tdj1A6M446PLAHjOVdpI2E/JRr82Jcw7ngtiw/3R3okC2Exoaic3O4cqiNVXawvIQMjf ChFg== X-Gm-Message-State: AOAM532yZazSe1hekkqOZ0ZGlDacAK5WoG/oQ8qSWscpaVinPTxg5Fjz rzscMeb/4AHZTc5f5diwxBmo9b41uA== X-Google-Smtp-Source: ABdhPJxmMsz+mWeiXKkxCpNIiGb4141F1ljQWMtdis5Q58TGWqYxy0rHoI1D/6bPyRu1bppjv5pV1A== X-Received: by 2002:a17:906:2608:: with SMTP id h8mr6607783ejc.380.1624561532502; Thu, 24 Jun 2021 12:05:32 -0700 (PDT) Received: from mallard.lan (a95-93-125-60.cpe.netcabo.pt. [95.93.125.60]) by smtp.gmail.com with ESMTPSA id b19sm2398843edd.10.2021.06.24.12.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 12:05:32 -0700 (PDT) From: Rui Salvaterra To: openwrt-devel@lists.openwrt.org Subject: [PATCH 3/3] zram-swap: clean up the log messages Date: Thu, 24 Jun 2021 20:05:23 +0100 Message-Id: <20210624190523.296296-4-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210624190523.296296-1-rsalvaterra@gmail.com> References: <20210624190523.296296-1-rsalvaterra@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210624_120534_024100_E748B7DD X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Remove redundant tags and name things more consistently. Signed-off-by: Rui Salvaterra --- package/system/zram-swap/files/zram.init | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:630 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rsalvaterra[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rui Salvaterra Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Remove redundant tags and name things more consistently. Signed-off-by: Rui Salvaterra --- package/system/zram-swap/files/zram.init | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init index ea9b55680e..e894025b38 100755 --- a/package/system/zram-swap/files/zram.init +++ b/package/system/zram-swap/files/zram.init @@ -2,8 +2,8 @@ START=15 -extra_command "compact" "Trigger compaction for all Z-RAM swap dev's" -extra_command "status" "Print out information & statistics about Z-RAM swap devices" +extra_command "compact" "Trigger compaction for all zram swap devices" +extra_command "status" "Print out information & statistics about zram swap devices" ram_getsize() { @@ -60,15 +60,15 @@ zram_comp_algo() local zram_comp_algo="$( uci -q get system.@system[0].zram_comp_algo )" if [ -z "$zram_comp_algo" ]; then - # lzo-rle fails on small RAM devices, default to lzo, which is always available + # default to lzo, which is always available zram_comp_algo="lzo" fi if [ $(grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm) -ne 0 ]; then - logger -s -t zram_comp_algo -p daemon.debug "Set compression algorithm '$zram_comp_algo' for zram '$dev'" + logger -s -t zram_comp_algo -p daemon.debug "set compression algorithm '$zram_comp_algo' for zram '$dev'" echo $zram_comp_algo > "/sys/block/$( basename $dev )/comp_algorithm" else - logger -s -t zram_comp_algo -p daemon.debug "Compression algorithm '$zram_comp_algo' is not supported for '$dev'" + logger -s -t zram_comp_algo -p daemon.debug "compression algorithm '$zram_comp_algo' is not supported for '$dev'" fi } @@ -79,7 +79,7 @@ zram_stats() printf "\nGathering stats info for zram device \"$( basename "$1" )\"\n\n" - printf "Z-RAM\n-----\n" + printf "ZRAM\n-----\n" printf "%-25s - %s\n" "Block device" $zdev awk '{ printf "%-25s - %d MiB\n", "Device size", $1/1024/1024 }' <$zdev/disksize printf "%-25s - %s\n" "Compression algo" "$(cat $zdev/comp_algorithm)" @@ -131,7 +131,7 @@ start() } if [ $( grep -cs zram /proc/swaps ) -ne 0 ]; then - logger -s -t zram_start -p daemon.notice "[OK] zram swap is already mounted" + logger -s -t zram_start -p daemon.notice "zram swap is already mounted" return 1 fi @@ -149,7 +149,7 @@ start() zram_priority="100" fi - logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MegaBytes)" + logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MiB)" zram_reset "$zram_dev" "enforcing defaults" zram_comp_algo "$zram_dev"