bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] df: new option: --total (-c) to produce grand total (in the


From: Andreas Schwab
Subject: Re: [PATCH] df: new option: --total (-c) to produce grand total (in the same way as du)
Date: Tue, 02 Sep 2008 10:55:05 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

Kamil Dudka <address@hidden> writes:

> @@ -296,7 +338,9 @@ show_dev (char const *disk, char const *mount_point,
>    if (!stat_file)
>      stat_file = mount_point ? mount_point : disk;
>  
> -  if (get_fs_usage (stat_file, disk, &fsu))
> +  if (force_fsu)
> +    memcpy(&fsu, force_fsu, sizeof(struct fs_usage));

       fsu = *force_fsu;

> @@ -794,11 +849,14 @@ main (int argc, char **argv)
>    file_systems_processed = false;
>    posix_format = false;
>    exit_status = EXIT_SUCCESS;
> +  print_grand_total = false;
> +  bzero(&grand_fsu, sizeof(struct fs_usage));

bzero is non-standard, and static variables are always initialized.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]