/haiku-fatelf/src/tools/fixup_tos_boot_checksum/ |
H A D | fixup_tos_boot_checksum.c | 6 uint8_t sector[512]; variable 12 uint8_t *p = sector; 17 if (read(fd, sector, 512-2) < 512-2) { 33 write(fd, §or[512-2], 2);
|
/haiku-fatelf/src/tests/add-ons/kernel/file_systems/dos/r5/ |
H A D | iter.c | 20 static int _validate_cs_(nspace *vol, uint32 cluster, uint32 sector) argument 22 if (sector < 0) return -1; 25 if (sector >= vol->root_sectors) 30 if (sector >= vol->sectors_per_cluster) return -1; 40 ASSERT(_validate_cs_(csi->vol, csi->cluster, csi->sector) == 0); 41 if (_validate_cs_(csi->vol, csi->cluster, csi->sector) != 0) 45 return csi->vol->root_start + csi->sector; 49 csi->sector; 52 int init_csi(nspace *vol, uint32 cluster, uint32 sector, struct csi *csi) argument 55 if ((ret = _validate_cs_(vol,cluster,sector)) ! [all...] |
H A D | fat.c | 27 static status_t mirror_fats(nspace *vol, uint32 sector, uint8 *buffer) argument 34 sector -= vol->active_fat * vol->sectors_per_fat; 39 cached_write(vol->fd, sector + i*vol->sectors_per_fat, buffer, 1, vol->bytes_per_sector); 85 uint32 sector; local 118 sector = vol->reserved_sectors + vol->active_fat * vol->sectors_per_fat + 122 if ((block1 = (uint8 *)get_block(vol->fd, sector, vol->bytes_per_sector)) == NULL) { 123 DPRINTF(0, ("_fat_ioctl_: error reading fat (sector %lx)\n", sector)); 133 if ((block2 = (uint8 *)get_block(vol->fd, ++sector, vol->bytes_per_sector)) == NULL) { 134 DPRINTF(0, ("_fat_ioctl_: error reading fat (sector 558 uint32 sector, offset, previous_entry, i, val; local [all...] |
H A D | iter.h | 10 /* csi keeps track of current cluster and sector info */ 15 uint32 sector; member in struct:csi 18 int init_csi(struct _nspace *vol, uint32 cluster, uint32 sector, struct csi *csi);
|
H A D | file.c | 394 // read in partial first sector if necessary 398 dprintf("dosfs_read: error reading cluster %lx, sector %lx\n", iter.cluster, iter.sector); 433 // read part of remaining sector if needed 439 dprintf("dosfs_read: error reading cluster %lx, sector %lx\n", iter.cluster, iter.sector); 579 // write partial first sector if necessary 584 dprintf("dosfs_write: error writing cluster %lx, sector %lx\n", iter.cluster, iter.sector); 620 // write part of remaining sector i [all...] |
H A D | dir.c | 83 DPRINTF(2, ("_next_dirent_: %lx/%lx/%lx\n", iter->csi.cluster, iter->csi.sector, iter->current_index));
|
/haiku-fatelf/src/add-ons/kernel/file_systems/fat/ |
H A D | iter.c | 24 _validate_cs_(nspace *vol, uint32 cluster, uint32 sector) argument 26 if (sector < 0) return -1; 29 if (sector >= vol->root_sectors) 34 if (sector >= vol->sectors_per_cluster) return -1; 46 ASSERT(_validate_cs_(csi->vol, csi->cluster, csi->sector) == 0); 47 if (_validate_cs_(csi->vol, csi->cluster, csi->sector) != 0) 51 return csi->vol->root_start + csi->sector; 55 csi->sector; 60 init_csi(nspace *vol, uint32 cluster, uint32 sector, struct csi *csi) argument 63 if ((ret = _validate_cs_(vol,cluster,sector)) ! [all...] |
H A D | fat.c | 29 mirror_fats(nspace *vol, uint32 sector, uint8 *buffer) argument 36 sector -= vol->active_fat * vol->sectors_per_fat; 43 blockData = block_cache_get_writable_etc(vol->fBlockCache, sector 46 block_cache_put(vol->fBlockCache, sector + i * vol->sectors_per_fat); 100 uint32 sector; local 135 sector = vol->reserved_sectors + vol->active_fat * vol->sectors_per_fat + 140 block1 = (uint8 *)block_cache_get(vol->fBlockCache, sector); 142 block1 = (uint8 *)block_cache_get_writable(vol->fBlockCache, sector, 147 DPRINTF(0, ("_fat_ioctl_: error reading fat (sector %ld)\n", sector)); [all...] |
H A D | iter.h | 14 /* csi keeps track of current cluster and sector info */ 18 uint32 sector; member in struct:csi 22 int init_csi(struct _nspace *vol, uint32 cluster, uint32 sector, struct csi *csi);
|
H A D | file.c | 405 // read in partial first sector if necessary 409 dprintf("dosfs_read: error reading cluster %lx, sector %lx\n", iter.cluster, iter.sector); 444 // read part of remaining sector if needed 450 dprintf("dosfs_read: error reading cluster %lx, sector %lx\n", iter.cluster, iter.sector); 595 // write partial first sector if necessary 600 dprintf("dosfs_write: error writing cluster %lx, sector %lx\n", iter.cluster, iter.sector); 636 // write part of remaining sector i [all...] |
H A D | dir.c | 82 iter->csi.sector, iter->current_index));
|
/haiku-fatelf/src/add-ons/kernel/partitioning_systems/amiga/ |
H A D | amiga_rdb.cpp | 109 for (int32 sector = 0; sector < RDB_LOCATION_LIMIT; sector++) { 111 ssize_t bytesRead = read_pos(fd, sector * 512, buffer, sizeof(buffer));
|
/haiku-fatelf/src/bin/writembr/ |
H A D | mbr.S | 24 %assign SECSIZE 0x200 ; Size of a single disk sector 51 ; 5:0 - sector 52 ; al - sector count 117 .sector resb 1 136 .sector nstruc quadword 218 mov [address_packet+AddressPacket.sector],eax 280 ;load CHS PBR sector info 282 mov cx, [si+2] ; cl 5:0 = sector 7:0 (1 - 63) 287 and al, 0x3F ; extract sector 288 test al, al; ; if (sector [all...] |
/haiku-fatelf/src/bin/gdb/bfd/ |
H A D | ppcboot.c | 44 bfd_byte sector; member in struct:ppcboot_location 449 && !tdata->header.partition[i].partition_begin.sector 453 && !tdata->header.partition[i].partition_end.sector 461 tdata->header.partition[i].partition_begin.sector, 467 tdata->header.partition[i].partition_end.sector, 470 fprintf (f, _("Partition[%d] sector = 0x%.8lx (%ld)\n"), i, sector_begin, sector_begin);
|
/haiku-fatelf/src/add-ons/kernel/drivers/disk/floppy/pc_floppy/ |
H A D | floppy.h | 148 uint8 sector; member in struct:__anon1623 161 uint8 sector; member in struct:__anon1624
|
H A D | floppy_ctrl.c | 647 cmd->sector = lba % flp->bgeom.sectors_per_track + 1; 682 dprintf(FLO "pio_read_sector(%d, %d={%d,%d,%d}, %d)\n", flp->drive_num, lba, cmd.cylinder, cmd.head, cmd.sector, num_sectors); 790 cmd.sector = 1; 791 dprintf(FLO "pio_read_track(%d, %d={%d,%d,%d}) try %d\n", flp->drive_num, lba, cmd.cylinder, cmd.head, cmd.sector, tries); 877 /* XXX: TODO: in case of IO error, retry by single sector */
|
/haiku-fatelf/src/apps/bootmanager/ |
H A D | bootman.S | 63 ; sector (1 - 17) 64 ; al - sector count 246 .offset nstruc quadword ; LBA of start start sector 524 mov di, bootSectorDAP+AddressPacket.offset ; Copy start sector 531 mov ah, EXTENDED_READ ; Now read start sector from HD 535 jc printAndHalt ; Failed to read sector 582 mov si, list ; Search address of start sector 674 ; quadword start sector
|
/haiku-fatelf/src/bin/mkdos/ |
H A D | mkdos.cpp | 42 void CreateVolumeLabel(void *sector, const char *label); 177 printf("bios geometry: %ld heads, %ld cylinders, %ld sectors/track, %ld bytes/sector\n", 181 printf("device geometry: %ld heads, %ld cylinders, %ld sectors/track, %ld bytes/sector\n", 315 fprintf(stderr,"Error: failed to determine sector per cluster value, partition too large for %d bit fat\n",fatbits); 476 fprintf(stderr,"Error: write error near sector %Ld\n",pos / 512); 485 //write boot sector 489 fprintf(stderr,"Error: write error at sector %d\n", BOOT_SECTOR_NUM); 497 fprintf(stderr,"Error: write error at sector %d\n", BACKUP_SECTOR_NUM); 503 //write first fat sector 504 printf("Writing first FAT sector\ 612 CreateVolumeLabel(void *sector, const char *label) argument [all...] |
/haiku-fatelf/src/system/boot/platform/bios_ia32/ |
H A D | stage1.S | 61 ; sector (1 - 17)
62 ; al - sector count
413 inc dl ; sector numbering starts with 1
415 push dx ; save sector
430 pop dx ; restore sector
431 or cl, dl ; cl: 9:8 cylinder, 5:0 sector
|
H A D | devices.cpp | 642 uint32 sector = pos % fParameters.sectors_per_track + 1; local 662 regs.ecx = sector | ((cylinder >> 2) & 0xc0) | ((cylinder & 0xff) << 8);
|