Home
last modified time | relevance | path

Searched refs:sector_size (Results 1 – 25 of 28) sorted by relevance

12

/third_party/NuttX/drivers/usbdev/gadget/
Df_mass_storage_ram.c55 uint32_t sector_size; member
75 uint32_t sector_size = sc->sector_size; in ram_read() local
78 if (start_sector + nsectors > sc->len / sector_size) in ram_read()
84 status = usbd_copy_to_user(buffer, nsectors * sector_size, start_addr + in ram_read()
85 start_sector * sector_size, nsectors * sector_size); in ram_read()
99 uint32_t sector_size = sc->sector_size; in ram_write() local
102 if (start_sector + nsectors > sc->len / sector_size) in ram_write()
108 status = usbd_copy_from_user(start_addr + start_sector * sector_size, in ram_write()
109 nsectors * sector_size, buffer, nsectors * sector_size); in ram_write()
128 ram_geometry->geo_nsectors = sc->len / sc->sector_size; in ram_geometry()
[all …]
/third_party/exfatprogs/lib/
Dlibexfat.c67 b = clu & ((bd->sector_size << 3) - 1); in exfat_set_bit()
77 b = clu & ((bd->sector_size << 3) - 1); in exfat_clear_bit()
196 if (ioctl(fd, BLKSSZGET, &bd->sector_size) < 0) in exfat_get_blk_dev_info()
197 bd->sector_size = DEFAULT_SECTOR_SIZE; in exfat_get_blk_dev_info()
198 bd->sector_size_bits = sector_size_bits(bd->sector_size); in exfat_get_blk_dev_info()
199 bd->num_sectors = blk_dev_size / bd->sector_size; in exfat_get_blk_dev_info()
205 exfat_debug("Block sector size : %u\n", bd->sector_size); in exfat_get_blk_dev_info()
361 unsigned int cluster_size, sector_size; in exfat_get_root_entry_offset() local
377 sector_size = 1 << bs->bsx.sect_size_bits; in exfat_get_root_entry_offset()
378 cluster_size = (1 << bs->bsx.sect_per_clus_bits) * sector_size; in exfat_get_root_entry_offset()
[all …]
/third_party/exfatprogs/mkfs/
Dmkfs.c57 pbsx->vol_offset = cpu_to_le64(bd->offset / bd->sector_size); in exfat_setup_boot_sector()
58 pbsx->vol_length = cpu_to_le64(bd->size / bd->sector_size); in exfat_setup_boot_sector()
59 pbsx->fat_offset = cpu_to_le32(finfo.fat_byte_off / bd->sector_size); in exfat_setup_boot_sector()
60 pbsx->fat_length = cpu_to_le32(finfo.fat_byte_len / bd->sector_size); in exfat_setup_boot_sector()
61 pbsx->clu_offset = cpu_to_le32(finfo.clu_byte_off / bd->sector_size); in exfat_setup_boot_sector()
69 for (i = ui->cluster_size / bd->sector_size; i > 1; i /= 2) in exfat_setup_boot_sector()
113 ppbr = malloc(bd->sector_size); in exfat_write_boot_sector()
118 memset(ppbr, 0, bd->sector_size); in exfat_write_boot_sector()
130 boot_calc_checksum((unsigned char *)ppbr, bd->sector_size, in exfat_write_boot_sector()
147 peb = malloc(bd->sector_size); in exfat_write_extended_boot_sectors()
[all …]
/third_party/ntfs-3g/ntfsprogs/
Dntfslabel.c247 vol->sector_size, bs) == vol->sector_size)) { in change_serial()
251 memcpy(oldbs, bs, vol->sector_size); in change_serial()
254 same = !memcmp(oldbs, bs, vol->sector_size); in change_serial()
267 vol->sector_size, bs) == vol->sector_size)) { in change_serial()
289 bs = (NTFS_BOOT_SECTOR*)ntfs_malloc(vol->sector_size); in set_new_serial()
290 oldbs = (NTFS_BOOT_SECTOR*)ntfs_malloc(vol->sector_size); in set_new_serial()
303 vol->sector_size); in set_new_serial()
326 bs = (NTFS_BOOT_SECTOR*)ntfs_malloc(vol->sector_size); in print_serial()
329 vol->sector_size, bs) == vol->sector_size)) { in print_serial()
Dntfsfix.c752 s32 sector_size) in rewrite_boot() argument
759 bw = ntfs_pwrite(dev, 0, sector_size, full_bs); in rewrite_boot()
760 if (bw == sector_size) in rewrite_boot()
1228 s64 read_sector, s64 fix_sectors, s32 sector_size) in try_fix_boot() argument
1237 br = ntfs_pread(vol->dev, read_sector*sector_size, in try_fix_boot()
1238 sector_size, full_bs); in try_fix_boot()
1239 if (br != sector_size) { in try_fix_boot()
1251 sector_size_le = cpu_to_le16(sector_size); in try_fix_boot()
1263 sector_size); in try_fix_boot()
1289 s32 sector_size, s64 shown_sectors) in try_alternate_boot() argument
[all …]
Dmkntfs.c221 long sector_size; /* -s, in bytes, power of 2, default is 512 bytes. */ member
587 opts2->sector_size = -1; in mkntfs_init_options()
698 &opts2->sector_size)) in mkntfs_parse_options()
2307 if (index_block_size < (u32)opts.sector_size) { in add_attr_index_root()
3504 if (opts.sector_size) { in mkntfs_open_partition()
3506 opts.num_sectors = sbuf.st_size / opts.sector_size; in mkntfs_open_partition()
3508 opts.num_sectors = ((s64)sbuf.st_blocks << 9) / opts.sector_size; in mkntfs_open_partition()
3514 opts.sector_size = 512; in mkntfs_open_partition()
3577 if (opts.sector_size < 0) { in mkntfs_override_vol_params()
3578 opts.sector_size = ntfs_device_sector_size_get(vol->dev); in mkntfs_override_vol_params()
[all …]
Dntfsresize.c2753 s64 bs_size = vol->sector_size; in update_bootsector()
2757 bs = (NTFS_BOOT_SECTOR*)ntfs_malloc(vol->sector_size); in update_bootsector()
2820 && !(opt.bytes % vol->sector_size)) { in update_bootsector()
2822 - vol->sector_size, SEEK_SET) == (off_t)-1) in update_bootsector()
2836 return nr_clusters * v->cluster_size + v->sector_size; in vol_size()
3484 vol->sector_size, expand->mrec); in can_expand()
3485 if ((got != vol->sector_size) in can_expand()
3486 || memcmp(expand->bootsector,expand->mrec,vol->sector_size)) { in can_expand()
3550 (int)(vol->cluster_size/vol->sector_size)); in can_expand()
3552 (int)(vol->cluster_size/vol->sector_size)); in can_expand()
[all …]
Dntfscluster.c337 a = vol->sector_size; in info()
Dntfsclone.c772 bytes_per_sector = vol->sector_size;
1523 bytes_per_sector = image->ni->vol->sector_size;
1604 bytes_per_sector = image->ni->vol->sector_size;
/third_party/eudev/src/mtd_probe/
Dprobe_smartmedia.c38 int sector_size; in probe_smart_media() local
52 sector_size = info->writesize; in probe_smart_media()
56 if (sector_size != SM_SECTOR_SIZE && sector_size != SM_SMALL_PAGE) in probe_smart_media()
73 offset += sector_size) { in probe_smart_media()
/third_party/f2fs-tools/lib/
Dlibf2fs.c681 c.devices[i].sector_size = DEFAULT_SECTOR_SIZE; in f2fs_init_configuration()
878 uint32_t sector_size; in get_device_info() local
951 dev->total_sectors = c.device_size / dev->sector_size; in get_device_info()
953 dev->total_sectors = stat_buf->st_size / dev->sector_size; in get_device_info()
956 if (ioctl(fd, BLKSSZGET, &sector_size) < 0) in get_device_info()
958 else if (dev->sector_size < sector_size) in get_device_info()
959 dev->sector_size = sector_size; in get_device_info()
975 dev->total_sectors /= dev->sector_size; in get_device_info()
1010 if (!c.sector_size) { in get_device_info()
1011 c.sector_size = dev->sector_size; in get_device_info()
[all …]
Dlibf2fs_zoned.c184 sectors = (sectors << 9) / c.sector_size; in f2fs_get_zone_blocks()
232 u_int64_t total_sectors = (dev->total_sectors * c.sector_size) in f2fs_report_zones()
305 total_sectors = (dev->total_sectors * c.sector_size) >> 9; in f2fs_check_zones()
380 (unsigned long long)(sector << 9) / c.sector_size, in f2fs_check_zones()
450 total_sectors = (dev->total_sectors * c.sector_size) >> 9; in f2fs_reset_zones()
/third_party/ntfs-3g/libntfs-3g/
Dbootsect.c202 vol->sector_size = le16_to_cpu(bs->bpb.bytes_per_sector); in ntfs_boot_sector_parse()
203 vol->sector_size_bits = ffs(vol->sector_size) - 1; in ntfs_boot_sector_parse()
204 ntfs_log_debug("SectorSize = 0x%x\n", vol->sector_size); in ntfs_boot_sector_parse()
252 vol->cluster_size = sectors_per_cluster * vol->sector_size; in ntfs_boot_sector_parse()
Ddevice.c586 int sector_size; in ntfs_device_size_get() local
588 sector_size = ntfs_device_sector_size_get(dev); in ntfs_device_size_get()
589 if (sector_size >= 0 && dev->d_ops->ioctl(dev, in ntfs_device_size_get()
595 return blocks * sector_size / block_size; in ntfs_device_size_get()
/third_party/gstreamer/gstplugins_bad/ext/mplex/
Dgstmplexjob.cc199 g_value_set_int (value, sector_size); in getProperty()
238 sector_size = g_value_get_int (value); in setProperty()
/third_party/e2fsprogs/lib/blkid/
Dprobe.c524 __u16 sector_size, dir_entries, reserved; in probe_fat() local
530 sector_size = tmp[0] + (tmp[1] << 8); in probe_fat()
531 if (sector_size != 0x200 && sector_size != 0x400 && in probe_fat()
532 sector_size != 0x800 && sector_size != 0x1000) in probe_fat()
549 (sector_size-1)) / sector_size; in probe_fat()
561 root_start = (reserved + fat_size) * sector_size; in probe_fat()
579 buf_size = vs->vs_cluster_size * sector_size; in probe_fat()
590 sector_size; in probe_fat()
606 (unsigned int) sector_size) + in probe_fat()
Dprobe.h656 __u32 sector_size; member
/third_party/f2fs-tools/mkfs/
Df2fs_format_utils.c55 u_int64_t bytes = dev->total_sectors * dev->sector_size; in trim_device()
Df2fs_format.c218 log_sectorsize = log_base_2(c.sector_size); in f2fs_prepare_super_block()
276 c.sector_size - zone_align_start_offset) / in f2fs_prepare_super_block()
449 c.sector_size < zone_align_start_offset) || in f2fs_prepare_super_block()
/third_party/exfatprogs/include/
Dlibexfat.h62 unsigned int sector_size; member
/third_party/f2fs-tools/fsck/
Dresize.c36 set_sb(segment_count, (c.target_sectors * c.sector_size - in get_new_sb()
709 if ((c.target_sectors * c.sector_size >> in f2fs_resize()
717 else if ((c.target_sectors * c.sector_size >> in f2fs_resize()
/third_party/exfatprogs/dump/
Ddump.c111 bd->sector_size = 1 << pbsx->sect_size_bits; in exfat_show_ondisk_all_info()
/third_party/ntfs-3g/include/ntfs-3g/
Dvolume.h196 u16 sector_size; /* Byte size of a sector. */ member
/third_party/mesa3d/src/broadcom/compiler/
Dvir.c729 int sector_size = V3D_CHANNELS * sizeof(uint32_t) * 8; in v3d_vs_set_prog_data() local
730 int vpm_size_in_sectors = c->devinfo->vpm_size / sector_size; in v3d_vs_set_prog_data()
1996 const uint32_t sector_size = V3D_CHANNELS * sizeof(uint32_t) * 8; in compute_vpm_size_in_sectors() local
1997 return devinfo->vpm_size / sector_size; in compute_vpm_size_in_sectors()
/third_party/f2fs-tools/include/
Df2fs_fs.h324 u_int32_t sector_size; member
363 u_int32_t sector_size; member

12