+ static int init=0;
+ struct ubik_hdr thdr;
+
+ if (!init) {
+ thdr.version.epoch = htonl(0);
+ thdr.version.counter = htonl(0);
+ thdr.magic = htonl(UBIK_MAGIC);
+ thdr.size = htonl(HDRSIZE);
+ lseek(dbase_fd, 0, 0);
+ write(dbase_fd, &thdr, sizeof(thdr));
+ fsync(dbase_fd);
+ init = 1;
+ }