Lines Matching +full:part +full:- +full:number

1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2000-2004
22 #define LOG2_INVALID(type) ((type)((sizeof(type)<<3)-1))
24 /* Part types */
32 /* maximum number of partition entries supported by search */
38 * Type string for U-Boot bootable partitions
40 #define BOOT_PART_TYPE "U-Boot" /* primary boot partition type */
47 #define DEV_TYPE_CDROM 0x05 /* CD-ROM */
56 lbaint_t size; /* number of blocks in partition */
81 * blk_get_dev() - get a pointer to a block device given its type and number
88 * @dev: Device number (0 for first device on that interface, 1 for
98 /* disk/part.c */
99 int part_get_info(struct blk_desc *dev_desc, int part, disk_partition_t *info);
101 * part_get_info_whole_disk() - get partition info for the special case of
111 * blk_get_device_by_str() - Get a block device given its interface/hw partition
118 * of a device - each hardware partition is effectively a separately
124 * When a hardware partition number is given, the block device switches to
129 * containing the device number (e.g. "2") or the device number
130 * and hardware partition number (e.g. "2.4") for devices that
133 * @return block device number (local to the interface), or -1 on error
139 * blk_get_device_part_str() - Get a block device and partition
145 * <dev>.<hw_part>:<part> where <dev> is the device number,
146 * <hw_part> is the optional hardware partition number and
147 * <part> is the partition number
155 * If @dev_part_str is NULL or empty or "-", then this function looks up
167 * partition number >= 1
168 * @return partition number, or -1 on error
176 * part_get_info_by_name_type() - Search for a partition by name
179 * @param dev_desc - block device descriptor
180 * @param gpt_name - the specified table entry name
181 * @param info - returns the disk partition info
182 * @param part_type - only search in partitions of this type
184 * @return - the partition number on match (starting on 1), -1 on no match,
191 * part_get_info_by_name() - Search for a partition by name
194 * @param dev_desc - block device descriptor
195 * @param gpt_name - the specified table entry name
196 * @param info - returns the disk partition info
198 * @return - the partition number on match (starting on 1), -1 on no match,
205 * part_set_generic_name() - create generic partition like hda1 or sdb2
209 * number.
212 * @part_num: partition number for which the name is generated
224 static inline int part_get_info(struct blk_desc *dev_desc, int part, in part_get_info() argument
225 disk_partition_t *info) { return -1; } in part_get_info()
228 { return -1; } in part_get_info_whole_disk()
234 { return -1; } in blk_get_device_by_str()
240 { *dev_desc = NULL; return -1; } in blk_get_device_part_str()
264 const int max_entries; /* maximum number of entries to search */
267 * get_info() - Get information about a partition
270 * @part: Partition number (1 = first)
273 int (*get_info)(struct blk_desc *dev_desc, int part,
277 * print() - Print partition information
284 * test() - Test if a device contains this partition type
288 * type, -ve if not
293 /* Declare a new U-Boot partition 'driver' */
302 * write_gpt_table() - Write the GUID Partition Table to disk
304 * @param dev_desc - block device descriptor
305 * @param gpt_h - pointer to GPT header representation
306 * @param gpt_e - pointer to GPT partition table entries
308 * @return - zero on success, otherwise error
316 * @param dev_desc - block device descriptor
317 * @param gpt_h - GPT header representation
318 * @param gpt_e - GPT partition table entries
319 * @param partitions - list of partitions
320 * @param parts - number of partitions
331 * @param dev_desc - block device descriptor
332 * @param gpt_h - GPT header representation
333 * @param str_guid - disk guid string representation
334 * @param parts_count - number of partitions
336 * @return - error on str_guid conversion error
344 * @param dev_desc - block device descriptor
345 * @param str_disk_guid - disk GUID
346 * @param partitions - list of partitions
347 * @param parts - number of partitions
355 * is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
357 * @param dev_desc - block device descriptor
358 * @param buf - buffer which contains the MBR and Primary GPT info
360 * @return - '0' on success, otherwise error
365 * write_mbr_and_gpt_partitions() - write MBR, Primary GPT and Backup GPT
367 * @param dev_desc - block device descriptor
368 * @param buf - buffer which contains the MBR and Primary GPT info
370 * @return - '0' on success, otherwise error
375 * gpt_verify_headers() - Function to read and CRC32 check of the GPT's header
380 * @param dev_desc - block device descriptor
381 * @param gpt_head - pointer to GPT header data read from medium
382 * @param gpt_pte - pointer to GPT partition table enties read from medium
384 * @return - '0' on success, otherwise error
390 * gpt_verify_partitions() - Function to check if partitions' name, start and
397 * @param dev_desc - block device descriptor
398 * @param partitions - partition data read from '$partitions' env variable
399 * @param parts - number of partitions read from '$partitions' env variable
400 * @param gpt_head - pointer to GPT header data read from medium
401 * @param gpt_pte - pointer to GPT partition table enties read from medium
403 * @return - '0' on success, otherwise error
411 * get_disk_guid() - Function to read the GUID string from a device's GPT
416 * @param dev_desc - block device descriptor
417 * @param guid - pre-allocated string in which to return the GUID
419 * @return - '0' on success, otherwise error
427 * is_valid_dos_buf() - Ensure that a DOS MBR image is valid
429 * @param buf - buffer which contains the MBR
431 * @return - '0' on success, otherwise error
436 * write_mbr_partition() - write DOS MBR
438 * @param dev_desc - block device descriptor
439 * @param buf - buffer which contains the MBR
441 * @return - '0' on success, otherwise error