Mercurial > hg > cdb
comparison cdb.c @ 17:d9c11148df3b default tip
shh...
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Thu, 28 Aug 2025 11:02:58 +0100 |
| parents | 70f4df5a7283 |
| children |
comparison
equal
deleted
inserted
replaced
| 16:70f4df5a7283 | 17:d9c11148df3b |
|---|---|
| 62 c->fd = fd; | 62 c->fd = fd; |
| 63 | 63 |
| 64 if (fstat(fd,&st) == 0) | 64 if (fstat(fd,&st) == 0) |
| 65 if (st.st_size <= 0xffffffff) { | 65 if (st.st_size <= 0xffffffff) { |
| 66 sprintf(_buf,"%'u",st.st_size); | 66 sprintf(_buf,"%'u",st.st_size); |
| 67 strerr_warn3("cdb_init ","fd size: ",_buf,0); | 67 /*strerr_warn3("cdb_init ","fd size: ",_buf,0); */ |
| 68 x = mmap(0,st.st_size,PROT_READ,MAP_SHARED,fd,0); | 68 x = mmap(0,st.st_size,PROT_READ,MAP_SHARED,fd,0); |
| 69 sprintf(_buf,"%x",x); | 69 sprintf(_buf,"%x",x); |
| 70 strerr_warn3("cdb_init ","mmap addr: ",_buf,0); | 70 /*strerr_warn3("cdb_init ","mmap addr: ",_buf,0); */ |
| 71 if (x + 1) { | 71 if (x + 1) { |
| 72 c->size = st.st_size; | 72 c->size = st.st_size; |
| 73 c->map = x; | 73 c->map = x; |
| 74 } | 74 } |
| 75 } | 75 } |
