Revision d5249393 block-cow.c
b/block-cow.c | ||
---|---|---|
173 | 173 |
|
174 | 174 |
while (nb_sectors > 0) { |
175 | 175 |
if (is_changed(s->cow_bitmap, sector_num, nb_sectors, &n)) { |
176 |
lseek64(s->fd, s->cow_sectors_offset + sector_num * 512, SEEK_SET);
|
|
176 |
lseek(s->fd, s->cow_sectors_offset + sector_num * 512, SEEK_SET); |
|
177 | 177 |
ret = read(s->fd, buf, n * 512); |
178 | 178 |
if (ret != n * 512) |
179 | 179 |
return -1; |
... | ... | |
193 | 193 |
BDRVCowState *s = bs->opaque; |
194 | 194 |
int ret, i; |
195 | 195 |
|
196 |
lseek64(s->fd, s->cow_sectors_offset + sector_num * 512, SEEK_SET);
|
|
196 |
lseek(s->fd, s->cow_sectors_offset + sector_num * 512, SEEK_SET); |
|
197 | 197 |
ret = write(s->fd, buf, nb_sectors * 512); |
198 | 198 |
if (ret != nb_sectors * 512) |
199 | 199 |
return -1; |
Also available in: Unified diff