mirror of
https://github.com/sheumann/hush.git
synced 2025-01-14 12:30:40 +00:00
ls: forgotten chunk from prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
cae409c6aa
commit
1d63f046d0
@ -592,13 +592,15 @@ static void showfiles(struct dnode **dn, unsigned nfiles)
|
|||||||
* number of units.
|
* number of units.
|
||||||
*/
|
*/
|
||||||
/* by Jorgen Overgaard (jorgen AT antistaten.se) */
|
/* by Jorgen Overgaard (jorgen AT antistaten.se) */
|
||||||
static off_t calculate_blocks(struct dnode **dn, int nfiles)
|
static off_t calculate_blocks(struct dnode **dn)
|
||||||
{
|
{
|
||||||
uoff_t blocks = 1;
|
uoff_t blocks = 1;
|
||||||
while (nfiles) {
|
if (dn) {
|
||||||
blocks += (*dn)->dstat.st_blocks; /* in 512 byte blocks */
|
while (*dn) {
|
||||||
|
/* st_blocks is in 512 byte blocks */
|
||||||
|
blocks += (*dn)->dstat.st_blocks;
|
||||||
dn++;
|
dn++;
|
||||||
nfiles--;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Even though standard says use 512 byte blocks, coreutils use 1k */
|
/* Even though standard says use 512 byte blocks, coreutils use 1k */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user