• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/partitions/

Lines Matching defs:gpt

28  *   AGPT, allow override with 'gpt' kernel command line option.
51 * - Changed gpt structure names and members to be simpler and more Linux-like.
73 * - Added kernel command line option 'gpt' to override valid PMBR test.
105 /* This allows a kernel command line option 'gpt' to override
116 __setup("gpt", force_gpt_fn);
222 * @gpt - GPT header
225 * Allocates space for PTEs based on information found in @gpt.
229 alloc_read_gpt_entries(struct block_device *bdev, gpt_header *gpt)
233 if (!bdev || !gpt)
236 count = le32_to_cpu(gpt->num_partition_entries) *
237 le32_to_cpu(gpt->sizeof_partition_entry);
244 if (read_lba(bdev, le64_to_cpu(gpt->partition_entry_lba),
261 * Note: remember to free gpt when finished with it.
266 gpt_header *gpt;
270 gpt = kzalloc(sizeof (gpt_header), GFP_KERNEL);
271 if (!gpt)
274 if (read_lba(bdev, lba, (u8 *) gpt,
276 kfree(gpt);
277 gpt=NULL;
281 return gpt;
288 * @gpt is a GPT header ptr, filled on return.
296 gpt_header **gpt, gpt_entry **ptes)
301 if (!bdev || !gpt || !ptes)
303 if (!(*gpt = alloc_read_gpt_header(bdev, lba)))
307 if (le64_to_cpu((*gpt)->signature) != GPT_HEADER_SIGNATURE) {
310 (unsigned long long)le64_to_cpu((*gpt)->signature),
316 origcrc = le32_to_cpu((*gpt)->header_crc32);
317 (*gpt)->header_crc32 = 0;
318 crc = efi_crc32((const unsigned char *) (*gpt), le32_to_cpu((*gpt)->header_size));
326 (*gpt)->header_crc32 = cpu_to_le32(origcrc);
330 if (le64_to_cpu((*gpt)->my_lba) != lba) {
332 (unsigned long long)le64_to_cpu((*gpt)->my_lba),
341 if (le64_to_cpu((*gpt)->first_usable_lba) > lastlba) {
343 (unsigned long long)le64_to_cpu((*gpt)->first_usable_lba),
347 if (le64_to_cpu((*gpt)->last_usable_lba) > lastlba) {
349 (unsigned long long)le64_to_cpu((*gpt)->last_usable_lba),
354 if (!(*ptes = alloc_read_gpt_entries(bdev, *gpt)))
359 le32_to_cpu((*gpt)->num_partition_entries) *
360 le32_to_cpu((*gpt)->sizeof_partition_entry));
362 if (crc != le32_to_cpu((*gpt)->partition_entry_array_crc32)) {
374 kfree(*gpt);
375 *gpt = NULL;
500 * @gpt is a GPT header ptr, filled on return.
505 * 'gpt' kernel command line option) and finding either the Primary
508 * is not checked unless the 'gpt' kernel command line option is passed.
513 find_valid_gpt(struct block_device *bdev, gpt_header **gpt, gpt_entry **ptes)
520 if (!bdev || !gpt || !ptes)
555 *gpt = pgpt;
567 *gpt = agpt;
581 *gpt = NULL;
609 gpt_header *gpt = NULL;
613 if (!find_valid_gpt(bdev, &gpt, &ptes) || !gpt || !ptes) {
614 kfree(gpt);
621 for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) && i < state->limit-1; i++) {
636 kfree(gpt);