X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;ds=inline;f=sources%2FDirMonitor.c;h=2f11833a800479a96f6c0bff6edbf34a03efc26d;hb=86daf7e40ebb0b24397b67e1a272100bcccd539a;hp=7e6b2884ee7866b3e666c702420266e4f1337c16;hpb=b8248eaf35d824e8816c76ad9f9561c76d67b915;p=gapil.git diff --git a/sources/DirMonitor.c b/sources/DirMonitor.c index 7e6b288..2f11833 100644 --- a/sources/DirMonitor.c +++ b/sources/DirMonitor.c @@ -25,7 +25,7 @@ * * Author: S. Piccardi Jan. 2003 * - * $Id: DirMonitor.c,v 1.2 2003/01/04 17:24:30 piccardi Exp $ + * $Id: DirMonitor.c,v 1.4 2003/01/10 09:28:49 piccardi Exp $ * *****************************************************************************/ #include @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) } } /* - * Routine to print file name and size inside DirScan + * Routine to compute directory properties inside DirScan */ int ComputeValues(struct dirent * direntry) { @@ -137,10 +137,10 @@ int ComputeValues(struct dirent * direntry) if (S_ISREG(data.st_mode)) shmptr->tot_regular++; if (S_ISFIFO(data.st_mode)) shmptr->tot_fifo++; if (S_ISLNK(data.st_mode)) shmptr->tot_link++; - if (S_ISDIR(data.st_mode)) shmptr->tot_dir; - if (S_ISBLK(data.st_mode)) shmptr->tot_block; - if (S_ISCHR(data.st_mode)) shmptr->tot_char; - if (S_ISSOCK(data.st_mode)) shmptr->tot_sock; + if (S_ISDIR(data.st_mode)) shmptr->tot_dir++; + if (S_ISBLK(data.st_mode)) shmptr->tot_block++; + if (S_ISCHR(data.st_mode)) shmptr->tot_char++; + if (S_ISSOCK(data.st_mode)) shmptr->tot_sock++; return 0; } /*