FreeBSD/sbin/recoverdisk/recoverdisk.c
/* Save the worklist if -w was given */
Save the worklist if -w was given
Save the worklist if - w was given
static void
save_worklist(void)
{
	FILE *file;
	struct lump *llp;
	if (wworklist != NULL) {
		(void)fprintf(stderr, "\nSaving worklist ...");
		fflush(stderr);
		file = fopen(wworklist, "w");
		if (file == NULL)
			err(1, "Error opening file %s", wworklist);
		TAILQ_FOREACH(llp, &lumps, list)
			fprintf(file, "%jd %jd %d\n",
			    (intmax_t)llp->start, (intmax_t)llp->len,
			    llp->state);
		fclose(file);
		(void)fprintf(stderr, " done.\n");
	}
}
static void save_worklist ( void ) { FILE * file ; struct lump * llp ; if ( wworklist != NULL ) { ( void ) fprintf ( stderr , " \n " ) ; fflush ( stderr ) ; file = fopen ( wworklist , " " ) ; if ( file == NULL ) err ( 1 , " " , wworklist ) ; TAILQ_FOREACH ( llp , & lumps , list ) fprintf ( file , " \n " , ( intmax_t ) llp -> start , ( intmax_t ) llp -> len , llp -> state ) ; fclose ( file ) ; ( void ) fprintf ( stderr , " \n " ) ; } }
Save the worklist if -w was given
Save the worklist if - w was given