Lines Matching refs:start
102 static void set_hsc(struct partition *p, sector_t start, sector_t end)
104 if (dos_flag && (start / (g_sectors * g_heads) > 1023))
105 start = g_heads * g_sectors * ONE_K - 1;
106 p->sector = (start % g_sectors) + 1;
107 start /= g_sectors;
108 p->head = start % g_heads;
109 start /= g_heads;
110 p->cyl = start & 0xFF;
111 p->sector |= (start >> 2) & 0xc0;
411 sector_t start, end;
423 start = swap_le32toh((unsigned char*)(p->start4));
424 end = start + swap_le32toh((unsigned char*)(p->size4)) -1;
426 lbc = start/(g_sectors * g_heads);
427 lbh = (start/g_sectors) % g_heads;
428 lbs = (start % g_sectors) + 1;
611 // change the start of the 4th partiton.
724 //taking user input for partition start/end sectors/cyinders
796 //validating if the start given falls in a limit or not
797 static int validate(int start_index, sector_t* begin,sector_t* end, sector_t start
802 if (start >= begin[i] && start <= end[i]) {
803 if (asked) xprintf("Sector %lld is already allocated\n",start);
811 //get the start sector/cylinder of a new partition
814 sector_t start, limit, temp = 0, start_cyl, limit_cyl, offset = 1;
819 start = offset;
829 start = begin[ext_idx] + offset;
834 if (asked) valid = validate(start_index, begin, end, start, asked);
839 if (start >= begin[i] && start <= end[i])
840 start = end[i] + 1 + ((idx >= 4)? offset : 0);
841 } while (!validate(start_index, begin, end, start, 0));
843 start_cyl = start/(g_sectors * g_heads) + 1;
846 if (start > limit) break;
848 (long long int)(disp_unit_cyl? start_cyl : start),
850 (long long int)(disp_unit_cyl? start_cyl : start));
851 temp = ask_value(mesg, disp_unit_cyl? start_cyl : start,
852 disp_unit_cyl? limit_cyl : limit, disp_unit_cyl? start_cyl : start);
856 // point to the cylinder start sector
858 if (temp < start) //the boundary is falling in the already used sectors.
859 temp = start;
861 start = temp;
863 return start;
869 sector_t limit, temp = 0, start_cyl, limit_cyl, start = start_sec;
884 if (start < pe->start_offset && limit >= pe->start_offset) limit = pe->start_offset - 1;
885 if (start < begin[i] && limit >= begin[i]) limit = begin[i] - 1;
888 start_cyl = start/(g_sectors * g_heads) + 1;
890 if (limit < start) { //the boundary is falling in the already used sectors.
896 (long long int)(disp_unit_cyl? start_cyl : start),
899 temp = ask_value(mesg, disp_unit_cyl? start_cyl : start,
902 if (disp_unit_cyl) { // point to the cylinder start sector
906 if (temp < start) { //the boundary is falling in the already used sectors.
917 sector_t start, end, begin_sec[num_parts], end_sec[num_parts];
937 start = ask_start_sector(idx, begin_sec, end_sec, ext_idx);
938 end = ask_end_sector(idx, begin_sec, end_sec, ext_idx, start);
945 if (dos_flag) pe->start_offset = start - (sector_t)g_sectors;
946 else pe->start_offset = start - 1;
948 if (!dos_flag) start++;
951 set_levalue(p->start4, start - pe->start_offset);
952 set_levalue(p->size4, end - start + 1);
953 set_hsc(p, start, end);
961 set_levalue(p->size4, end - start + 1 + (dos_flag? g_sectors: 1));
972 pe->start_offset = extended_offset = start;
1064 static void check(int n, unsigned h, unsigned s, unsigned c, sector_t start)
1078 if (g_cylinders <= ONE_K && start != total)
1079 xprintf("Partition %u: previous sectors %lld disagrees with total %lld\n", n, start, total);
1107 xprintf("Warning: bad start-of-data in partition %u\n", i + 1);
1146 sector_t start, num, new_start, end;
1152 start = swap_le32toh(p->start4) + pe->start_offset;
1154 end = start + num -1;
1161 (long long int)(end), (long long int)(start));
1162 new_start = ask_value(mesg, 0, end, start);
1163 if (new_start != start) {
1412 if (!err) return (dev_geo.start == 0);
1498 toggle_active_flag(p - 1); //partition table index start from 0.