When calculating the width of the blocksize column, ls(1) used 512-byte
units (as returned by stat(2)) instead of BLOCKSIZE units. Submitted by: Paul Schenkeveld MFC after: 3 weeks
This commit is contained in:
parent
5adf6f1dc4
commit
9ce09549af
@ -44,7 +44,7 @@ static char sccsid[] = "@(#)ls.c 8.5 (Berkeley) 4/2/94";
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mac.h>
|
||||
@ -835,7 +835,7 @@ label_out:
|
||||
d.maxlen = maxlen;
|
||||
if (needstats) {
|
||||
d.btotal = btotal;
|
||||
d.s_block = snprintf(NULL, 0, "%lu", maxblock);
|
||||
d.s_block = snprintf(NULL, 0, "%lu", howmany(maxblock, blocksize));
|
||||
d.s_flags = maxflags;
|
||||
d.s_label = maxlabelstr;
|
||||
d.s_group = maxgroup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user