Lines Matching refs:lens
366 fetch_sun(unsigned *starts, unsigned *lens, unsigned *start, unsigned *stop) in fetch_sun() argument
377 lens[i] = SUN_SSWAP32(sunlabel->partitions[i].num_sectors); in fetch_sun()
380 *start += lens[i]; in fetch_sun()
381 else if (starts[i] + lens[i] >= *stop) in fetch_sun()
390 lens[i] = 0; in fetch_sun()
409 unsigned starts[8], lens[8], start, stop; in verify_sun() local
414 fetch_sun(starts, lens, &start, &stop); in verify_sun()
417 if (k && (lens[i] % (g_heads * g_sectors))) { in verify_sun()
420 if (lens[i]) { in verify_sun()
422 if (lens[j]) { in verify_sun()
423 if (starts[j] == starts[i]+lens[i]) { in verify_sun()
424 starts[j] = starts[i]; lens[j] += lens[i]; in verify_sun()
425 lens[i] = 0; in verify_sun()
426 } else if (starts[i] == starts[j]+lens[j]){ in verify_sun()
427 lens[j] += lens[i]; in verify_sun()
428 lens[i] = 0; in verify_sun()
430 if (starts[i] < starts[j]+lens[j] in verify_sun()
431 && starts[j] < starts[i]+lens[i]) { in verify_sun()
435 endo = starts[i]+lens[i]; in verify_sun()
436 if (starts[j]+lens[j] < endo) in verify_sun()
437 endo = starts[j]+lens[j]; in verify_sun()
447 if (lens[i]) in verify_sun()
462 printf("Unused gap - sectors %u-%u\n", starts[array[i]]+lens[array[i]], starts[array[i+1]]); in verify_sun()
464 start = starts[array[i]] + lens[array[i]]; in verify_sun()
473 unsigned starts[8], lens[8]; in add_sun_partition() local
484 fetch_sun(starts, lens, &start, &stop); in add_sun_partition()
530 if (lens[i] && starts[i] <= first && starts[i] + lens[i] > first) in add_sun_partition()