diff options
Diffstat (limited to 'block/partitions/efi.c')
| -rw-r--r-- | block/partitions/efi.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/block/partitions/efi.c b/block/partitions/efi.c index dc51f467a560..56d08fd75b1a 100644 --- a/block/partitions/efi.c +++ b/block/partitions/efi.c | |||
| @@ -121,7 +121,7 @@ __setup("gpt", force_gpt_fn); | |||
| 121 | /** | 121 | /** |
| 122 | * efi_crc32() - EFI version of crc32 function | 122 | * efi_crc32() - EFI version of crc32 function |
| 123 | * @buf: buffer to calculate crc32 of | 123 | * @buf: buffer to calculate crc32 of |
| 124 | * @len - length of buf | 124 | * @len: length of buf |
| 125 | * | 125 | * |
| 126 | * Description: Returns EFI-style CRC32 value for @buf | 126 | * Description: Returns EFI-style CRC32 value for @buf |
| 127 | * | 127 | * |
| @@ -240,10 +240,10 @@ done: | |||
| 240 | 240 | ||
| 241 | /** | 241 | /** |
| 242 | * read_lba(): Read bytes from disk, starting at given LBA | 242 | * read_lba(): Read bytes from disk, starting at given LBA |
| 243 | * @state | 243 | * @state: disk parsed partitions |
| 244 | * @lba | 244 | * @lba: the Logical Block Address of the partition table |
| 245 | * @buffer | 245 | * @buffer: destination buffer |
| 246 | * @size_t | 246 | * @count: bytes to read |
| 247 | * | 247 | * |
| 248 | * Description: Reads @count bytes from @state->bdev into @buffer. | 248 | * Description: Reads @count bytes from @state->bdev into @buffer. |
| 249 | * Returns number of bytes read on success, 0 on error. | 249 | * Returns number of bytes read on success, 0 on error. |
| @@ -277,8 +277,8 @@ static size_t read_lba(struct parsed_partitions *state, | |||
| 277 | 277 | ||
| 278 | /** | 278 | /** |
| 279 | * alloc_read_gpt_entries(): reads partition entries from disk | 279 | * alloc_read_gpt_entries(): reads partition entries from disk |
| 280 | * @state | 280 | * @state: disk parsed partitions |
| 281 | * @gpt - GPT header | 281 | * @gpt: GPT header |
| 282 | * | 282 | * |
| 283 | * Description: Returns ptes on success, NULL on error. | 283 | * Description: Returns ptes on success, NULL on error. |
| 284 | * Allocates space for PTEs based on information found in @gpt. | 284 | * Allocates space for PTEs based on information found in @gpt. |
| @@ -312,8 +312,8 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state, | |||
| 312 | 312 | ||
| 313 | /** | 313 | /** |
| 314 | * alloc_read_gpt_header(): Allocates GPT header, reads into it from disk | 314 | * alloc_read_gpt_header(): Allocates GPT header, reads into it from disk |
| 315 | * @state | 315 | * @state: disk parsed partitions |
| 316 | * @lba is the Logical Block Address of the partition table | 316 | * @lba: the Logical Block Address of the partition table |
| 317 | * | 317 | * |
| 318 | * Description: returns GPT header on success, NULL on error. Allocates | 318 | * Description: returns GPT header on success, NULL on error. Allocates |
| 319 | * and fills a GPT header starting at @ from @state->bdev. | 319 | * and fills a GPT header starting at @ from @state->bdev. |
| @@ -340,10 +340,10 @@ static gpt_header *alloc_read_gpt_header(struct parsed_partitions *state, | |||
| 340 | 340 | ||
| 341 | /** | 341 | /** |
| 342 | * is_gpt_valid() - tests one GPT header and PTEs for validity | 342 | * is_gpt_valid() - tests one GPT header and PTEs for validity |
| 343 | * @state | 343 | * @state: disk parsed partitions |
| 344 | * @lba is the logical block address of the GPT header to test | 344 | * @lba: logical block address of the GPT header to test |
| 345 | * @gpt is a GPT header ptr, filled on return. | 345 | * @gpt: GPT header ptr, filled on return. |
| 346 | * @ptes is a PTEs ptr, filled on return. | 346 | * @ptes: PTEs ptr, filled on return. |
| 347 | * | 347 | * |
| 348 | * Description: returns 1 if valid, 0 on error. | 348 | * Description: returns 1 if valid, 0 on error. |
| 349 | * If valid, returns pointers to newly allocated GPT header and PTEs. | 349 | * If valid, returns pointers to newly allocated GPT header and PTEs. |
| @@ -461,8 +461,8 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba, | |||
| 461 | 461 | ||
| 462 | /** | 462 | /** |
| 463 | * is_pte_valid() - tests one PTE for validity | 463 | * is_pte_valid() - tests one PTE for validity |
| 464 | * @pte is the pte to check | 464 | * @pte:pte to check |
| 465 | * @lastlba is last lba of the disk | 465 | * @lastlba: last lba of the disk |
| 466 | * | 466 | * |
| 467 | * Description: returns 1 if valid, 0 on error. | 467 | * Description: returns 1 if valid, 0 on error. |
| 468 | */ | 468 | */ |
| @@ -478,9 +478,10 @@ is_pte_valid(const gpt_entry *pte, const u64 lastlba) | |||
| 478 | 478 | ||
| 479 | /** | 479 | /** |
| 480 | * compare_gpts() - Search disk for valid GPT headers and PTEs | 480 | * compare_gpts() - Search disk for valid GPT headers and PTEs |
| 481 | * @pgpt is the primary GPT header | 481 | * @pgpt: primary GPT header |
| 482 | * @agpt is the alternate GPT header | 482 | * @agpt: alternate GPT header |
| 483 | * @lastlba is the last LBA number | 483 | * @lastlba: last LBA number |
| 484 | * | ||
| 484 | * Description: Returns nothing. Sanity checks pgpt and agpt fields | 485 | * Description: Returns nothing. Sanity checks pgpt and agpt fields |
| 485 | * and prints warnings on discrepancies. | 486 | * and prints warnings on discrepancies. |
| 486 | * | 487 | * |
| @@ -572,9 +573,10 @@ compare_gpts(gpt_header *pgpt, gpt_header *agpt, u64 lastlba) | |||
| 572 | 573 | ||
| 573 | /** | 574 | /** |
| 574 | * find_valid_gpt() - Search disk for valid GPT headers and PTEs | 575 | * find_valid_gpt() - Search disk for valid GPT headers and PTEs |
| 575 | * @state | 576 | * @state: disk parsed partitions |
| 576 | * @gpt is a GPT header ptr, filled on return. | 577 | * @gpt: GPT header ptr, filled on return. |
| 577 | * @ptes is a PTEs ptr, filled on return. | 578 | * @ptes: PTEs ptr, filled on return. |
| 579 | * | ||
| 578 | * Description: Returns 1 if valid, 0 on error. | 580 | * Description: Returns 1 if valid, 0 on error. |
| 579 | * If valid, returns pointers to newly allocated GPT header and PTEs. | 581 | * If valid, returns pointers to newly allocated GPT header and PTEs. |
| 580 | * Validity depends on PMBR being valid (or being overridden by the | 582 | * Validity depends on PMBR being valid (or being overridden by the |
| @@ -663,7 +665,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt, | |||
| 663 | 665 | ||
| 664 | /** | 666 | /** |
| 665 | * efi_partition(struct parsed_partitions *state) | 667 | * efi_partition(struct parsed_partitions *state) |
| 666 | * @state | 668 | * @state: disk parsed partitions |
| 667 | * | 669 | * |
| 668 | * Description: called from check.c, if the disk contains GPT | 670 | * Description: called from check.c, if the disk contains GPT |
| 669 | * partitions, sets up partition entries in the kernel. | 671 | * partitions, sets up partition entries in the kernel. |
