Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 5/9] check-reqs.eclass: Replace obsolete df option -m with -B ###
Date: Mon, 28 Dec 2015 13:58:41
Message-Id: 20151228165826.3117022fcf5ed9f66d2089f6@gentoo.org
In Reply to: [gentoo-dev] [PATCH 5/9] check-reqs.eclass: Replace obsolete df option -m with -B ### by Justin Lecher
1 Hi,
2
3 On Mon, 28 Dec 2015 09:43:51 +0100 Justin Lecher wrote:
4 > Signed-off-by: Justin Lecher <jlec@g.o>
5 > ---
6 > eclass/check-reqs.eclass | 2 +-
7 > 1 file changed, 1 insertion(+), 1 deletion(-)
8 >
9 > diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
10 > index 138bfec..a32f8f8 100644
11 > --- a/eclass/check-reqs.eclass
12 > +++ b/eclass/check-reqs.eclass
13 > @@ -306,7 +306,7 @@ check-reqs_disk() {
14 > ${size} \
15 > "disk space at \"${path}\""
16 >
17 > - space_megs=$(df -Pm "${1}" 2>/dev/null | awk 'FNR == 2 {print $4}')
18 > + space_megs=$(df -P -B 1048576 "${1}" 2>/dev/null | awk 'FNR == 2 {print $4}')
19
20 Why not "-BM"? IMHO, this will be more readable, though, of course,
21 both arguments are semantically correct.
22
23 Best regards,
24 Andrew Savchenko

Replies