|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T s ┃
Length: 979 (0x3d3) Types: TextFile Names: »statcheck.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/cfs/statcheck.c«
/* * statcheck - checks status of files in statfile */ #include "cfs.h" statcheck (statfile, verbose) char *statfile; int verbose; { extern char *myname; FILE *fp; int errflg = 0; int rstat = 0; char name[MAXPATHLEN]; struct stat osbuf; struct stat nsbuf; FILE *openread (); fp = openread (statfile); /* * for each entry in statfile, get stored status */ while (!(rstat = readstat (fp, statfile, name, &osbuf))) { /* * stat real file */ if (stat (name, &nsbuf)) { printf ("status check FAILED for %s\n", name); if (verbose) printf ("%s: %s - %s\n\n", myname, name, sys_errlist[errno]); errflg++; } /* * compare old status with new status */ else if (statcomp (&osbuf, &nsbuf)) { printf ("status check FAILED for %s\n", name); if (verbose) print2stat (&osbuf, &nsbuf); errflg++; } } if (rstat < 0) errflg++; fclose (fp); return (errflg); }