/osnet-11/usr/src/grub/grub2/include/grub/ |
H A D | device.h | 31 struct grub_disk *disk; member in struct:grub_device
|
/osnet-11/usr/src/grub/grub2/grub-core/disk/ |
H A D | host.c | 1 /* host.c - Dummy disk driver to provide access to the hosts filesystem */ 20 /* When using the disk, make a reference to this module. Otherwise 24 #include <grub/disk.h> 42 grub_host_open (const char *name, grub_disk_t disk) argument 45 return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a host disk"); 47 disk->total_sectors = 0; 48 disk->id = (unsigned long) "host"; 50 disk->data = 0; 56 grub_host_close (grub_disk_t disk __attribute((unused))) 61 grub_host_read (grub_disk_t disk __attribut [all...] |
H A D | memdisk.c | 1 /* memdisk.c - Access embedded memory disk. */ 20 #include <grub/disk.h> 43 grub_memdisk_open (const char *name, grub_disk_t disk) argument 48 disk->total_sectors = memdisk_size / GRUB_DISK_SECTOR_SIZE; 49 disk->id = (unsigned long) "mdsk"; 55 grub_memdisk_close (grub_disk_t disk __attribute((unused))) 60 grub_memdisk_read (grub_disk_t disk __attribute((unused)), grub_disk_addr_t sector, 68 grub_memdisk_write (grub_disk_t disk __attribute((unused)), grub_disk_addr_t sector,
|
H A D | loopback.c | 23 #include <grub/disk.h> 152 grub_loopback_open (const char *name, grub_disk_t disk) 163 /* Use the filesize for the disk size, round up to a complete sector. */ 165 disk->total_sectors = ((dev->file->size + GRUB_DISK_SECTOR_SIZE - 1) 168 disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN; 169 disk->id = (unsigned long) dev; 171 disk->data = dev; 177 grub_loopback_read (grub_disk_t disk, grub_disk_addr_t sector, 180 grub_file_t file = ((struct grub_loopback *) disk->data)->file; 203 grub_loopback_write (grub_disk_t disk __attribut 151 grub_loopback_open(const char *name, grub_disk_t disk) argument 176 grub_loopback_read(grub_disk_t disk, grub_disk_addr_t sector, grub_size_t size, char *buf) argument [all...] |
/osnet-11/usr/src/grub/grub2/grub-core/partmap/ |
H A D | plan.c | 20 #include <grub/disk.h> 33 plan_partition_map_iterate (grub_disk_t disk, argument 34 int (*hook) (grub_disk_t disk, 52 err = grub_disk_read (disk, 1, ptr, sizeof (sig), sig); 60 err = grub_disk_read (disk, 1, ptr, 1, &c); 71 err = grub_disk_read (disk, 1, ptr, 1, &c); 84 err = grub_disk_read (disk, 1, ptr, 1, &c); 95 if (hook (disk, &p))
|
H A D | bsdlabel.c | 22 #include <grub/disk.h> 43 iterate_real (grub_disk_t disk, grub_disk_addr_t sector, int freebsd, 45 int (*hook) (grub_disk_t disk, 54 if (grub_disk_read (disk, sector, 0, sizeof (label), &label)) 71 if (grub_disk_read (disk, pos / GRUB_DISK_SECTOR_SIZE, 93 if (grub_disk_read (disk, p.offset, p.index, sizeof (be), &be)) 107 /* disk->partition != NULL as 0 < delta */ 108 partname = disk->partition ? grub_partition_get_name (disk->partition) 111 disk 42 iterate_real(grub_disk_t disk, grub_disk_addr_t sector, int freebsd, struct grub_partition_map *pmap, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument 125 bsdlabel_partition_map_iterate(grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument 150 netopenbsdlabel_partition_map_iterate(grub_disk_t disk, grub_uint8_t type, struct grub_partition_map *pmap, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument 201 netbsdlabel_partition_map_iterate(grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument 212 openbsdlabel_partition_map_iterate(grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument [all...] |
H A D | dvh.c | 20 #include <grub/disk.h> 66 dvh_partition_map_iterate (grub_disk_t disk, argument 67 int (*hook) (grub_disk_t disk, 80 err = grub_disk_read (disk, 0, 0, sizeof (struct grub_dvh_block), 104 if (hook (disk, &p))
|
H A D | msdos.c | 22 #include <grub/disk.h> 34 grub_partition_msdos_iterate (grub_disk_t disk, 35 int (*hook) (grub_disk_t disk, 45 if (disk->partition && disk->partition->partmap == &grub_msdos_partition_map) 47 if (disk->partition->msdostype == GRUB_PC_PARTITION_TYPE_LINUX_MINIX) 48 delta = disk->partition->start; 68 if (grub_disk_read (disk, p.offset, 0, sizeof (mbr), &mbr)) 98 << (disk->log_sector_size - GRUB_DISK_SECTOR_BITS)) - delta; 100 << (disk 33 grub_partition_msdos_iterate(grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument 155 pc_partition_map_embed(struct grub_disk *disk, unsigned int *nsectors, grub_embed_type_t embed_type, grub_disk_addr_t **sectors) argument [all...] |
H A D | acorn.c | 20 #include <grub/disk.h> 61 acorn_partition_map_find (grub_disk_t disk, struct linux_part *m, argument 71 err = grub_disk_read (disk, 0xC00 / GRUB_DISK_SECTOR_SIZE, 0, 91 return grub_disk_read (disk, *sector, 0, 103 acorn_partition_map_iterate (grub_disk_t disk, argument 104 int (*hook) (grub_disk_t disk, 113 err = acorn_partition_map_find (disk, map, §or); 130 if (hook (disk, &part))
|
H A D | apple.c | 20 #include <grub/disk.h> 104 apple_partition_map_iterate (grub_disk_t disk, 105 int (*hook) (grub_disk_t disk, 116 if (grub_disk_read (disk, 0, 0, sizeof (aheader), &aheader)) 135 if (grub_disk_read (disk, part.offset, part.index, 167 if (hook (disk, &part)) 103 apple_partition_map_iterate(grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument
|
H A D | gpt.c | 20 #include <grub/disk.h> 50 gpt_partition_map_iterate (grub_disk_t disk, 51 int (*hook) (grub_disk_t disk, 64 if (grub_disk_read (disk, 0, 0, sizeof (mbr), &mbr)) 78 if (grub_disk_read (disk, 1 << sector_log, 0, sizeof (gpt), &gpt)) 92 if (grub_disk_read (disk, entries, last_offset, 107 part.parent = disk->partition; 113 if (hook (disk, &part)) 130 gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, 138 auto int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk, 49 gpt_partition_map_iterate(grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument 129 gpt_partition_map_embed(struct grub_disk *disk, unsigned int *nsectors, grub_embed_type_t embed_type, grub_disk_addr_t **sectors) argument [all...] |
/osnet-11/usr/src/grub/grub2/util/ |
H A D | raid.c | 45 mdu_disk_info_t disk; local 75 disk.number = i; 76 ret = ioctl (fd, GET_DISK_INFO, &disk); 80 if (disk.state & (1 << MD_DISK_ACTIVE)) 83 makedev (disk.major, disk.minor));
|
/osnet-11/usr/src/grub/grub2/grub-core/commands/ |
H A D | hexdump.c | 22 #include <grub/disk.h> 57 grub_disk_t disk; local 62 disk = grub_disk_open (&args[0][1]); 63 if (! disk) 76 if (grub_disk_read (disk, sector, ofs, len, buf)) 87 grub_disk_close (disk);
|
H A D | search.c | 32 #include <grub/disk.h> 170 auto int part_hook (grub_disk_t disk, const grub_partition_t partition); 171 int part_hook (grub_disk_t disk, const grub_partition_t partition) argument 180 devname = grub_xasprintf ("%s,%s", disk->name, partition_name); 245 if (!dev->disk) 252 ret = grub_partition_iterate (dev->disk, part_hook);
|
/osnet-11/usr/src/grub/grub2/grub-core/kern/ |
H A D | device.c | 21 #include <grub/disk.h> 34 grub_disk_t disk = 0; local 52 /* Try to open a disk. */ 53 dev->disk = grub_disk_open (name); 54 if (dev->disk) 66 if (disk) 67 grub_disk_close (disk); 77 if (device->disk) 78 grub_disk_close (device->disk); 95 auto int iterate_partition (grub_disk_t disk, 148 iterate_partition(grub_disk_t disk, const grub_partition_t partition) argument [all...] |
H A D | fs.c | 20 #include <grub/disk.h> 47 if (device->disk) 121 grub_disk_t disk = file->device->disk; 165 if (disk->total_sectors < blocks[i].offset + blocks[i].length) 208 if (grub_disk_read (file->device->disk, p->offset + sector, offset, 120 grub_disk_t disk = file->device->disk; local
|
H A D | partition.c | 22 #include <grub/disk.h> 32 * Checks that disk->partition contains part. This function assumes that the 33 * start of part is relative to the start of disk->partition. Returns 1 if 34 * disk->partition is null. 37 grub_partition_check_containment (const grub_disk_t disk, argument 40 if (disk->partition == NULL) 43 if (part->start + part->len > disk->partition->len) 47 partname = grub_partition_get_name (disk->partition); 49 part->partmap->name, part->number + 1, disk->name, partname); 52 disk 63 grub_partition_map_probe(const grub_partition_map_t partmap, grub_disk_t disk, int partnum) argument 99 grub_partition_probe(struct grub_disk *disk, const char *str) argument 166 grub_partition_iterate(struct grub_disk *disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) argument [all...] |
/osnet-11/usr/src/lib/libparted/common/libparted/labels/ |
H A D | pt-tools.c | 41 ptt_write_sector (PedDisk const *disk, void const *buf, size_t buflen) argument 43 PED_ASSERT (buflen <= disk->dev->sector_size, return 0); 45 char *s0 = ped_malloc (disk->dev->sector_size); 52 memset (p, 0, disk->dev->sector_size - buflen); 53 int write_ok = ped_device_write (disk->dev, s0, 0, 1);
|
H A D | aix.c | 3 libparted - a library for manipulating disk partitions 70 PedDisk* disk; local 72 disk = _ped_disk_alloc (dev, &aix_disk_type); 73 if (!disk) 76 return disk; 80 aix_duplicate (const PedDisk* disk) argument 84 new_disk = ped_disk_new_fresh (disk->dev, &aix_disk_type); 92 aix_free (PedDisk *disk) argument 94 _ped_disk_free (disk); 98 aix_read (PedDisk* disk) argument 110 aix_write(const PedDisk* disk) argument 121 aix_partition_new(const PedDisk* disk, PedPartitionType part_type, const PedFileSystemType* fs_type, PedSector start, PedSector end) argument 186 aix_get_max_primary_partition_count(const PedDisk* disk) argument 192 aix_get_max_supported_partition_count(const PedDisk* disk, int *max_n) argument 213 aix_alloc_metadata(PedDisk* disk) argument [all...] |
H A D | loop.c | 2 libparted - a library for manipulating disk partitions 40 static void loop_free (PedDisk* disk); 45 PedDisk *disk = loop_alloc (dev); local 46 if (!disk) 61 geom = ped_geometry_new (dev, 0, disk->dev->length); 67 loop_free (disk); 71 loop_free (disk); 87 loop_duplicate (const PedDisk* disk) argument 89 return ped_disk_new_fresh (disk->dev, &loop_disk_type); 93 loop_free (PedDisk* disk) argument 101 loop_read(PedDisk* disk) argument 156 loop_write(const PedDisk* disk) argument 186 loop_partition_new(const PedDisk* disk, PedPartitionType part_type, const PedFileSystemType* fs_type, PedSector start, PedSector end) argument 269 loop_alloc_metadata(PedDisk* disk) argument 275 loop_get_max_primary_partition_count(const PedDisk* disk) argument 281 loop_get_max_supported_partition_count(const PedDisk* disk, int *max_n) argument [all...] |
/osnet-11/usr/src/grub/grub2/grub-core/disk/ieee1275/ |
H A D | nand.c | 1 /* nand.c - NAND flash disk access. */ 21 #include <grub/disk.h> 57 grub_nand_read (grub_disk_t disk, grub_disk_addr_t sector, 61 grub_nand_open (const char *name, grub_disk_t disk) argument 111 grub_error (GRUB_ERR_UNKNOWN_DEVICE, "can't get disk size"); 115 disk->total_sectors = args.size1; 116 disk->total_sectors <<= 32; 117 disk->total_sectors += args.size2; 118 disk->total_sectors >>= GRUB_DISK_SECTOR_BITS; 120 disk 134 grub_nand_close(grub_disk_t disk) argument 141 grub_nand_read(grub_disk_t disk, grub_disk_addr_t sector, grub_size_t size, char *buf) argument [all...] |
/osnet-11/usr/src/grub/grub2/grub-core/loader/i386/pc/ |
H A D | chainloader.c | 26 #include <grub/disk.h> 90 if (dev && dev->disk) 91 part_start = grub_partition_get_start (dev->disk->partition); 205 if (dev && dev->disk && dev->disk->partition) 207 grub_disk_t disk = dev->disk; local 209 if (disk) 211 grub_partition_t p = disk->partition; 215 disk [all...] |
/osnet-11/usr/src/lib/libzfs_jni/common/ |
H A D | libzfs_jni_disk.c | 48 jobject disk = NULL; local 70 disk = (*env)->NewObject(env, class_DiskDeviceBean, 76 return (disk); 194 jobject disk = create_DiskDeviceBean(env, dp); local 196 /* Add disk to zjni_ArrayList */ 198 ((zjni_Collection_t *)list)->method_add, disk); local
|
/osnet-11/usr/src/lib/libparted/common/libparted/fs/ntfs/ |
H A D | ntfs.c | 2 libparted - a library for manipulating disk partitions 104 PedDisk *disk; local 110 disk = ped_disk_new (geom->dev); 111 if (!disk) { 115 part = ped_disk_get_partition_by_sector (disk, geom->start); 124 ped_disk_destroy (disk); 373 * The ntfsresize cmd wants the block disk device, not the raw one. 374 * It also wants the partition device, not the whole disk.
|
/osnet-11/usr/src/lib/libdiskmgt/common/ |
H A D | partition.c | 62 static int get_parts(disk_t *disk, struct ipart *iparts, char *opath, 111 if (get_parts(desc->p.disk, iparts, pname, sizeof (pname)) != 0) { 172 desc->p.disk, part_name, desc->secondary_name, 196 * number and not to the physical disk. This is 198 * physical disk partition. 211 desc->p.disk, part_name, desc->name, errp); 237 if ((*errp = get_parts(dp->p.disk, iparts, NULL, 0)) != 0) { 336 * A partition descriptor points to a disk, the name is the partition number 339 * partitions found on each disk on a system. These are processed into an array 384 * number and not to the physical disk 550 get_parts(disk_t *disk, struct ipart *iparts, char *opath, int opath_len) argument [all...] |