/freebsd/tests/sys/geom/class/eli/ |
H A D | onetime_test.sh | 7 secsize=$2 12 geli onetime -e $ealgo -l $keylen -s $secsize ${md} 14 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} status=none 16 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` 18 md_ddev=`dd if=/dev/${md}.eli bs=${secsize} count=${sectors} status=none | md5` 20 md_edev=`dd if=/dev/${md} bs=${secsize} count=${sectors} status=none | md5` 55 secsize=$3 60 geli onetime -a $aalgo -e $ealgo -l $keylen -s $secsize ${md} 62 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} status=none 64 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` [all …]
|
H A D | integrity_test.sh | 7 secsize=$3 13 -K keyfile -s $secsize ${md} 16 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=1 status=none 26 dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=1 29 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=2 status=none 30 atf_check dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=2 \ 39 seek=$(( $secsize / 512 )) of=sector conv=notrunc status=none 41 seek=$(( $secsize / 256 )) if=sector conv=notrunc status=none 43 dd if=/dev/${md}.eli of=/dev/null bs=${secsize} count=$ns 73 secsize=$3 [all …]
|
H A D | reentrancy_test.sh | 11 secsize=$3 15 atf_check dd if=/dev/random of=testdata bs=$secsize count=1 status=none 16 atf_check dd if=/dev/random of=keyfile bs=$secsize count=16 status=none 21 -s $secsize ${md} 26 -s $secsize ${md}.eli 31 atf_check dd if=testdata of=/dev/${md}.eli.eli bs=$secsize count=1 \ 33 atf_check dd if=/dev/${md}.eli.eli of=cmpdata bs=$secsize count=1 \
|
H A D | init_test.sh | 8 secsize=$2 14 -s $secsize ${md} 17 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} \ 20 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` 22 md_ddev=`dd if=/dev/${md}.eli bs=${secsize} count=${sectors} status=none | md5` 24 md_edev=`dd if=/dev/${md} bs=${secsize} count=${sectors} status=none | md5` 28 atf_fail "Miscompare for ealgo=${ealgo} keylen=${keylen} sec=${secsize}" 31 atf_fail "Data was not encrypted for ealgo=${ealgo} keylen=${keylen} sec=${secsize}" 232 secsize=$3 238 -s $secsize ${md} [all …]
|
H A D | conf.sh | 47 for secsize in 512 1024 2048 4096 $MAX_SECSIZE; do 48 ${func} $cipher $aalgo $secsize 69 for secsize in 512 1024 2048 4096 $MAX_SECSIZE; do 70 ${func} $cipher $secsize
|
/freebsd/usr.sbin/fdread/ |
H A D | fdread.c | 163 unsigned int nbytes, tracksize, mediasize, secsize, n; in doread() local 170 secsize = 128 << fdt.secsize; in doread() 171 tracksize = fdt.sectrac * secsize; in doread() 178 fdt.tracks, fdt.heads, fdt.sectrac, secsize, _devname); in doread() 200 for (n = 0; n < tracksize; n += secsize) { in doread() 203 rv = read(fd, trackbuf, secsize); in doread() 204 if ((unsigned) rv == secsize) { in doread() 241 memset(trackbuf, fillbyte, secsize); in doread() 249 secsize); in doread() 250 if ((unsigned)rv != secsize) in doread() [all …]
|
H A D | fdutil.c | 211 if (j == 128) out->secsize = 0; in parse_fmt() 212 else if (j == 256) out->secsize = 1; in parse_fmt() 213 else if (j == 512) out->secsize = 2; in parse_fmt() 214 else if (j == 1024) out->secsize = 3; in parse_fmt() 348 int secsize, speed; in print_fmt() local 350 secsize = 128 << in.secsize; in print_fmt() 360 in.sectrac, secsize, in.datalen, in.gap, in.tracks, in print_fmt() 420 if (((128 << fdtp->secsize) * fdtp->size / 1024) == size) in get_fmt()
|
/freebsd/lib/geom/multipath/ |
H A D | geom_multipath.c | 154 ssize_t secsize = 0, ssize; in mp_label() local 179 secsize = ssize; in mp_label() 182 if (secsize != ssize) { in mp_label() 204 md.md_sectorsize = secsize; in mp_label() 224 sector = calloc(1, secsize); in mp_label() 229 rsector = malloc(secsize); in mp_label() 244 error = g_metadata_store(name, sector, secsize); in mp_label() 261 if (pread(fd, rsector, secsize, disksize - secsize) != in mp_label() 262 (ssize_t)secsize) { in mp_label() 269 if (memcmp(sector, rsector, secsize)) { in mp_label()
|
/freebsd/sys/geom/label/ |
H A D | g_label_reiserfs.c |
|
/freebsd/sys/geom/eli/ |
H A D | g_eli_privacy.c | 260 u_int i, nsec, secsize; in g_eli_crypto_run() local 270 secsize = LIST_FIRST(&sc->sc_geom->provider)->sectorsize; in g_eli_crypto_run() 271 nsec = bp->bio_length / secsize; in g_eli_crypto_run() 314 for (i = 0, dstoff = bp->bio_offset; i < nsec; i++, dstoff += secsize) { in g_eli_crypto_run() 318 crypto_use_buf(crp, data, secsize); in g_eli_crypto_run() 319 data += secsize; in g_eli_crypto_run() 322 crypto_use_vmpage(crp, pages, secsize, pages_offset); in g_eli_crypto_run() 323 pages_offset += secsize; in g_eli_crypto_run() 337 crp->crp_payload_length = secsize; in g_eli_crypto_run() 340 secsize); in g_eli_crypto_run()
|
/freebsd/sys/dev/ida/ |
H A D | ida_disk.c | 195 drv->secsize = dinfo.secsize == 0 ? 512 : dinfo.secsize; in idad_attach() 202 drv->secperunit / ((1024 * 1024) / drv->secsize), in idad_attach() 203 drv->secperunit, drv->secsize); in idad_attach() 209 drv->disk->d_sectorsize = drv->secsize; in idad_attach() 210 drv->disk->d_mediasize = (off_t)drv->secperunit * drv->secsize; in idad_attach()
|
/freebsd/lib/geom/stripe/ |
H A D | geom_stripe.c | 126 unsigned ssize, secsize; in stripe_label() local 142 secsize = 0; in stripe_label() 155 if (secsize == 0) in stripe_label() 156 secsize = ssize; in stripe_label() 158 secsize = g_lcm(secsize, ssize); in stripe_label() 175 if ((stripesize % secsize) != 0) { in stripe_label() 177 secsize); in stripe_label()
|
/freebsd/sbin/fsck_ffs/ |
H A D | setup.c | 500 dev_bsize = secsize = DEV_BSIZE; in sblock_init() 514 u_int secsize; in calcsb() local 524 if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1) in calcsb() 526 fsrbuf = Balloc(secsize); in calcsb() 530 (SBLOCK_UFS2 - secsize) / dev_bsize, secsize) != 0) { in calcsb() 534 fsr = (struct fsrecovery *)&fsrbuf[secsize - sizeof *fsr]; in calcsb() 559 u_int secsize, rdsize; in chkrecovery() local 567 if (ioctl(devfd, DIOCGSECTORSIZE, &secsize) == -1 || in chkrecovery() 568 rdsize % secsize != 0 || in chkrecovery() 601 u_int secsize, rdsize; in saverecovery() local [all …]
|
/freebsd/lib/geom/virstor/ |
H A D | geom_virstor.c | 155 size_t ssize, secsize; in virstor_label() local 198 msize = secsize = 0; in virstor_label() 206 if (secsize == 0) in virstor_label() 207 secsize = ssize; in virstor_label() 208 else if (secsize != ssize) { in virstor_label() 211 (u_int)ssize, name, (u_int)secsize); in virstor_label() 216 if (secsize == 0) { in virstor_label() 221 if (md.md_chunk_size % secsize != 0) { in virstor_label() 222 size_t new_size = roundup(md.md_chunk_size, secsize); in virstor_label() 224 "sector size (%zu bytes).\n", secsize); in virstor_label() [all …]
|
/freebsd/usr.sbin/fdwrite/ |
H A D | fdwrite.c | 25 int gaplen, int secsize, int fill, int interleave) in format_track() 43 f.fd_formb_secshift = secsize; in format_track() 51 f.fd_formb_secsize(i) = secsize; in format_track() 133 bpt = fdt.sectrac * (1<<fdt.secsize) * 128; in main() 146 fdt.tracks,fdt.heads,fdt.sectrac,(1<<fdt.secsize) * 128, in main() 164 fdt.trans, fdt.f_gap, fdt.secsize, 0xe6, in main() 26 format_track(int fd,int cyl,int secs,int head,int rate,int gaplen,int secsize,int fill,int interleave) format_track() argument
|
/freebsd/sbin/fdisk/ |
H A D | fdisk.c | 72 static int secsize = 0; /* the sensed sector size */ variable 423 printf("Media sector size is %d\n", secsize); in main() 493 part_mb *= secsize; in print_part() 526 if ((mboot.bootinst_size = sb.st_size) % secsize != 0) in init_boot() 754 if (secsize == 0) in read_disk() 755 for (secsize = MIN_SEC_SIZE; secsize <= MAX_SEC_SIZE; in read_disk() 756 secsize *= 2) { in read_disk() 758 int size = read(fd, buf, secsize); in read_disk() 759 if (size == secsize) in read_disk() 761 return secsize; in read_disk() [all …]
|
/freebsd/stand/libsa/geli/ |
H A D | geliboot.c | 319 size_t n, nsec, secsize; in geli_io() local 324 secsize = gdev->sc.sc_sectorsize; in geli_io() 325 nsec = bytes / secsize; in geli_io() 333 secsize = bytes; in geli_io() 337 for (n = 0, dstoff = offset; n < nsec; n++, dstoff += secsize) { in geli_io() 342 keyno = (dstoff >> G_ELI_KEY_SHIFT) / secsize; in geli_io() 345 error = geliboot_crypt(gdev->sc.sc_ealgo, enc, pbuf, secsize, in geli_io() 354 pbuf += secsize; in geli_io()
|
/freebsd/lib/geom/shsec/ |
H A D | geom_shsec.c | 108 unsigned ssize, secsize; in shsec_label() local 124 secsize = 0; in shsec_label() 137 if (secsize == 0) in shsec_label() 138 secsize = ssize; in shsec_label() 140 secsize = g_lcm(secsize, ssize); in shsec_label()
|
/freebsd/sys/dev/mfi/ |
H A D | mfi_disk.c | 98 uint32_t secsize; in mfi_disk_attach() local 112 secsize = MFI_SECTOR_LEN; in mfi_disk_attach() 145 sectors / (1024 * 1024 / secsize), sectors, state); in mfi_disk_attach() 149 sectors / (1024 * 1024 / secsize), sectors, in mfi_disk_attach() 155 sc->ld_disk->d_maxsize = min(sc->ld_controller->mfi_max_io * secsize, in mfi_disk_attach() 163 sc->ld_disk->d_sectorsize = secsize; in mfi_disk_attach() 164 sc->ld_disk->d_mediasize = sectors * secsize; in mfi_disk_attach()
|
H A D | mfi_syspd.c | 102 uint32_t secsize; in mfi_syspd_attach() local 114 secsize = MFI_SECTOR_LEN; in mfi_syspd_attach() 126 sectors / (1024 * 1024 / secsize), sectors, sc->pd_id); in mfi_syspd_attach() 129 sc->pd_disk->d_maxsize = min(sc->pd_controller->mfi_max_io * secsize, in mfi_syspd_attach() 137 sc->pd_disk->d_sectorsize = secsize; in mfi_syspd_attach() 138 sc->pd_disk->d_mediasize = sectors * secsize; in mfi_syspd_attach()
|
/freebsd/lib/geom/eli/ |
H A D | geom_eli.c | 730 unsigned int secsize, eli_version; in eli_init() local 889 secsize = g_get_sectorsize(prov); in eli_init() 890 if (mediasize == 0 || secsize == 0) { in eli_init() 900 md.md_sectorsize = secsize; in eli_init() 902 if (val < 0 || (val % secsize) != 0 || !powerof2(val)) { in eli_init() 1709 ssize_t secsize; in eli_backup_create() local 1715 secsize = 0; in eli_backup_create() 1717 secsize = g_get_sectorsize(prov); in eli_backup_create() 1718 if (secsize == 0) { in eli_backup_create() 1723 sector = malloc(secsize); in eli_backup_create() [all …]
|
/freebsd/usr.sbin/fdformat/ |
H A D | fdformat.c | 49 int gaplen, int secsize, int fill, int interleave, in format_track() argument 68 f.fd_formb_secshift = secsize; in format_track() 76 f.fd_formb_secsize(i) = secsize; in format_track() 273 bytes_per_track = fdt.sectrac * (128 << fdt.secsize); in main() 311 fdt.secsize, fill, fdt.f_inter, in main()
|
/freebsd/tests/sys/geom/class/union/ |
H A D | union_test.sh | 166 secsize="$(diskinfo "/dev/${lowerdev}" | awk '{print $2}')" 212 atf_test_case secsize cleanup 232 secsize="$(diskinfo "/dev/${guniondev}" | awk '{print $2}')" 233 atf_check_equal "1024" "$secsize" 315 atf_add_test_case secsize
|
/freebsd/sys/sys/ |
H A D | fdcio.h | 67 u_char secsize; /* usually 2 */ member 81 # define fd_formb_secsize(i) format_info.idfields[i].secsize 85 int secsize; /* size code for sectors */ member
|
/freebsd/sys/geom/ |
H A D | geom_flashmap.c | 68 const char *devname, int secsize, struct g_flashmap_head *slices); 85 const char *devname, int secsize, struct g_flashmap_head *slices) in g_flashmap_modify() argument 102 secsize, FLASH_SLICES_FMT, gp->name, slice->sl_name); in g_flashmap_modify() 115 secsize, "%ss.%s", gp->name, slice->sl_name); in g_flashmap_modify()
|