lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6bu6fbyvltx74goc6ul5ao6srvcl44wwq5c4v5trk6ioj2nwhj@cbhod6tkucex>
Date:   Sun, 7 May 2023 22:49:34 +0000
From:   Shinichiro Kawasaki <shinichiro.kawasaki@....com>
To:     Daniel Wagner <dwagner@...e.de>
CC:     "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        Chaitanya Kulkarni <kch@...dia.com>,
        Shin'ichiro Kawasaki <shinichiro@...tmail.com>,
        Hannes Reinecke <hare@...e.de>
Subject: Re: [PATCH blktests v3 01/12] nvme/rc: Auto convert test device size
 info

On May 03, 2023 / 10:02, Daniel Wagner wrote:
[...]
> +convert_to_mb()
> +{
> +	local str=$1
> +	local res
> +
> +	res=$(echo "${str}" | sed -n 's/^\([0-9]\+\)$/\1/p')
> +	if [[ -n "${res}" ]]; then
> +		echo "$((res / 1024 / 1024))"
> +	fi
> +
> +	res=$(echo "${str}" | sed -n 's/^\([0-9]\+\)[mM]$/\1/p')
> +	if [[ -n "${res}" ]]; then
> +		echo "$((res))"
> +	fi
> +
> +	res=$(echo "${str}" | sed -n 's/^\([0-9]\+\)[gG]$/\1/p')
> +	if [[ -n "${res}" ]]; then
> +        	echo "$((res * 1024))"

Here are some spaces still  left.

> +	fi
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ