+ int seek(sg_offset_t offset, int origin)
+ {
+ switch (origin) {
+ case SEEK_SET:
+ current_position_ = offset;
+ return 0;
+ case SEEK_CUR:
+ current_position_ += offset;
+ return 0;
+ case SEEK_END:
+ current_position_ = size_ + offset;
+ return 0;
+ default:
+ return -1;
+ }
+ }
+