/freebsd/tools/regression/geom/Data/ |
H A D | disk.msdos.ext.xml | 8 <sector> 28 </sector> 29 <sector> 49 </sector> 50 <sector> 70 </sector> 71 <sector> 91 </sector> 92 <sector> 112 </sector> [all …]
|
H A D | disk.typo.ad0.xml | 8 <sector> 28 </sector> 29 <sector> 49 </sector> 50 <sector> 70 </sector> 71 <sector> 91 </sector> 92 <sector> 112 </sector> [all …]
|
H A D | disk.critter.ad0.xml | 9 <sector> 29 </sector> 30 <sector> 50 </sector> 51 <sector> 71 </sector> 72 <sector> 92 </sector> 93 <sector> 113 </sector> [all …]
|
H A D | disk.flat.da1.xml | 5 but also another BSD at sector one which is valid but bogus. 12 <sector> 32 </sector> 33 <sector> 53 </sector> 54 <sector> 74 </sector> 75 <sector> 95 </sector>
|
H A D | disk.apple.xml | 9 <sector> 29 </sector> 30 <sector> 50 </sector> 51 <sector> 71 </sector> 72 <sector> 92 </sector>
|
/freebsd/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 */ in g_parse_lba() 226 unsigned char *sector; in g_metadata_read() local 231 sector = NULL; in g_metadata_read() 248 sector = malloc(sectorsize); in g_metadata_read() 249 if (sector == NULL) { in g_metadata_read() 253 if (pread(fd, sector, sectorsize, mediasize - sectorsize) != in g_metadata_read() [all …]
|
/freebsd/share/man/man4/ |
H A D | gbde.4 |
|
/freebsd/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 bs=1 count=8 seek=64 conv=notrunc status=none 84 atf_check dd if=sector of=/dev/${md} bs=512 count=1 status=none 87 # Try to read from the corrupt sector [all …]
|
/freebsd/sbin/fdisk/ |
H A D | fdisk.8 | 37 Sector 0 of the disk must contain boot code, 41 The BIOS brings in sector 0 and verifies the magic number. 42 The sector 91 Reinitialize the boot code contained in sector 0 of the disk. 124 Initialize sector 0 of the disk. 130 Initialize sector 0 slice table 153 Update (edit) the disk's sector 0 slice table. 181 When called with no arguments, it prints the sector 0 slice table. 191 Warning: BIOS sector numbering starts with sector 1 196 beg: cyl 1/ sector 1/ head 0; [all …]
|
/freebsd/sys/sys/disk/ |
H A D | bsd.h | 41 /* Size of bootblock area in sector-size neutral bytes */ 65 uint32_t d_secsize; /* # of bytes per sector */ 73 * Spares (bad sector replacements) below are not counted in 90 * Interleave is physical sector interleave, set up by the 95 * traversed per logical sector. Thus an interleave of 1:1 97 * sector 0 is separated by one sector from logical sector 1. 98 * d_trackskew is the offset of sector 0 on track N relative to 99 * sector 0 on track N-1 on the same cylinder. Finally, d_cylskew 100 * is the offset of sector 0 on cylinder N relative to sector 0 104 uint16_t d_interleave; /* hardware sector interleave */ [all …]
|
/freebsd/sys/geom/label/ |
H A D | g_label_msdosfs.c | 49 uint8_t *sector0, *sector; in g_label_msdosfs_taste() local 55 sector = NULL; in g_label_msdosfs_taste() 58 /* Check if the sector size of the medium is a valid FAT sector size. */ in g_label_msdosfs_taste() 66 G_LABEL_DEBUG(1, "MSDOSFS: %s: sector size %d not compatible.", in g_label_msdosfs_taste() 71 /* Load 1st sector with boot sector and boot parameter block. */ in g_label_msdosfs_taste() 76 /* Check for the FAT boot sector signature. */ in g_label_msdosfs_taste() 143 * If the volume label "NO NAME " is in the boot sector, the in g_label_msdosfs_taste() 165 sector = (uint8_t *)g_read_data(cp, offset, in g_label_msdosfs_taste() 167 if (sector == NULL) in g_label_msdosfs_taste() 170 pfat_entry = (FAT_DES *)sector; in g_label_msdosfs_taste() [all …]
|
H A D | g_label_iso9660.c | 46 char *sector, *volume; in g_label_iso9660_taste() local 57 sector = g_read_data(cp, ISO9660_OFFSET, pp->sectorsize, NULL); in g_label_iso9660_taste() 58 if (sector == NULL) in g_label_iso9660_taste() 60 if (bcmp(sector, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) != 0) { in g_label_iso9660_taste() 61 g_free(sector); in g_label_iso9660_taste() 65 volume = sector + 0x28; in g_label_iso9660_taste() 68 g_free(sector); in g_label_iso9660_taste()
|
/freebsd/usr.sbin/fstyp/ |
H A D | msdosfs.c | 50 /* Check for the FAT boot sector signature. */ in check_signature() 66 uint8_t *sector0, *sector; in fstyp_msdosfs() local 70 sector = NULL; in fstyp_msdosfs() 72 /* Load 1st sector with boot sector and boot parameter block. */ in fstyp_msdosfs() 129 * If the volume label "NO NAME " is in the boot sector, the in fstyp_msdosfs() 143 sector = (uint8_t *)read_buf(fp, offset, fat_BytesPerSector); in fstyp_msdosfs() 144 if (sector == NULL) in fstyp_msdosfs() 147 pfat_entry = (FAT_DES *)sector; in fstyp_msdosfs() 176 (uint8_t *)(sector + fat_BytesPerSector)); in fstyp_msdosfs() 177 free(sector); in fstyp_msdosfs() [all …]
|
H A D | cd9660.c | 45 char *sector, *volume; in fstyp_cd9660() local 47 sector = read_buf(fp, ISO9660_OFFSET, 512); in fstyp_cd9660() 48 if (sector == NULL) in fstyp_cd9660() 50 if (bcmp(sector, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) != 0) { in fstyp_cd9660() 51 free(sector); in fstyp_cd9660() 54 volume = sector + 0x28; in fstyp_cd9660() 57 free(sector); in fstyp_cd9660()
|
/freebsd/sys/fs/udf/ |
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 45 * Sector: 305 uint32_t sector, size, mvds_start, mvds_end; 372 * Get the Anchor Volume Descriptor Pointer from sector 25 in udf_mountfs() 316 uint32_t sector, size, mvds_start, mvds_end; udf_mountfs() local 597 int error, sector, size; udf_vget() local [all...] |
/freebsd/sys/geom/eli/ |
H A D | g_eli_integrity.c | 55 * HMAC has to be stored in the same place (namely in the same sector) to make 60 * Let's store HMAC in sector. This is a must. This leaves us 480 bytes for 62 * sector size). We need another sector from where we take only 32 bytes of data 64 * original provider at the input and leaves us one sector of authenticated data 66 * Now, let's assume, we want to create provider with 4096 bytes sector. 68 * need nine 512-bytes sectors at the input to get one 4096-bytes sector at the 69 * output. That's better. With 4096 bytes sector we can use 89% of size of the 71 * The reliability comes from the fact, that every HMAC stored inside the sector 72 * is calculated only for the data in the same sector, so its impossible to 90 * PS. You can use any sector size with geli(8). My example is using 4kB, [all …]
|
/freebsd/sbin/newfs_msdos/ |
H A D | newfs_msdos.8 | 43 .Op Fl S Ar sector-size 122 .It Fl S Ar sector-size 123 Number of bytes per sector. 157 Location of the file system info sector (FAT32 only). 158 A value of 0xffff signifies no info sector. 160 Location of the backup boot sector (FAT32 only). 162 of 0xffff signifies no backup sector. 194 FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter 201 uint16_t bpbBytesPerSec; /* [-S] bytes per sector */ 220 uint16_t bpbFSInfo; /* [-i] file system info sector */ [all …]
|
/freebsd/stand/i386/pmbr/ |
H A D | pmbr.S | 39 .set SECSIZE,0x200 # Size of a single disk sector 111 # Try alternative LBAs from the last sector for the GPT header. 114 movw $DPBUF+DPBUF_SEC,%si # %si = last sector + 1 121 jmp main.2a # Read the next sector 123 # Load a partition table sector from disk and look for a FreeBSD boot 156 addw $SECSIZE/16,%ax # sector 164 # Move to the next partition. If we walk off the end of the sector, load 165 # the next sector. We assume that partition entries are smaller than 64k 166 # and that they won't span a sector boundary. 174 cmpw $PART_ADDR+0x200,%bx # Still in sector? [all …]
|
/freebsd/usr.sbin/makefs/cd9660/ |
H A D | cd9660_write.c | 148 cd9660_write_filedata(diskStructure, fd, vd_temp->sector, in cd9660_write_volume_descriptors() 159 * @param int Sector to start writing path table to 164 cd9660_write_path_table(iso9660_disk *diskStructure, FILE *fd, off_t sector, in cd9660_write_path_table() argument 213 ret = cd9660_write_filedata(diskStructure, fd, sector, buffer_head, in cd9660_write_path_table() 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 in cd9660_write_file() 316 * records - beware of sector boundaries in cd9660_write_file() 334 /* Seek to the next sector. */ in cd9660_write_file() 378 * Wrapper function to write a buffer (one sector) to disk. [all …]
|
H A D | cd9660_debug.c | 153 printf("Volume descriptor in sector %" PRId64 in debug_print_volume_descriptor_information() 155 tmp->sector, tmp->volumeDescriptorData[0], temp); in debug_print_volume_descriptor_information() 193 debug_dump_to_xml_path_table(FILE *fd, off_t sector, int size, int mode) in debug_dump_to_xml_path_table() argument 199 if (fseeko(fd, CD9660_SECTOR_SIZE * sector, SEEK_SET) == -1) in debug_dump_to_xml_path_table() 225 off_t sector; in debug_dump_to_xml() local 233 sector = 16; in debug_dump_to_xml() 235 if (fseeko(fd, CD9660_SECTOR_SIZE * sector, SEEK_SET) == -1) in debug_dump_to_xml() 247 debug_dump_to_xml_volume_descriptor(buf, sector); in debug_dump_to_xml() 248 sector++; in debug_dump_to_xml() 254 printf("Path table 1 located at sector %i and is %i bytes long\n", in debug_dump_to_xml() [all …]
|
/freebsd/lib/geom/eli/ |
H A D | geom_eli.c | 628 unsigned char sector[sizeof(struct g_eli_metadata)]; in eli_metadata_read() local 641 if (read(fd, sector, sizeof(sector)) != sizeof(sector)) { in eli_metadata_read() 650 error = g_metadata_read(prov, sector, sizeof(sector), in eli_metadata_read() 658 error = eli_metadata_decode(sector, md); in eli_metadata_read() 684 unsigned char sector[sizeof(struct g_eli_metadata)]; in eli_metadata_store() local 687 eli_metadata_encode(md, sector); in eli_metadata_store() 696 explicit_bzero(sector, sizeof(sector)); in eli_metadata_store() 699 if (write(fd, sector, sizeof(sector)) != sizeof(sector)) { in eli_metadata_store() 702 explicit_bzero(sector, sizeof(sector)); in eli_metadata_store() 709 error = g_metadata_store(prov, sector, sizeof(sector)); in eli_metadata_store() [all …]
|
/freebsd/sys/fs/msdosfs/ |
H A D | bpb.h | 26 uint16_t bpbBytesPerSec; /* bytes per sector */ 44 uint16_t bpbBytesPerSec; /* bytes per sector */ 62 uint16_t bpbBytesPerSec; /* bytes per sector */ 81 uint16_t bpbFSInfo; /* filesystem info structure sector */ 82 uint16_t bpbBackup; /* backup boot sector */ 104 int8_t bpbBytesPerSec[2]; /* bytes per sector */ 122 int8_t bpbBytesPerSec[2]; /* bytes per sector */ 140 uint8_t bpbBytesPerSec[2]; /* bytes per sector */ 156 uint8_t bpbFSInfo[2]; /* filesystem info structure sector */ 157 uint8_t bpbBackup[2]; /* backup boot sector */
|
/freebsd/sys/geom/bde/ |
H A D | g_bde_crypt.c |
|
/freebsd/stand/libsa/ |
H A D | saioctl.h | 36 #define SAIONOBAD (('d'<<8)|4) /* inhibit bad sector forwarding */ 37 #define SAIODOBAD (('d'<<8)|5) /* enable bad sector forwarding */ 42 #define SAIOSSI (('d'<<8)|10) /* set skip sector inhibit */ 43 #define SAIONOSSI (('d'<<8)|11) /* inhibit skip sector handling */ 44 #define SAIOSSDEV (('d'<<8)|12) /* is device skip sector type? */ 46 #define SAIOGBADINFO (('d'<<8)|14) /* get bad-sector table */
|
/freebsd/usr.sbin/fdread/ |
H A D | fdread.1 | 102 sector ID fields), thus a dummy block with fill 130 sector ID fields, and write out their contents to standard output. 131 Each sector ID field contains recorded values for the cylinder number 135 the record number (sector number starting with 1) 138 .Em sector shift value 149 number) to read the sector ID fields from; only allowed together with 179 as well as the location of the error (physical cylinder, head, and sector 181 .Dq sector shift value ,
|