Lines Matching refs:part
108 unsigned int part = (minor & ((1 << hd->minor_shift) -1 )); in disk_name() local
110 if ((unit < hd->nr_real) && hd->part[minor].de) { in disk_name()
113 pos = devfs_generate_path (hd->part[minor].de, buf, 64); in disk_name()
120 && genhd_dasd_name (buf, unit, part, hd) == 0) in disk_name()
159 if (part) in disk_name()
160 sprintf(buf + 4, "%d", part); in disk_name()
166 if (part == 0) in disk_name()
169 sprintf(buf, "%s/c%dd%dp%d", maj, ctlr, unit, part); in disk_name()
174 if (part == 0) in disk_name()
177 sprintf(buf, "%s/c%dd%dp%d", maj, ctlr, unit, part); in disk_name()
182 if (part == 0) in disk_name()
185 sprintf(buf, "%s/c%dd%dp%d", maj, ctlr, unit, part); in disk_name()
190 int part = minor & (( 1 << hd->minor_shift) - 1); in disk_name() local
191 if (part == 0) in disk_name()
194 sprintf(buf, "%s/d%dp%d", maj, disk, part); in disk_name()
197 if (part) in disk_name()
198 sprintf(buf, "%s%c%d", maj, unit+'a', part); in disk_name()
214 hd->part[minor].start_sect = start; in add_gd_partition()
215 hd->part[minor].nr_sects = size; in add_gd_partition()
239 first_sector = hd->part[MINOR(dev)].start_sect; in check_partition()
246 hd->part[MINOR(dev)].start_sect = 0; in check_partition()
258 bdev->bd_inode->i_size = (loff_t)hd->part[MINOR(dev)].nr_sects << 9; in check_partition()
280 static void devfs_register_partition (struct gendisk *dev, int minor, int part) in devfs_register_partition() argument
287 if (dev->part[minor + part].de) return; in devfs_register_partition()
288 dir = devfs_get_parent (dev->part[minor].de); in devfs_register_partition()
292 sprintf (devname, "part%d", part); in devfs_register_partition()
293 dev->part[minor + part].de = in devfs_register_partition()
295 dev->major, minor + part, in devfs_register_partition()
311 if (dev->part[minor].de) return; in devfs_register_disc()
329 dev->part[minor].number = devfs_alloc_unique_number (&disc_numspace); in devfs_register_disc()
330 sprintf (symlink, "disc%d", dev->part[minor].number); in devfs_register_disc()
333 dev->part[minor].de = in devfs_register_disc()
336 devfs_auto_unregister (dev->part[minor].de, slave); in devfs_register_disc()
345 int part; in devfs_register_partitions() local
349 for (part = 1; part < dev->max_p; part++) { in devfs_register_partitions()
350 if ( unregister || (dev->part[minor].nr_sects < 1) || in devfs_register_partitions()
351 (dev->part[part + minor].nr_sects < 1) ) { in devfs_register_partitions()
352 devfs_unregister (dev->part[part + minor].de); in devfs_register_partitions()
353 dev->part[part + minor].de = NULL; in devfs_register_partitions()
356 devfs_register_partition (dev, minor, part); in devfs_register_partitions()
359 devfs_unregister (dev->part[minor].de); in devfs_register_partitions()
360 dev->part[minor].de = NULL; in devfs_register_partitions()
362 dev->part[minor].number); in devfs_register_partitions()
394 dev->part[first_minor].nr_sects = size; in grok_partitions()
415 dev->sizes[i] = dev->part[i].nr_sects >> (BLOCK_SIZE_BITS - 9); in grok_partitions()