/osnet-11/usr/src/lib/libparted/common/libparted/cs/ |
H A D | natmath.c | 72 ped_round_down_to (PedSector sector, PedSector grain_size) argument 74 return sector - abs_mod (sector, grain_size); 81 ped_round_up_to (PedSector sector, PedSector grain_size) argument 83 if (sector % grain_size) 84 return ped_round_down_to (sector, grain_size) + grain_size; 86 return sector; 91 ped_round_to_nearest (PedSector sector, PedSector grain_size) argument 93 if (sector % grain_size > grain_size/2) 94 return ped_round_up_to (sector, grain_siz 344 _closest_inside_geometry(const PedAlignment* align, const PedGeometry* geom, PedSector sector) argument 379 ped_alignment_align_up(const PedAlignment* align, const PedGeometry* geom, PedSector sector) argument 407 ped_alignment_align_down(const PedAlignment* align, const PedGeometry* geom, PedSector sector) argument 428 closest(PedSector sector, PedSector a, PedSector b) argument 448 ped_alignment_align_nearest(const PedAlignment* align, const PedGeometry* geom, PedSector sector) argument 464 ped_alignment_is_aligned(const PedAlignment* align, const PedGeometry* geom, PedSector sector) argument [all...] |
/osnet-11/usr/src/lib/libparted/common/libparted/fs/hfs/ |
H A D | file_plus.h | 37 PedSector sector, unsigned int nb); 41 PedSector sector, unsigned int nb); 43 /* Read the nth sector of a file */ 46 hfsplus_file_read_sector (HfsPPrivateFile* file, void *buf, PedSector sector) argument 48 return hfsplus_file_read(file, buf, sector, 1); 51 /* Write the nth sector of a file */ 54 hfsplus_file_write_sector (HfsPPrivateFile* file, void *buf, PedSector sector) argument 56 return hfsplus_file_write(file, buf, sector, 1);
|
H A D | file.h | 36 hfs_file_read_sector (HfsPrivateFile* file, void *buf, PedSector sector); 39 hfs_file_write_sector (HfsPrivateFile* file, void *buf, PedSector sector);
|
H A D | file_plus.c | 108 hfsplus_file_find_extent (HfsPPrivateFile* file, PedSector sector, argument 119 unsigned int block = sector / sect_by_block; 120 unsigned int offset = sector % sect_by_block; 189 hfsplus_file_read(HfsPPrivateFile* file, void *buf, PedSector sector, argument 197 if (sector+nb < sector /* detect overflow */ 198 || sector+nb > file->sect_nb) /* out of file */ { 208 phy_area = hfsplus_file_find_extent(file, sector, nb); 213 _("Could not find sector %lli of HFS+ file " 215 sector, PED_BE32_TO_CP 232 hfsplus_file_write(HfsPPrivateFile* file, void *buf, PedSector sector, unsigned int nb) argument [all...] |
H A D | journal.c | 76 PedSector sector; local 84 sector = (PedSector) priv_data->jib_start_block * binsect; 85 if (!ped_geometry_read(priv_data->plus_geom, buf, sector, 1)) 92 if (!ped_geometry_write(priv_data->plus_geom, buf, sector, 1) 100 /* Return the sector in the journal that is after the area read */ 119 1 sector long */ 129 PedSector start, sector; local 162 sector = HFS_64_TO_CPU(blhdr->binfo[i].bnum, is_le); 184 /* the sector stored in the journal seems to be 187 if (sector ! 230 PedSector sector, length; local [all...] |
H A D | file.c | 100 /* find and return the nth sector of a file */ 103 hfs_file_find_sector (HfsPrivateFile* file, PedSector sector) argument 111 unsigned int block = sector / sect_by_block; 112 unsigned int offset = sector % sect_by_block; 169 /* Read the nth sector of a file */ 172 hfs_file_read_sector (HfsPrivateFile* file, void *buf, PedSector sector) argument 176 if (sector >= file->sect_nb) { 185 abs_sector = hfs_file_find_sector (file, sector); 190 _("Could not find sector %lli of HFS file with " 192 sector, PED_BE32_TO_CP 202 hfs_file_write_sector(HfsPrivateFile* file, void *buf, PedSector sector) argument [all...] |
/osnet-11/usr/src/grub/grub2/grub-core/kern/ |
H A D | disk.c | 39 grub_disk_addr_t sector; member in struct:grub_disk_cache 63 grub_disk_addr_t sector) 66 + ((unsigned) (sector >> GRUB_DISK_CACHE_BITS))) 72 grub_disk_addr_t sector) 77 sector &= ~(GRUB_DISK_CACHE_SIZE - 1); 78 index = grub_disk_cache_get_index (dev_id, disk_id, sector); 82 && cache->sector == sector && cache->data) 110 grub_disk_addr_t sector) 115 index = grub_disk_cache_get_index (dev_id, disk_id, sector); 62 grub_disk_cache_get_index(unsigned long dev_id, unsigned long disk_id, grub_disk_addr_t sector) argument 71 grub_disk_cache_invalidate(unsigned long dev_id, unsigned long disk_id, grub_disk_addr_t sector) argument 109 grub_disk_cache_fetch(unsigned long dev_id, unsigned long disk_id, grub_disk_addr_t sector) argument 136 grub_disk_cache_unlock(unsigned long dev_id, unsigned long disk_id, grub_disk_addr_t sector) argument 151 grub_disk_cache_store(unsigned long dev_id, unsigned long disk_id, grub_disk_addr_t sector, const char *data) argument 359 grub_disk_adjust_range(grub_disk_t disk, grub_disk_addr_t *sector, grub_off_t *offset, grub_size_t size) argument 394 transform_sector(grub_disk_t disk, grub_disk_addr_t sector) argument 403 grub_disk_read_small(grub_disk_t disk, grub_disk_addr_t sector, grub_off_t offset, grub_size_t size, void *buf) argument 483 grub_disk_read(grub_disk_t disk, grub_disk_addr_t sector, grub_off_t offset, grub_size_t size, void *buf) argument 625 grub_disk_write(grub_disk_t disk, grub_disk_addr_t sector, grub_off_t offset, grub_size_t size, const void *buf) argument [all...] |
H A D | fs.c | 188 grub_disk_addr_t sector; 195 sector = (file->offset >> GRUB_DISK_SECTOR_BITS); 199 if (sector < p->length) 205 >> GRUB_DISK_SECTOR_BITS) > p->length - sector) 206 size = ((p->length - sector) << GRUB_DISK_SECTOR_BITS) - offset; 208 if (grub_disk_read (file->device->disk, p->offset + sector, offset, 214 sector -= ((size + offset) >> GRUB_DISK_SECTOR_BITS); 218 sector -= p->length; 187 grub_disk_addr_t sector; local
|
/osnet-11/usr/src/lib/libparted/common/libparted/ |
H A D | unit.c | 29 * end of partitions. However, sector numbers are often long and unintuitive. 30 * For example, my extended partition starts at sector 208845. PedUnit allows 197 PedSector sector = byte / dev->sector_size; local 207 sector / chs->sectors / chs->heads, 208 (sector / chs->sectors) % chs->heads, 209 sector % chs->sectors); 274 * \brief Get a string that describes the location \p sector on device \p dev. 280 ped_unit_format_custom (const PedDevice* dev, PedSector sector, PedUnit unit) argument 283 return ped_unit_format_custom_byte(dev, sector*dev->sector_size, unit); 287 * \brief Get a string that describes the location \p sector o 294 ped_unit_format(const PedDevice* dev, PedSector sector) argument 313 ped_unit_parse(const char* str, const PedDevice* dev, PedSector *sector, PedGeometry** range) argument 368 parse_chs(const char* str, const PedDevice* dev, PedSector* sector, PedGeometry** range) argument 430 clip(const PedDevice* dev, PedSector sector) argument 440 geometry_from_centre_radius(const PedDevice* dev, PedSector sector, PedSector radius) argument 500 ped_unit_parse_custom(const char* str, const PedDevice* dev, PedUnit unit, PedSector* sector, PedGeometry** range) argument [all...] |
/osnet-11/usr/src/grub/grub2/grub-core/commands/ |
H A D | blocklist.c | 41 auto void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned offset, 43 auto void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num, 46 void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned offset, argument 51 if (start_sector + num_sectors == sector 64 start_sector = sector; 68 print_blocklist (sector, 0, offset, length); 71 void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num, argument 77 grub_printf ("%llu", (unsigned long long) (sector - part_start));
|
H A D | testload.c | 42 auto void NESTED_FUNC_ATTR read_func (grub_disk_addr_t sector, unsigned offset, unsigned len); 44 void NESTED_FUNC_ATTR read_func (grub_disk_addr_t sector __attribute__ ((unused)), 82 char sector[GRUB_DISK_SECTOR_SIZE]; local 84 if (grub_file_read (file, sector, GRUB_DISK_SECTOR_SIZE) 88 if (grub_memcmp (sector, buf + pos, GRUB_DISK_SECTOR_SIZE) != 0) 101 char sector[GRUB_DISK_SECTOR_SIZE]; local 107 if (grub_file_read (file, sector, GRUB_DISK_SECTOR_SIZE) 111 if (grub_memcmp (sector, buf + pos, GRUB_DISK_SECTOR_SIZE) != 0)
|
H A D | hexdump.c | 58 grub_disk_addr_t sector; local 66 sector = (skip >> (GRUB_DISK_SECTOR_BITS + 2)) * 4; 76 if (grub_disk_read (disk, sector, ofs, len, buf)) 84 sector += 4;
|
/osnet-11/usr/src/grub/grub-0.97/stage2/ |
H A D | stage1_5.c | 25 disk_read_savesect_func (unsigned int sector, int offset, int length) argument 27 saved_sector = sector; 50 grub_printf ("internal error: the second sector of Stage 2 is unknown.");
|
H A D | fsys_iso9660.c | 70 iso9660_devread (int sector, int byte_offset, int byte_len, char *buf) argument 78 if (sector < 0) 86 sector += (byte_offset >> sector_size_lg2); 89 : "=r"(sector) 91 "0"(sector)); 95 printf ("<%d, %d, %d>", sector, byte_offset, byte_len); 103 return rawread(current_drive, part_start + sector, byte_offset, byte_len, buf); 109 unsigned int sector; local 124 for (sector = 16 ; sector < 3 417 int sector, blkoffset, size, ret; local [all...] |
H A D | fsys_vstafs.c | 27 static void get_file_info (int sector); 28 static struct dir_entry *vstafs_readdir (long sector); 39 * In f_sector we store the sector number in which the information about 60 get_file_info (int sector) argument 62 devread (sector, 0, BLOCK_SIZE, (char *) FILE_INFO); 69 vstafs_readdir (long sector) argument 74 get_file_info (sector);
|
/osnet-11/usr/src/lib/libparted/common/include/parted/ |
H A D | natmath.h | 61 extern PedSector ped_round_up_to (PedSector sector, PedSector grain_size); 62 extern PedSector ped_round_down_to (PedSector sector, PedSector grain_size); 63 extern PedSector ped_round_to_nearest (PedSector sector, PedSector grain_size); 76 PedSector sector); 79 PedSector sector); 82 PedSector sector); 86 PedSector sector);
|
H A D | unit.h | 78 extern char* ped_unit_format (const PedDevice* dev, PedSector sector); 79 extern char* ped_unit_format_custom (const PedDevice* dev, PedSector sector, 83 PedSector* sector, 86 PedUnit unit, PedSector* sector,
|
/osnet-11/usr/src/grub/grub2/grub-core/partmap/ |
H A D | acorn.c | 62 grub_disk_addr_t *sector) 89 *sector = grub_le_to_cpu16 (boot.start_cylinder) * sectors_per_cylinder; 91 return grub_disk_read (disk, *sector, 0, 110 grub_disk_addr_t sector = 0; local 113 err = acorn_partition_map_find (disk, map, §or); 125 part.start = sector + map[i].start; 61 acorn_partition_map_find(grub_disk_t disk, struct linux_part *m, grub_disk_addr_t *sector) argument
|
/osnet-11/usr/src/lib/libparted/common/libparted/fs/fat/ |
H A D | fatio.c | 39 PedSector sector = fat_frag_to_sector (fs, frag); local 44 return ped_geometry_read (fs->geom, buf, sector, sector_count); 58 PedSector sector = fat_frag_to_sector (fs, frag); local 63 return ped_geometry_write (fs->geom, buf, sector, sector_count); 94 PedSector sector = fat_cluster_to_sector (fs, cluster); local 101 return ped_geometry_read (fs->geom, buf, sector, sector_count); 115 PedSector sector = fat_cluster_to_sector (fs, cluster); local 122 return ped_geometry_write (fs->geom, buf, sector, sector_count);
|
H A D | calc.h | 57 fat_is_sector_in_clusters (const PedFileSystem* fs, PedSector sector); 69 fat_sector_to_frag (const PedFileSystem* fs, PedSector sector); 75 fat_sector_to_cluster (const PedFileSystem* fs, PedSector sector);
|
/osnet-11/usr/src/grub/grub2/grub-core/disk/ |
H A D | memdisk.c | 60 grub_memdisk_read (grub_disk_t disk __attribute((unused)), grub_disk_addr_t sector, variable 63 grub_memcpy (buf, memdisk_addr + (sector << GRUB_DISK_SECTOR_BITS), size << GRUB_DISK_SECTOR_BITS); 68 grub_memdisk_write (grub_disk_t disk __attribute((unused)), grub_disk_addr_t sector, variable 71 grub_memcpy (memdisk_addr + (sector << GRUB_DISK_SECTOR_BITS), buf, size << GRUB_DISK_SECTOR_BITS);
|
H A D | mdraid1x_linux.c | 110 grub_disk_addr_t sector = 0; local 133 sector = (size - 8 * 2) & ~(4 * 2 - 1); 136 sector = 0; 139 sector = 4 * 2; 143 if (grub_disk_read (disk, sector, 0, sizeof (struct grub_raid_super_1x), 148 || grub_le_to_cpu64 (sb.super_offset) != sector) 180 if (grub_disk_read (disk, sector, 0, sb_size, real_sb))
|
H A D | ata.c | 204 grub_disk_addr_t sector, 216 /* Calculate the sector, cylinder and head to use. */ 217 sect = ((grub_uint32_t) sector % dev->sectors_per_track) + 1; 218 cylinder = (((grub_uint32_t) sector / dev->sectors_per_track) 220 head = ((grub_uint32_t) sector / dev->sectors_per_track) % dev->heads; 226 "sector %d cannot be addressed " 227 "using CHS addressing", sector); 240 parms->taskfile.disk = 0xE0 | ((sector >> 24) & 0x0F); 243 parms->taskfile.lba_low = sector & 0xFF; 244 parms->taskfile.lba_mid = (sector >> 202 grub_ata_setaddress(struct grub_ata *dev, struct grub_disk_ata_pass_through_parms *parms, grub_disk_addr_t sector, grub_size_t size, grub_ata_addressing_t addressing) argument 273 grub_ata_readwrite(grub_disk_t disk, grub_disk_addr_t sector, grub_size_t size, char *buf, int rw) argument 469 grub_ata_read(grub_disk_t disk, grub_disk_addr_t sector, grub_size_t size, char *buf) argument 476 grub_ata_write(grub_disk_t disk, grub_disk_addr_t sector, grub_size_t size, const char *buf) argument [all...] |
H A D | raid6_recover.c | 68 char *buf, grub_disk_addr_t sector, int size) 99 array->members[pos].start_sector + sector, 131 array->members[p].start_sector + sector, 146 array->members[q].start_sector + sector, 0, size, buf)) 165 array->members[p].start_sector + sector, 172 array->members[q].start_sector + sector, 67 grub_raid6_recover(struct grub_raid_array *array, int disknr, int p, char *buf, grub_disk_addr_t sector, int size) argument
|
/osnet-11/usr/src/grub/grub2/include/grub/ |
H A D | disk.h | 81 /* Read SIZE sectors from the sector SECTOR of the disk DISK into BUF. */ 82 grub_err_t (*read) (struct grub_disk *disk, grub_disk_addr_t sector, 85 /* Write SIZE sectors from BUF into the sector SECTOR of the disk DISK. */ 86 grub_err_t (*write) (struct grub_disk *disk, grub_disk_addr_t sector, 113 /* Logarithm of sector size. */ 122 /* Called when a sector was read. OFFSET is between 0 and 123 the sector size minus 1, and LENGTH is between 0 and the sector size. */ 124 void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, 141 /* The sector siz [all...] |