Lines Matching refs:index
316 for (uint32_t index = 1; index <= pslice_count; index++) {
319 if ((status = GetSlice(index, &slice)) != ZX_OK) {
320 fprintf(stderr, "Failed to retrieve slice %u\n", index);
335 if (lseek(fd_.get(), fvm::SliceStart(disk_size_, slice_size_, index), SEEK_SET) < 0) {
336 fprintf(stderr, "Cannot seek to slice %u in current FVM\n", index);
346 if (lseek(fd.get(), fvm::SliceStart(disk_size, slice_size_, index), SEEK_SET) < 0) {
347 fprintf(stderr, "Cannot seek to slice %u in new FVM\n", index);
604 for (unsigned index = vpart_hint_; index < FVM_MAX_ENTRIES; index++) {
607 if ((status = GetPartition(index, &vpart)) != ZX_OK) {
608 fprintf(stderr, "Failed to retrieve partition %u\n", index);
615 vpart_hint_ = index + 1;
617 *vpart_index = index;
630 for (uint32_t index = pslice_hint_; index <= sb->pslice_count; index++) {
633 if ((status = GetSlice(index, &slice)) != ZX_OK) {
634 fprintf(stderr, "Failed to retrieve slice %u\n", index);
642 pslice_hint_ = index + 1;
647 *pslice = index;
655 zx_status_t FvmContainer::GetPartition(size_t index, fvm::vpart_entry_t** out) const {
658 if (index < 1 || index > FVM_MAX_ENTRIES) {
664 index * sizeof(fvm::vpart_entry_t));
669 zx_status_t FvmContainer::GetSlice(size_t index, fvm::slice_entry_t** out) const {
672 if (index < 1 || index > SuperBlock()->pslice_count) {
678 index * sizeof(fvm::slice_entry_t));