[U-Boot] [RFC/PATCH] Makefile: allow boards to check file size limits

Wolfgang Denk wd at denx.de
Tue Oct 19 07:24:44 CEST 2010


Dear Mike Frysinger,

In message <201010190017.52346.vapier at gentoo.org> you wrote:
>
> > > +	@actual=`wc -c $@ | awk '{print $$1}'`; \
> > 
> > How about using
> > 
> > 	stat -c '%s'
> > 
> > to get the file size in a single command, without need to actually
> > read all the data?
>
> because `stat` isnt portable :(.  it isnt part of the POSIX standard ... OSX 
> certainly does not support this, and i imagine most *BSD's dont.

I see (well, at least FreeBSD 8.1 has "stat"; their man page claims it
"appeared in NetBSD 1.6 and FreeBSD 4.10).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The two most common things in the universe are hydrogen  and  stupi-
dity."


More information about the U-Boot mailing list