Lines Matching refs:offset
32 * offsets[i] is the offset in the .dmg file,
59 static off_t read_off(BlockDriverState *bs, int64_t offset)
62 if (bdrv_pread(bs->file, offset, &buffer, 8) < 8)
67 static off_t read_uint32(BlockDriverState *bs, int64_t offset)
70 if (bdrv_pread(bs->file, offset, &buffer, 4) < 4)
81 int64_t offset;
87 /* read offset of info blocks */
88 offset = bdrv_getlength(bs->file);
89 if (offset < 0) {
92 offset -= 0x1d8;
94 info_begin = read_off(bs, offset);
109 offset = info_begin + 0x100;
113 while (offset < info_end) {
116 count = read_uint32(bs, offset);
119 offset += 4;
121 type = read_uint32(bs, offset);
125 offset += 4;
126 offset += 200;
137 s->types[i] = read_uint32(bs, offset);
138 offset += 4;
146 offset += 36;
149 offset += 4;
151 s->sectors[i] = last_out_offset+read_off(bs, offset);
152 offset += 8;
154 s->sectorcounts[i] = read_off(bs, offset);
155 offset += 8;
157 s->offsets[i] = last_in_offset+read_off(bs, offset);
158 offset += 8;
160 s->lengths[i] = read_off(bs, offset);
161 offset += 8;