
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char *args[])
{
	if (argc == 2 && strcmp(args[1], "-version") == 0)
	{
		printf("mkisofsDummy 1.12 (i686-pc-linux-gnu)\n");
		return 0;
	}

	FILE *in = fopen("/tmp/mkisofs.out", "r");
	assert(in != NULL);

	while (1)
	{
		char str[1024];
		fgets(str, sizeof str, in);
		if (feof(in))
			return 0;
		printf("%s", str);
		fflush(stdout);

		int n;
		if (sscanf(str, "%d", &n) == 1)
			sleep(2);
		else
			usleep(100000);
	}
}

