/freebsd-current/usr.sbin/fstyp/ |
H A D | cd9660.c | 45 char *sector, *volume; local 47 sector = read_buf(fp, ISO9660_OFFSET, 512); 48 if (sector == NULL) 50 if (bcmp(sector, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) != 0) { 51 free(sector); 54 volume = sector + 0x28; 57 free(sector);
|
H A D | msdosfs.c | 50 /* Check for the FAT boot sector signature. */ 66 uint8_t *sector0, *sector; local 70 sector = NULL; 72 /* Load 1st sector with boot sector and boot parameter block. */ 129 * If the volume label "NO NAME " is in the boot sector, the 143 sector = (uint8_t *)read_buf(fp, offset, fat_BytesPerSector); 144 if (sector == NULL) 147 pfat_entry = (FAT_DES *)sector; 176 (uint8_t *)(sector [all...] |
H A D | exfat.c | 149 * Compute the byte-by-byte multi-sector checksum of the given boot region 158 unsigned char *sector; local 164 sector = read_sect(fp, region + sect, bytespersec); 165 if (sector == NULL) 177 (checksum >> 1) + (uint32_t)sector[n]; 179 free(sector); 352 * Technically the entire sector should be full of repeating 4-byte
|
/freebsd-current/sys/geom/label/ |
H A D | g_label_iso9660.c | 46 char *sector, *volume; local 57 sector = g_read_data(cp, ISO9660_OFFSET, pp->sectorsize, NULL); 58 if (sector == NULL) 60 if (bcmp(sector, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) != 0) { 61 g_free(sector); 65 volume = sector + 0x28; 68 g_free(sector);
|
H A D | g_label_msdosfs.c | 49 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. */ 143 * If the volume label "NO NAME " is in the boot sector, the 165 sector [all...] |
/freebsd-current/sbin/geom/misc/ |
H A D | subr.c | 102 * The size of a sector is context specific (i.e. determined by the 105 * sectors. We should map the byte-oriented value into a sector-oriented 106 * value when we already know the sector size in bytes. At this time 113 * suffix forces sector interpretation. 167 unit = sectorsize; /* sector */ 226 unsigned char *sector; local 231 sector = NULL; 248 sector = malloc(sectorsize); 249 if (sector == NULL) { 253 if (pread(fd, sector, sectorsiz 283 unsigned char *sector; local 329 unsigned char *sector; local [all...] |
/freebsd-current/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, daddr_t sector, int size, struct buf **bp) argument 102 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 305 uint32_t sector, size, mvds_start, mvds_end; local 372 * Get the Anchor Volume Descriptor Pointer from sector 256. 373 * XXX Should also check sector 586 int error, sector, size; local [all...] |
/freebsd-current/tests/sys/geom/class/eli/ |
H A D | integrity_test.sh | 18 # Copy first small sector to the second small sector. 20 atf_check dd if=backing_file of=sector bs=512 count=1 \ 22 atf_check dd if=sector of=backing_file bs=512 count=1 seek=1 \ 33 # Copy first big sector to the second big sector. 39 seek=$(( $secsize / 512 )) of=sector conv=notrunc status=none 41 seek=$(( $secsize / 256 )) if=sector conv=notrunc status=none 82 atf_check dd if=/dev/${md} of=sector bs=512 count=1 status=none 83 atf_check dd if=rnd of=sector b [all...] |
H A D | online_resize_test.sh | 24 ) | while read prefix sector auth esize10 ka10 kt10 esize20 ka20 kt20 esize30 ka30 kt30; do 53 atf_check geli init ${aalgo} -s ${sector} -Bnone -PKtmp.key ${md}p1 62 atf_check geli init -R ${aalgo} -s ${sector} -Bnone -PKtmp.key ${md}p1 70 atf_check geli init ${aalgo} -s ${sector} -Bnone -PKtmp.key ${md}p1 137 if [ "${sector}" -eq 512 ]; then 138 osize10=$((osize10+sector)) 139 osize20=$((osize20+sector)) 140 osize30=$((osize30+sector)) 143 atf_check geli onetime ${aalgo} -s ${sector} ${md}p1 153 atf_check geli onetime -R ${aalgo} -s ${sector} [all...] |
/freebsd-current/lib/geom/cache/ |
H A D | geom_cache.c | 133 u_char sector[512]; local 138 bzero(sector, sizeof(sector)); 162 cache_metadata_encode(&md, sector); 163 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-current/sys/dev/virtio/block/ |
H A D | virtio_blk.h | 178 uint64_t sector; member in struct:virtio_blk_outhdr 186 /* Discard/write zeroes start sector */ 187 uint64_t sector; member in struct:virtio_blk_discard_write_zeroes
|
/freebsd-current/usr.sbin/makefs/cd9660/ |
H A D | cd9660_debug.c | 153 printf("Volume descriptor in sector %" PRId64 155 tmp->sector, tmp->volumeDescriptorData[0], temp); 193 debug_dump_to_xml_path_table(FILE *fd, off_t sector, int size, int mode) argument 199 if (fseeko(fd, CD9660_SECTOR_SIZE * sector, SEEK_SET) == -1) 225 off_t sector; local 233 sector = 16; 235 if (fseeko(fd, CD9660_SECTOR_SIZE * sector, SEEK_SET) == -1) 247 debug_dump_to_xml_volume_descriptor(buf, sector); 248 sector++; 254 printf("Path table 1 located at sector 364 debug_dump_to_xml_volume_descriptor(unsigned char* buf, int sector) argument [all...] |
H A D | cd9660_write.c | 148 cd9660_write_filedata(diskStructure, fd, vd_temp->sector, 164 cd9660_write_path_table(iso9660_disk *diskStructure, FILE *fd, off_t sector, argument 213 ret = cd9660_write_filedata(diskStructure, fd, sector, buffer_head, 223 * sector to copy them to. One thing to watch out for: the only path tables 253 * with the root node. All of the records should store what sector the 306 * be careful of sector boundaries 316 * records - beware of sector boundaries 334 /* Seek to the next sector. */ 378 * Wrapper function to write a buffer (one sector) to disk. 381 * life easier if you have to write things that align to a sector 391 cd9660_write_filedata(iso9660_disk *diskStructure, FILE *fd, off_t sector, const unsigned char *buf, int numsecs) argument 470 cd9660_write_rr(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode, off_t offset, off_t sector) argument [all...] |
H A D | cd9660_eltorito.c | 166 new_image->sector = -1; 299 cd9660_731(disk->sector, ie->load_rba); 302 "load segment %04x, system type %d, sector count %d, " 305 disk->num_sectors, disk->sector)); 346 cd9660_731(disk->sector, se->load_rba); 368 int sector; local 384 /* Point to catalog: For now assume it consumes one sector */ 385 ELTORITO_DPRINTF(("Boot catalog will go in sector %d\n", first_sector)); 425 /* Populate sector numbers */ 426 sector [all...] |
/freebsd-current/lib/geom/eli/ |
H A D | geom_eli.c | 628 unsigned char sector[sizeof(struct g_eli_metadata)]; local 641 if (read(fd, sector, sizeof(sector)) != sizeof(sector)) { 650 error = g_metadata_read(prov, sector, sizeof(sector), 658 error = eli_metadata_decode(sector, md); 684 unsigned char sector[sizeof(struct g_eli_metadata)]; local 687 eli_metadata_encode(md, sector); 696 explicit_bzero(sector, sizeo 1593 unsigned char *sector; local 1708 unsigned char *sector; local 1824 unsigned char *sector; local [all...] |
/freebsd-current/lib/geom/multipath/ |
H A D | geom_multipath.c | 151 uint8_t *sector, *rsector; local 183 gctl_error(req, "%s sector size %ju different.", 222 * Allocate a sector to write as metadata. 224 sector = calloc(1, secsize); 225 if (sector == NULL) { 238 multipath_metadata_encode(&md, sector); 244 error = g_metadata_store(name, sector, secsize); 269 if (memcmp(sector, rsector, secsize)) { 277 free(sector);
|
/freebsd-current/lib/geom/raid3/ |
H A D | geom_raid3.c | 144 u_char sector[512]; local 151 bzero(sector, sizeof(sector)); 222 * Clear last sector first, to spoil all components if device exists. 263 raid3_metadata_encode(&md, sector); 264 error = g_metadata_store(str, sector, sizeof(sector));
|
/freebsd-current/lib/geom/stripe/ |
H A D | geom_stripe.c | 125 u_char sector[512]; local 130 bzero(sector, sizeof(sector)); 139 * Clear last sector first to spoil all components if device exists. 204 stripe_metadata_encode(&md, sector); 205 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-current/lib/geom/shsec/ |
H A D | geom_shsec.c | 107 u_char sector[512]; local 112 bzero(sector, sizeof(sector)); 121 * Clear last sector first to spoil all components if device exists. 179 shsec_metadata_encode(&md, sector); 180 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-current/lib/geom/label/ |
H A D | geom_label.c | 122 u_char sector[512]; local 125 bzero(sector, sizeof(sector)); 133 * Clear last sector first to spoil all components if device exists. 158 label_metadata_encode(&md, sector); 159 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-current/lib/geom/journal/ |
H A D | geom_journal.c | 140 u_char sector[512]; local 144 bzero(sector, sizeof(sector)); 216 "sector and this operation is going to overwrite " 234 gctl_error(req, "Not equal sector sizes."); 239 * Clear last sector first, to spoil all components if device exists. 276 journal_metadata_encode(&md, sector); 277 error = g_metadata_store(str, sector, sizeof(sector));
|
/freebsd-current/lib/geom/concat/ |
H A D | geom_concat.c | 122 u_char sector[512]; local 126 bzero(sector, sizeof(sector)); 135 * Clear last sector first to spoil all components if device exists. 174 concat_metadata_encode(&md, sector); 175 error = g_metadata_store(name, sector, sizeof(sector));
|
/freebsd-current/tools/regression/geom/MdLoad/ |
H A D | MdLoad.c | 53 struct sector { struct 54 LIST_ENTRY(sector) sectors; 63 LIST_HEAD(,sector) sectors; 65 struct sector *sp; 72 g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp) 74 struct sector *dsp2, *dsp3; 99 if (!strcasecmp(name, "sector")) { 171 } else if (!strcasecmp(name, "sector")) { 235 struct sector *dsp;
|
/freebsd-current/sys/geom/eli/ |
H A D | g_eli_ctl.c | 369 gctl_error(req, "Invalid sector size."); 393 u_char *sector; local 624 sector = malloc(pp->sectorsize, M_ELI, M_WAITOK | M_ZERO); 625 eli_metadata_encode(&md, sector); 626 error = g_write_data(cp, pp->mediasize - pp->sectorsize, sector, 634 zfree(sector, M_ELI); 646 u_char *key, *mkeydst, *sector; local 731 sector = malloc(pp->sectorsize, M_ELI, M_WAITOK | M_ZERO); 733 eli_metadata_encode(&md, sector); 735 error = g_write_data(cp, pp->mediasize - pp->sectorsize, sector, 754 u_char *mkeydst, *sector; local 1071 u_char *sector; local [all...] |