Lines Matching defs:partition

82  * mtd_parse_partition - Parse @mtdparts partition definition, fill @partition
85 * The partition name is allocated and must be freed by the caller.
89 * @mtdparts: String describing the partition with mtdparts command syntax
90 * @partition: MTD partition structure to fill
95 struct mtd_partition *partition)
102 /* Ensure the partition structure is empty */
103 memset(partition, 0, sizeof(struct mtd_partition));
105 /* Fetch the partition size */
107 /* Assign all remaining space to this partition */
108 partition->size = MTD_SIZE_REMAINING;
111 partition->size = ustrtoull(mtdparts, (char **)&mtdparts, 0);
112 if (partition->size < SZ_4K) {
113 printf("Minimum partition size 4kiB, %lldB requested\n",
114 partition->size);
120 partition->offset = MTD_OFFSET_NOT_SPECIFIED;
123 partition->offset = ustrtoull(mtdparts, (char **)&mtdparts, 0);
131 printf("No closing ')' found in partition name\n");
136 printf("Empty partition name\n");
145 /* Check if the partition is read-only */
147 partition->mask_flags |= MTD_WRITEABLE;
151 /* Check for a potential next partition definition */
153 if (partition->size == MTD_SIZE_REMAINING) {
177 partition->size, partition->offset);
180 partition->name = buf;
188 * mtd_parse_partitions - Create a partition array from an mtdparts definition
192 * the corresponding MTD partition structure array @_parts. Both the name and
193 * the structure partition itself must be freed freed, the caller may use
208 struct mtd_partition partition = {}, *parts;
217 ret = mtd_parse_partition(&mtdparts, &partition);
221 free((char *)partition.name);
232 /* Iterate again over each partition to save the data in our array */
345 * of this partition.
533 debug("Deleting %s MTD partition\n", slave->name);
536 printf("Error when deleting partition \"%s\" (%d)\n",
569 /* allocate the partition structure */
580 /* set up the MTD object for this partition */
670 debug("Moving partition %d: "
681 debug("mtd partition \"%s\" doesn't have enough space: %#llx < %#llx, disabled\n",
699 printk(KERN_ERR"mtd: partition \"%s\" is out of reach -- disabled\n",
705 printk(KERN_WARNING"mtd: partition \"%s\" extends beyond the end of device \"%s\" -- size truncated to %#llx\n",
715 * partition. */
739 printk(KERN_WARNING"mtd: partition \"%s\" doesn't start on an erase block boundary -- force read-only\n",
745 printk(KERN_WARNING"mtd: partition \"%s\" doesn't end on an erase block -- force read-only\n",
849 * This function, given a master MTD object and a partition table, creates
851 * the partition definitions.
913 debug("Missing partition offset/size on \"%s\" partition\n",
925 * mask, and so MTD_WRITABLE will be removed on partition
1003 * @master: the master partition (describes whole MTD device)
1004 * @types: names of partition parsers to try or %NULL
1006 * @data: MTD partition parser-specific data
1008 * This function tries to find partition on MTD device @master. It uses MTD
1009 * partition parsers, specified in @types. However, if @types is %NULL, then