• Home
  • Raw
  • Download

Lines Matching refs:state

117 	struct parsed_partitions *state;  in allocate_partitions()  local
120 state = kzalloc(sizeof(*state), GFP_KERNEL); in allocate_partitions()
121 if (!state) in allocate_partitions()
125 state->parts = vzalloc(nr * sizeof(state->parts[0])); in allocate_partitions()
126 if (!state->parts) { in allocate_partitions()
127 kfree(state); in allocate_partitions()
131 state->limit = nr; in allocate_partitions()
133 return state; in allocate_partitions()
136 void free_partitions(struct parsed_partitions *state) in free_partitions() argument
138 vfree(state->parts); in free_partitions()
139 kfree(state); in free_partitions()
145 struct parsed_partitions *state; in check_partition() local
148 state = allocate_partitions(hd); in check_partition()
149 if (!state) in check_partition()
151 state->pp_buf = (char *)__get_free_page(GFP_KERNEL); in check_partition()
152 if (!state->pp_buf) { in check_partition()
153 free_partitions(state); in check_partition()
156 state->pp_buf[0] = '\0'; in check_partition()
158 state->bdev = bdev; in check_partition()
159 disk_name(hd, 0, state->name); in check_partition()
160 snprintf(state->pp_buf, PAGE_SIZE, " %s:", state->name); in check_partition()
161 if (isdigit(state->name[strlen(state->name)-1])) in check_partition()
162 sprintf(state->name, "p"); in check_partition()
166 memset(state->parts, 0, state->limit * sizeof(state->parts[0])); in check_partition()
167 res = check_part[i++](state); in check_partition()
178 printk(KERN_INFO "%s", state->pp_buf); in check_partition()
180 free_page((unsigned long)state->pp_buf); in check_partition()
181 return state; in check_partition()
183 if (state->access_beyond_eod) in check_partition()
190 strlcat(state->pp_buf, in check_partition()
192 printk(KERN_INFO "%s", state->pp_buf); in check_partition()
195 free_page((unsigned long)state->pp_buf); in check_partition()
196 free_partitions(state); in check_partition()