Next: , Previous: , Up: Block Methods   [Contents][Index]


7.1.2 blonde_find_sector

extern int blonde_find_sector
    (void *, void *, unsigned, off_t *, unsigned *);

The function stores the file offset and size in bytes for the $2 block in the $1 data store (database, that is) at $4 and $5, respectively, according the $3 bits. The $2 block id is of an integer type matching the pointer size.

For this library version, the file path is the database path suffixed by the particle ".end".

Unless $3 sets the lowest bit, no information is retrieved for b-tree blocks (as they’re not meant to be accessed outside this library) and an error is reported for such blocks.

The function returns 0, and one of the defined error codes for failure.