test-index-version.c 258 Bytes
Newer Older
Duy Nguyen's avatar
Duy Nguyen committed
1 2
#include "cache.h"

3
int main(int argc, char **argv)
Duy Nguyen's avatar
Duy Nguyen committed
4 5 6 7 8 9 10 11 12 13 14
{
	struct cache_header hdr;
	int version;

	memset(&hdr,0,sizeof(hdr));
	if (read(0, &hdr, sizeof(hdr)) != sizeof(hdr))
		return 0;
	version = ntohl(hdr.hdr_version);
	printf("%d\n", version);
	return 0;
}