• Home
  • Raw
  • Download

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

1 // SPDX-License-Identifier: GPL-2.0-only
71 * match_dev_by_uuid - callback for finding a partition using its uuid
80 struct hd_struct *part = dev_to_part(dev); in match_dev_by_uuid() local
82 if (!part->info) in match_dev_by_uuid()
85 if (strncasecmp(cmp->uuid, part->info->uuid, cmp->len)) in match_dev_by_uuid()
95 * devt_from_partuuid - looks up the dev_t of a partition by its UUID
102 * If @uuid_str is followed by a "/PARTNROFF=%d", then the number will be
113 struct hd_struct *part; in devt_from_partuuid() local
121 /* Check for optional partition number offset attributes. */ in devt_from_partuuid()
130 cmp.len = slash - uuid_str; in devt_from_partuuid()
145 res = dev->devt; in devt_from_partuuid()
153 part = disk_get_part(disk, dev_to_part(dev)->partno + offset); in devt_from_partuuid()
154 if (part) { in devt_from_partuuid()
155 res = part_devt(part); in devt_from_partuuid()
156 put_device(part_to_dev(part)); in devt_from_partuuid()
164 "Expected PARTUUID=<valid-uuid-id>[/PARTNROFF=%%d]\n"); in devt_from_partuuid()
173 * match_dev_by_label - callback for finding a partition using its label
182 struct hd_struct *part = dev_to_part(dev); in match_dev_by_label() local
184 if (part->info && !strcmp(label, part->info->volname)) in match_dev_by_label()
192 * Convert a name into device number. We accept the following variants:
194 * 1) <hex_major><hex_minor> device number in hexadecimal represents itself
197 * 3) /dev/<disk_name> represents the device number of disk
198 * 4) /dev/<disk_name><decimal> represents the device number
199 * of partition - device number of disk plus the partition number
200 * 5) /dev/<disk_name>p<decimal> - same as the above, that form is
202 * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
205 * partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
206 * filled hex representation of the 32-bit "NT disk signature", and PP
207 * is a zero-filled hex representation of the 1-based partition number.
210 * 8) <major>:<minor> major and minor number of the device separated by
227 int part; in name_to_dev_t() local
244 res = dev->devt; in name_to_dev_t()
289 * try non-existent, but valid partition, which may only exist in name_to_dev_t()
292 while (p > s && isdigit(p[-1])) in name_to_dev_t()
293 p--; in name_to_dev_t()
297 /* try disk name without <part number> */ in name_to_dev_t()
298 part = simple_strtoul(p, NULL, 10); in name_to_dev_t()
300 res = blk_lookup_devt(s, part); in name_to_dev_t()
304 /* try disk name without p<part number> */ in name_to_dev_t()
305 if (p < s + 2 || !isdigit(p[-2]) || p[-1] != 'p') in name_to_dev_t()
307 p[-1] = '\0'; in name_to_dev_t()
308 res = blk_lookup_devt(s, part); in name_to_dev_t()
369 if (s[-1] == ',') in get_fs_names()
370 s[-1] = '\0'; in get_fs_names()
377 for (p = page-1; p; p = next) { in get_fs_names()
383 s[-1] = '\0'; in get_fs_names()
401 return -ENOMEM; in do_mount_root()
403 /* zero-pad. init_mount() will make sure it's terminated */ in do_mount_root()
412 s = current->fs->pwd.dentry->d_sb; in do_mount_root()
413 ROOT_DEV = s->s_dev; in do_mount_root()
416 s->s_type->name, in do_mount_root()
433 scnprintf(b, BDEVNAME_SIZE, "unknown-block(%u,%u)", in mount_block_root()
442 case -EACCES: in mount_block_root()
443 case -EINVAL: in mount_block_root()
582 * Prepare the namespace - decide what/where to mount, load ramdisks, etc.