/freebsd-11-stable/usr.sbin/fstyp/ |
H A D | cd9660.c | 47 char *sector, *volume; local 49 sector = read_buf(fp, ISO9660_OFFSET, 512); 50 if (sector == NULL) 52 if (bcmp(sector, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) != 0) { 53 free(sector); 56 volume = sector + 0x28; 59 free(sector);
|
H A D | msdosfs.c | 50 uint8_t *sector0, *sector; local 53 sector = NULL; 55 /* Load 1st sector with boot sector and boot parameter block. */ 60 /* Check for the FAT boot sector signature. */ 110 * If the volume label "NO NAME " is in the boot sector, the 124 sector = (uint8_t *)read_buf(fp, offset, fat_BytesPerSector); 125 if (sector == NULL) 128 pfat_entry = (FAT_DES *)sector; 155 (uint8_t *)(sector [all...] |
/freebsd-11-stable/sys/geom/label/ |
H A D | g_label_iso9660.c | 49 char *sector, *volume; local 57 sector = (char *)g_read_data(cp, ISO9660_OFFSET, pp->sectorsize, 59 if (sector == NULL) 61 if (bcmp(sector, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) != 0) { 62 g_free(sector); 66 volume = sector + 0x28; 69 g_free(sector);
|
H A D | g_label_msdosfs.c | 50 uint8_t *sector0, *sector; local 55 sector = NULL; 58 /* Check if the sector size of the medium is a valid FAT sector size. */ 66 G_LABEL_DEBUG(1, "MSDOSFS: %s: sector size %d not compatible.", 71 /* Load 1st sector with boot sector and boot parameter block. */ 76 /* Check for the FAT boot sector signature. */ 141 * If the volume label "NO NAME " is in the boot sector, the 157 sector [all...] |
/freebsd-11-stable/sbin/geom/misc/ |
H A D | subr.c | 105 * The size of a sector is context specific (i.e. determined by the 108 * sectors. We should map the byte-oriented value into a sector-oriented 109 * value when we already know the sector size in bytes. At this time 116 * suffix forces sector interpretation. 170 unit = sectorsize; /* sector */ 229 unsigned char *sector; local 234 sector = NULL; 251 sector = malloc(sectorsize); 252 if (sector == NULL) { 256 if (pread(fd, sector, sectorsiz 286 unsigned char *sector; local 332 unsigned char *sector; local [all...] |
/freebsd-11-stable/sys/fs/udf/ |
H A D | udf.h | 92 #define RDSECTOR(devvp, sector, size, bp) \ 93 bread(devvp, sector << (udfmp->bshift - DEV_BSHIFT), size, NOCRED, bp) 98 udf_readdevblks(struct udf_mnt *udfmp, int sector, int size, struct buf **bp) argument 100 return (RDSECTOR(udfmp->im_devvp, sector,
|
H A D | udf_vfsops.c | 39 * places: sector 256, sector n (the max sector of the disk), or sector 40 * n - 256. It's a pretty good bet that one will exist at sector 256 though. 41 * One caveat is unclosed CD media. For that, sector 256 cannot be written, 42 * so the Anchor Volume Descriptor Pointer can exist at sector 512 until the 316 uint32_t sector, size, mvds_start, mvds_end; local 383 * Get the Anchor Volume Descriptor Pointer from sector 256. 384 * XXX Should also check sector 592 int error, sector, size; local [all...] |
/freebsd-11-stable/tests/sys/geom/class/eli/ |
H A D | integrity_test.sh | 19 # Copy first small sector to the second small sector. 21 atf_check dd if=backing_file of=sector bs=512 count=1 \ 23 atf_check dd if=sector of=backing_file bs=512 count=1 seek=1 \ 34 # Copy first big sector to the second big sector. 40 seek=$(( $secsize / 512 )) of=sector conv=notrunc status=none 42 seek=$(( $secsize / 256 )) if=sector conv=notrunc status=none 83 atf_check dd if=/dev/${md} of=sector bs=512 count=1 status=none 84 atf_check dd if=rnd of=sector b [all...] |
/freebsd-11-stable/sbin/geom/class/eli/ |
H A D | geom_eli.c | 580 unsigned char sector[sizeof(struct g_eli_metadata)]; local 593 if (read(fd, sector, sizeof(sector)) != sizeof(sector)) { 602 error = g_metadata_read(prov, sector, sizeof(sector), 610 error = eli_metadata_decode(sector, md); 636 unsigned char sector[sizeof(struct g_eli_metadata)]; local 639 eli_metadata_encode(md, sector); 648 bzero(sector, sizeo 1364 unsigned char *sector; local 1479 unsigned char *sector; local 1595 unsigned char *sector; local [all...] |
/freebsd-11-stable/sbin/geom/class/cache/ |
H A D | geom_cache.c | 135 u_char sector[512]; local 140 bzero(sector, sizeof(sector)); 164 cache_metadata_encode(&md, sector); 165 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-11-stable/usr.sbin/makefs/cd9660/ |
H A D | cd9660_write.c | 151 pos = vd_temp->sector * diskStructure->sectorSize; 152 cd9660_write_filedata(diskStructure, fd, vd_temp->sector, 168 cd9660_write_path_table(iso9660_disk *diskStructure, FILE *fd, off_t sector, argument 217 ret = cd9660_write_filedata(diskStructure, fd, sector, buffer_head, 227 * sector to copy them to. One thing to watch out for: the only path tables 257 * with the root node. All of the records should store what sector the 311 * be careful of sector boundaries 321 * records - beware of sector boundaries 339 /* Seek to the next sector. */ 383 * Wrapper function to write a buffer (one sector) t 396 cd9660_write_filedata(iso9660_disk *diskStructure, FILE *fd, off_t sector, const unsigned char *buf, int numsecs) argument 435 off_t sector = start_sector; local 477 cd9660_write_rr(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode, off_t offset, off_t sector) argument [all...] |
H A D | cd9660_debug.c | 156 printf("Volume descriptor in sector %" PRId64 158 tmp->sector, tmp->volumeDescriptorData[0], temp); 196 debug_dump_to_xml_path_table(FILE *fd, off_t sector, int size, int mode) argument 202 if (fseeko(fd, CD9660_SECTOR_SIZE * sector, SEEK_SET) == -1) 228 off_t sector; local 236 sector = 16; 238 if (fseeko(fd, CD9660_SECTOR_SIZE * sector, SEEK_SET) == -1) 250 debug_dump_to_xml_volume_descriptor(buf, sector); 251 sector++; 257 printf("Path table 1 located at sector 377 debug_dump_to_xml_volume_descriptor(unsigned char* buf, int sector) argument [all...] |
H A D | cd9660_eltorito.c | 158 new_image->sector = -1; 291 cd9660_731(disk->sector, ie->load_rba); 294 "load segment %04x, system type %d, sector count %d, " 297 disk->num_sectors, disk->sector)); 338 cd9660_731(disk->sector, se->load_rba); 360 int sector; local 375 /* Point to catalog: For now assume it consumes one sector */ 376 ELTORITO_DPRINTF(("Boot catalog will go in sector %d\n", first_sector)); 409 /* Populate sector numbers */ 410 sector [all...] |
/freebsd-11-stable/sbin/geom/class/multipath/ |
H A D | geom_multipath.c | 153 uint8_t *sector, *rsector; local 185 gctl_error(req, "%s sector size %ju different.", 224 * Allocate a sector to write as metadata. 226 sector = calloc(1, secsize); 227 if (sector == NULL) { 240 multipath_metadata_encode(&md, sector); 246 error = g_metadata_store(name, sector, secsize); 271 if (memcmp(sector, rsector, secsize)) { 279 free(sector);
|
/freebsd-11-stable/sys/dev/virtio/block/ |
H A D | virtio_blk.h | 115 uint64_t sector; member in struct:virtio_blk_outhdr
|
/freebsd-11-stable/sbin/geom/class/concat/ |
H A D | geom_concat.c | 118 u_char sector[512]; local 122 bzero(sector, sizeof(sector)); 131 * Clear last sector first to spoil all components if device exists. 170 concat_metadata_encode(&md, sector); 171 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-11-stable/sbin/geom/class/label/ |
H A D | geom_label.c | 125 u_char sector[512]; local 128 bzero(sector, sizeof(sector)); 136 * Clear last sector first to spoil all components if device exists. 161 label_metadata_encode(&md, sector); 162 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-11-stable/sbin/geom/class/journal/ |
H A D | geom_journal.c | 143 u_char sector[512]; local 147 bzero(sector, sizeof(sector)); 219 "sector and this operation is going to overwrite " 237 gctl_error(req, "Not equal sector sizes."); 242 * Clear last sector first, to spoil all components if device exists. 279 journal_metadata_encode(&md, sector); 280 error = g_metadata_store(str, sector, sizeof(sector));
|
/freebsd-11-stable/sbin/geom/class/stripe/ |
H A D | geom_stripe.c | 128 u_char sector[512]; local 133 bzero(sector, sizeof(sector)); 142 * Clear last sector first to spoil all components if device exists. 207 stripe_metadata_encode(&md, sector); 208 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-11-stable/sbin/geom/class/shsec/ |
H A D | geom_shsec.c | 110 u_char sector[512]; local 115 bzero(sector, sizeof(sector)); 124 * Clear last sector first to spoil all components if device exists. 182 shsec_metadata_encode(&md, sector); 183 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-11-stable/sbin/geom/class/raid3/ |
H A D | geom_raid3.c | 147 u_char sector[512]; local 154 bzero(sector, sizeof(sector)); 225 * Clear last sector first, to spoil all components if device exists. 266 raid3_metadata_encode(&md, sector); 267 error = g_metadata_store(str, sector, sizeof(sector));
|
/freebsd-11-stable/sys/geom/eli/ |
H A D | g_eli_ctl.c | 380 gctl_error(req, "Invalid sector size."); 404 u_char *sector; local 602 sector = malloc(pp->sectorsize, M_ELI, M_WAITOK | M_ZERO); 603 eli_metadata_encode(&md, sector); 604 error = g_write_data(cp, pp->mediasize - pp->sectorsize, sector, 612 explicit_bzero(sector, pp->sectorsize); 613 free(sector, M_ELI); 625 u_char *key, *mkeydst, *sector; local 710 sector = malloc(pp->sectorsize, M_ELI, M_WAITOK | M_ZERO); 712 eli_metadata_encode(&md, sector); 734 u_char *mkeydst, *sector; local 1052 u_char *sector; local [all...] |
/freebsd-11-stable/tools/regression/geom/MdLoad/ |
H A D | MdLoad.c | 55 struct sector { struct 56 LIST_ENTRY(sector) sectors; 65 LIST_HEAD(,sector) sectors; 67 struct sector *sp; 74 g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp) 76 struct sector *dsp2, *dsp3; 101 if (!strcasecmp(name, "sector")) { 173 } else if (!strcasecmp(name, "sector")) { 237 struct sector *dsp;
|
/freebsd-11-stable/sbin/geom/class/virstor/ |
H A D | geom_virstor.c | 161 u_char *sector; local 165 sector = NULL; 182 sector = malloc(sectorsize); 183 if (sector == NULL) { 187 bcopy(md, sector, size); 188 bzero(sector + size, sectorsize - size); 189 if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) != 195 if (sector != NULL) 196 free(sector); 290 gctl_error(req, "Devices need to have same sector siz [all...] |
/freebsd-11-stable/sys/dev/sfxge/common/ |
H A D | efx_bootcfg.c | 41 * NOTE: This is larger than the Medford per-PF bootcfg sector. 45 /* Medford per-PF bootcfg sector */ 183 /* Checksum the entire sector, including bytes after any DHCP_END */ 205 * Copy bootcfg sector data to a target buffer which may differ in size. 212 uint8_t *sector, 222 rc = efx_bootcfg_verify(enp, sector, sector_length, 230 (sector[used_bytes - 1] != DHCP_END)) { 239 sector[0] = 0; 240 sector[1] = DHCP_END; 250 * Reinitialise the sector i 209 efx_bootcfg_copy_sector( __in efx_nic_t *enp, __inout_bcount(sector_length) uint8_t *sector, __in size_t sector_length, __out_bcount(data_size) uint8_t *data, __in size_t data_size, __in boolean_t handle_format_errors) argument [all...] |