Home | History | Annotate | Download | only in cgpt

Lines Matching defs:group

18   int priority;                         // priority of this group
19 int num_parts; // number of partitions in this group
20 uint32_t *part; // array of partitions in this group
24 int max_parts; // max number of partitions in any group
26 group_t group[MAX_GROUPS]; // array of groups
36 // reserve space for the maximum number of partitions in every group
38 gl->group[i].priority = -1;
39 gl->group[i].num_parts = 0;
40 gl->group[i].part = (uint32_t *)malloc(sizeof(uint32_t) * max_p);
41 require(gl->group[i].part);
50 free(gl->group[i].part);
56 // See if I've already got a group with this priority
58 if (gl->group[i].priority == priority)
61 // no, add a group
64 gl->group[i].priority = priority;
67 int j = gl->group[i].num_parts;
68 gl->group[i].part[j] = partition;
69 gl->group[i].num_parts++;
75 if (gl->group[i].priority == old_priority) {
76 gl->group[i].priority = new_priority;
87 tmp = gl->group[i];
88 for (j=i; j && (gl->group[j-1].priority < tmp.priority); j--)
89 gl->group[j] = gl->group[j-1];
90 gl->group[j] = tmp;
163 // If we're including friends, then change the original group priority
172 // We'll never lower anything to zero, so if the last group is priority zero
175 if (groups->group[i-1].priority == 0)
186 groups->group[i].priority = priority;
193 for (j=0; j<groups->group[i].num_parts; j++)
195 groups->group[i].part[j], groups->group[i].priority);