Searched refs:sector (Results 1 - 25 of 59) sorted by relevance

123

/freebsd-current/usr.sbin/fstyp/
H A Dcd9660.c45 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 Dmsdosfs.c50 /* 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 Dexfat.c149 * 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 Dg_label_iso9660.c46 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 Dg_label_msdosfs.c49 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 Dsubr.c102 * 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 Dudf.h92 #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 Dudf_vfsops.c39 * 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 Dintegrity_test.sh18 # 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 Donline_resize_test.sh24 ) | 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 Dgeom_cache.c133 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 Dvirtio_blk.h178 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 Dcd9660_debug.c153 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 Dcd9660_write.c148 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 Dcd9660_eltorito.c166 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 Dgeom_eli.c628 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 Dgeom_multipath.c151 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 Dgeom_raid3.c144 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 Dgeom_stripe.c125 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 Dgeom_shsec.c107 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 Dgeom_label.c122 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 Dgeom_journal.c140 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 Dgeom_concat.c122 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 DMdLoad.c53 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 Dg_eli_ctl.c369 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...]

Completed in 152 milliseconds

123