Home | History | Annotate | Download | only in mksdcard

Lines Matching defs:BYTES_PER_SECTOR

41 #define  BYTES_PER_SECTOR    512
48 #define MAX_DISK_SIZE ((Wide)MAX_SECTORS_PER_DISK * BYTES_PER_SECTOR)
60 static Byte s_boot_sector [ BYTES_PER_SECTOR ]; /* boot sector */
61 static Byte s_fsinfo_sector [ BYTES_PER_SECTOR ]; /* FS Info sector */
62 static Byte s_fat_head [ BYTES_PER_SECTOR ]; /* first FAT sector */
63 static Byte s_zero_sector [ BYTES_PER_SECTOR ]; /* empty sector */
105 disk_size -= RESERVED_SECTORS * BYTES_PER_SECTOR; /* don't count 32 reserved sectors */
106 disk_size /= BYTES_PER_SECTOR; /* disk size in sectors */
117 int sectors_per_disk = (int)(disk_size / BYTES_PER_SECTOR);
128 POKES( boot + 0x0b, BYTES_PER_SECTOR ); /* sector size */
154 POKEB( boot + BYTES_PER_SECTOR-2, 0x55 ); /* boot sector signature */
155 POKEB( boot + BYTES_PER_SECTOR-1, 0xAA );
179 int result = fwrite( sector, 1, BYTES_PER_SECTOR, file ) != BYTES_PER_SECTOR;
181 fprintf(stderr, "Failed to write sector of %d bytes: %s\n", BYTES_PER_SECTOR, strerror(errno));
192 count *= BYTES_PER_SECTOR;
276 sectors_per_disk = disk_size / BYTES_PER_SECTOR;