/external/syslinux/gpxe/src/arch/i386/interface/pcbios/ |
D | int13.c | 67 struct int13_drive *drive; in int13_set_num_drives() local 73 list_for_each_entry ( drive, &drives, list ) { in int13_set_num_drives() 74 if ( num_drives <= ( drive->drive & 0x7f ) ) in int13_set_num_drives() 75 num_drives = ( ( drive->drive & 0x7f ) + 1 ); in int13_set_num_drives() 102 static int int13_reset ( struct int13_drive *drive __unused, in int13_reset() 114 static int int13_get_last_status ( struct int13_drive *drive, in int13_get_last_status() argument 117 return drive->last_status; in int13_get_last_status() 134 static int int13_rw_sectors ( struct int13_drive *drive, in int13_rw_sectors() argument 140 struct block_device *blockdev = drive->blockdev; in int13_rw_sectors() 156 assert ( cylinder < drive->cylinders ); in int13_rw_sectors() [all …]
|
D | iscsiboot.c | 16 struct int13_drive *drive; in iscsiboot() local 24 drive = zalloc ( sizeof ( *drive ) ); in iscsiboot() 25 if ( ! drive ) { in iscsiboot() 41 drive->blockdev = &scsi->blockdev; in iscsiboot() 49 register_int13_drive ( drive ); in iscsiboot() 50 printf ( "Registered as BIOS drive %#02x\n", drive->drive ); in iscsiboot() 51 printf ( "Booting from BIOS drive %#02x\n", drive->drive ); in iscsiboot() 52 rc = int13_boot ( drive->drive ); in iscsiboot() 59 printf ( "Unregistering BIOS drive %#02x\n", drive->drive ); in iscsiboot() 60 unregister_int13_drive ( drive ); in iscsiboot() [all …]
|
D | ib_srpboot.c | 15 struct int13_drive *drive; in ib_srpboot() local 23 drive = zalloc ( sizeof ( *drive ) ); in ib_srpboot() 24 if ( ! drive ) { in ib_srpboot() 40 drive->blockdev = &scsi->blockdev; in ib_srpboot() 47 register_int13_drive ( drive ); in ib_srpboot() 48 printf ( "Registered as BIOS drive %#02x\n", drive->drive ); in ib_srpboot() 49 printf ( "Booting from BIOS drive %#02x\n", drive->drive ); in ib_srpboot() 50 rc = int13_boot ( drive->drive ); in ib_srpboot() 57 printf ( "Unregistering BIOS drive %#02x\n", drive->drive ); in ib_srpboot() 58 unregister_int13_drive ( drive ); in ib_srpboot() [all …]
|
D | aoeboot.c | 17 struct int13_drive *drive; in aoeboot() local 25 drive = zalloc ( sizeof ( *drive ) ); in aoeboot() 26 if ( ! drive ) { in aoeboot() 50 drive->blockdev = &ata->blockdev; in aoeboot() 52 register_int13_drive ( drive ); in aoeboot() 53 printf ( "Registered as BIOS drive %#02x\n", drive->drive ); in aoeboot() 54 printf ( "Booting from BIOS drive %#02x\n", drive->drive ); in aoeboot() 55 rc = int13_boot ( drive->drive ); in aoeboot() 62 printf ( "Unregistering BIOS drive %#02x\n", drive->drive ); in aoeboot() 63 unregister_int13_drive ( drive ); in aoeboot() [all …]
|
/external/vboot_reference/cgpt/ |
D | cgpt_common.c | 54 int CheckValid(const struct drive *drive) { in CheckValid() argument 55 if ((drive->gpt.valid_headers != MASK_BOTH) || in CheckValid() 56 (drive->gpt.valid_entries != MASK_BOTH)) { in CheckValid() 63 int Load(struct drive *drive, uint8_t **buf, in Load() argument 86 if (-1 == lseek(drive->fd, sector * sector_bytes, SEEK_SET)) { in Load() 91 nread = read(drive->fd, *buf, count); in Load() 106 int ReadPMBR(struct drive *drive) { in ReadPMBR() argument 107 if (-1 == lseek(drive->fd, 0, SEEK_SET)) in ReadPMBR() 110 int nread = read(drive->fd, &drive->pmbr, sizeof(struct pmbr)); in ReadPMBR() 117 int WritePMBR(struct drive *drive) { in WritePMBR() argument [all …]
|
D | cgpt_boot.c | 16 struct drive drive; in CgptGetBootPartitionNumber() local 23 if (CGPT_OK != DriveOpen(params->drive_name, &drive, O_RDONLY, in CgptGetBootPartitionNumber() 27 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive.gpt))) { in CgptGetBootPartitionNumber() 34 if (CGPT_OK != ReadPMBR(&drive)) { in CgptGetBootPartitionNumber() 41 GuidToStr(&drive.pmbr.boot_guid, buf, sizeof(buf)); in CgptGetBootPartitionNumber() 43 int numEntries = GetNumberOfEntries(&drive); in CgptGetBootPartitionNumber() 46 GptEntry *entry = GetEntry(&drive.gpt, ANY_VALID, i); in CgptGetBootPartitionNumber() 48 if (GuidEqual(&entry->unique, &drive.pmbr.boot_guid)) { in CgptGetBootPartitionNumber() 60 (void) DriveClose(&drive, 1); in CgptGetBootPartitionNumber() 66 struct drive drive; in CgptBoot() local [all …]
|
D | cgpt_add.c | 68 static int GptSetEntryAttributes(struct drive *drive, in GptSetEntryAttributes() argument 73 entry = GetEntry(&drive->gpt, PRIMARY, index); in GptSetEntryAttributes() 100 static int SetEntryAttributes(struct drive *drive, in SetEntryAttributes() argument 104 SetRaw(drive, PRIMARY, index, params->raw_value); in SetEntryAttributes() 107 SetSuccessful(drive, PRIMARY, index, params->successful); in SetEntryAttributes() 109 SetTries(drive, PRIMARY, index, params->tries); in SetEntryAttributes() 111 SetPriority(drive, PRIMARY, index, params->priority); in SetEntryAttributes() 115 if (IsUnused(drive, PRIMARY, index)) { in SetEntryAttributes() 129 static int CgptCheckAddValidity(struct drive *drive) { in CgptCheckAddValidity() argument 131 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive->gpt))) { in CgptCheckAddValidity() [all …]
|
D | cgpt.h | 45 struct drive { struct 61 int DriveOpen(const char *drive_path, struct drive *drive, int mode, 63 int DriveClose(struct drive *drive, int update_as_needed); 64 int CheckValid(const struct drive *drive); 78 int Load(struct drive *drive, uint8_t **buf, 93 int Save(struct drive *drive, const uint8_t *buf, 121 int ReadPMBR(struct drive *drive); 122 int WritePMBR(struct drive *drive); 149 uint32_t GetNumberOfEntries(const struct drive *drive); 152 void SetPriority(struct drive *drive, int secondary, uint32_t entry_index, [all …]
|
D | cgpt_create.c | 24 static int GptCreate(struct drive *drive, CgptCreateParams *params) { in GptCreate() argument 28 AllocAndClear(&drive->gpt.primary_header, in GptCreate() 29 drive->gpt.sector_bytes * GPT_HEADER_SECTORS); in GptCreate() 30 AllocAndClear(&drive->gpt.secondary_header, in GptCreate() 31 drive->gpt.sector_bytes * GPT_HEADER_SECTORS); in GptCreate() 33 drive->gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 | in GptCreate() 38 GptHeader *h = (GptHeader *)drive->gpt.primary_header; in GptCreate() 43 h->alternate_lba = drive->gpt.gpt_drive_sectors - GPT_HEADER_SECTORS; in GptCreate() 52 if (drive->gpt.flags & GPT_FLAG_EXTERNAL) { in GptCreate() 63 (GPT_PMBR_SECTORS + GPT_HEADER_SECTORS) * drive->gpt.sector_bytes; in GptCreate() [all …]
|
D | cgpt_show.c | 144 void EntriesDetails(struct drive *drive, const int secondary, int raw) { in EntriesDetails() argument 147 for (i = 0; i < GetNumberOfEntries(drive); ++i) { in EntriesDetails() 149 entry = GetEntry(&drive->gpt, secondary, i); in EntriesDetails() 158 static int GptShow(struct drive *drive, CgptShowParams *params) { in GptShow() argument 160 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive->gpt))) { in GptShow() 168 if (params->partition > GetNumberOfEntries(drive)) { in GptShow() 174 GptEntry *entry = GetEntry(&drive->gpt, ANY_VALID, index); in GptShow() 204 printf("%d\n", GetSuccessful(drive, ANY_VALID, index)); in GptShow() 207 printf("%d\n", GetTries(drive, ANY_VALID, index)); in GptShow() 210 printf("%d\n", GetPriority(drive, ANY_VALID, index)); in GptShow() [all …]
|
D | cgpt_legacy.c | 12 struct drive drive; in CgptLegacy() local 18 if (CGPT_OK != DriveOpen(params->drive_name, &drive, O_RDWR, in CgptLegacy() 22 h1 = (GptHeader *)drive.gpt.primary_header; in CgptLegacy() 23 h2 = (GptHeader *)drive.gpt.secondary_header; in CgptLegacy() 27 RepairEntries(&drive.gpt, MASK_SECONDARY); in CgptLegacy() 28 drive.gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 | in CgptLegacy() 33 memset(drive.gpt.primary_entries, 0, drive.gpt.sector_bytes); in CgptLegacy() 34 drive.gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 | in CgptLegacy() 38 UpdateCrc(&drive.gpt); in CgptLegacy() 41 return DriveClose(&drive, 1); in CgptLegacy()
|
D | cgpt_repair.c | 13 struct drive drive; in CgptRepair() local 18 if (CGPT_OK != DriveOpen(params->drive_name, &drive, O_RDWR, in CgptRepair() 22 int gpt_retval = GptSanityCheck(&drive.gpt); in CgptRepair() 27 GptRepair(&drive.gpt); in CgptRepair() 28 if (drive.gpt.modified & GPT_MODIFIED_HEADER1) in CgptRepair() 30 if (drive.gpt.modified & GPT_MODIFIED_ENTRIES1) in CgptRepair() 32 if (drive.gpt.modified & GPT_MODIFIED_ENTRIES2) in CgptRepair() 34 if (drive.gpt.modified & GPT_MODIFIED_HEADER2) in CgptRepair() 37 return DriveClose(&drive, 1); in CgptRepair()
|
D | cgpt_find.c | 42 static int match_content(CgptFindParams *params, struct drive *drive, in match_content() argument 57 drive->fd, in match_content() 110 static int gpt_search(CgptFindParams *params, struct drive *drive, in gpt_search() argument 117 if (GPT_SUCCESS != GptSanityCheck(&drive->gpt)) { in gpt_search() 121 for (i = 0; i < GetNumberOfEntries(drive); ++i) { in gpt_search() 122 entry = GetEntry(&drive->gpt, ANY_VALID, i); in gpt_search() 141 if (found && match_content(params, drive, entry)) { in gpt_search() 155 struct drive drive; in do_search() local 157 if (CGPT_OK != DriveOpen(fileName, &drive, O_RDONLY, params->drive_size)) in do_search() 160 retval = gpt_search(params, &drive, fileName); in do_search() [all …]
|
D | cgpt_prioritize.c | 95 struct drive drive; in CgptPrioritize() local 109 if (CGPT_OK != DriveOpen(params->drive_name, &drive, O_RDWR, in CgptPrioritize() 113 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive.gpt))) { in CgptPrioritize() 119 max_part = GetNumberOfEntries(&drive); in CgptPrioritize() 129 if (!IsKernel(&drive, PRIMARY, index)) { in CgptPrioritize() 138 if (IsKernel(&drive, PRIMARY, i)) in CgptPrioritize() 146 if (!IsKernel(&drive, PRIMARY, i)) in CgptPrioritize() 149 priority = GetPriority(&drive, PRIMARY, i); in CgptPrioritize() 194 SetPriority(&drive, PRIMARY, in CgptPrioritize() 201 UpdateAllEntries(&drive); in CgptPrioritize() [all …]
|
/external/syslinux/memdisk/ |
D | dskprobe.c | 43 static void probe_any(uint8_t func, uint8_t drive, com32sys_t * regs) in probe_any() argument 46 regs->edx.b[0] = drive; /* DL == drive number to probe */ in probe_any() 71 static int probe_int13h_01h(uint8_t drive) in probe_int13h_01h() argument 77 probe_any(0x01, drive, ®s); in probe_int13h_01h() 86 static int probe_int13h_08h(uint8_t drive, com32sys_t * regs) in probe_int13h_08h() argument 92 probe_any(0x08, drive, regs); in probe_int13h_08h() 97 status = probe_int13h_01h(drive); in probe_int13h_08h() 106 static int probe_int13h_15h(uint8_t drive, com32sys_t * regs) in probe_int13h_15h() argument 112 probe_any(0x15, drive, regs); in probe_int13h_15h() 117 status = probe_int13h_01h(drive); in probe_int13h_15h() [all …]
|
/external/syslinux/com32/hdt/ |
D | hdt-cli-disk.c | 102 int drive = strtol(argv[0], (char **)NULL, 16); in main_show_disk() local 104 if (drive < 0x80 || drive >= 0xff) { in main_show_disk() 105 more_printf("Invalid disk: %d.\n", drive); in main_show_disk() 109 int i = drive - 0x80; in main_show_disk() 165 for (int drive = 0x80; drive < 0xff; drive++) { in main_show_disks() local 166 if (hardware->disk_info[drive - 0x80].cbios) { in main_show_disks() 174 sprintf(buf, "0x%x", drive); in main_show_disks() 192 for (int drive = 0x80; drive < 0xff; drive++) { in disks_summary() local
|
D | hdt-dump-disks.c | 77 void show_disk(struct s_hardware *hardware, ZZJSON_CONFIG *conf, ZZJSON **it, int drive) { in show_disk() argument 80 int i = drive - 0x80; in show_disk() 128 for (int drive = 0x80; drive < 0xff; drive++) { in dump_disks() local 129 if (hardware->disk_info[drive - 0x80].cbios) { in dump_disks() 135 show_disk(hardware, config, item, drive); in dump_disks()
|
/external/syslinux/com32/chain/ |
D | chain.c | 69 int drive; in find_by_sig() local 71 for (drive = 0x80; drive < 0x80 + fixed_cnt; drive++) { in find_by_sig() 72 if (disk_get_params(drive, &diskinfo)) in find_by_sig() 81 drive = -1; in find_by_sig() 84 return drive; in find_by_sig() 96 int drive; in find_by_guid() local 98 for (drive = 0x80; drive < 0x80 + fixed_cnt; drive++) { in find_by_guid() 99 if (disk_get_params(drive, &diskinfo)) in find_by_guid() 111 drive = -1; in find_by_guid() 114 return drive; in find_by_guid() [all …]
|
/external/syslinux/dos/ |
D | syslinux.c | 173 void write_device(int drive, const void *buf, size_t nsecs, unsigned int sector) in write_device() argument 178 dprintf("write_device(%d,%p,%u,%u)\n", drive, buf, nsecs, sector); in write_device() 190 : "a" (0x7305), "b" (&dio), "c" (-1), "d" (drive), in write_device() 198 errnum = int26_write_sector(drive, &dio); in write_device() 206 void read_device(int drive, void *buf, size_t nsecs, unsigned int sector) in read_device() argument 211 dprintf("read_device(%d,%p,%u,%u)\n", drive, buf, nsecs, sector); in read_device() 223 : "a" (0x7305), "b" (&dio), "c" (-1), "d" (drive), in read_device() 230 errnum = int25_read_sector(drive, &dio); in read_device() 261 uint32_t get_partition_offset(int drive) in get_partition_offset() argument 272 :"b" (drive), "c" (0x0860), "d" (&dp)); in get_partition_offset() [all …]
|
/external/syslinux/gpxe/src/include/ |
D | fs.h | 9 int ide_probe(int drive); 10 int ide_read(int drive, sector_t sector, void *buffer); 14 int usb_probe(int drive); 15 int usb_read(int drive, sector_t sector, void *buffer);
|
/external/webrtc/webrtc/base/ |
D | pathutils.cc | 228 bool Pathname::GetDrive(char* drive, uint32_t bytes) const { in GetDrive() argument 229 return GetDrive(drive, bytes, folder_); in GetDrive() 233 bool Pathname::GetDrive(char* drive, in GetDrive() argument 241 memcpy(drive, pathname.c_str(), 3); in GetDrive() 242 drive[3] = 0; in GetDrive() 244 return (isalpha(drive[0]) && in GetDrive() 245 drive[1] == ':' && in GetDrive() 246 drive[2] == '\\'); in GetDrive()
|
/external/syslinux/gpxe/src/arch/i386/include/ |
D | int13.h | 76 unsigned int drive; member 228 uint8_t drive; member 288 extern void register_int13_drive ( struct int13_drive *drive ); 289 extern void unregister_int13_drive ( struct int13_drive *drive ); 290 extern int int13_boot ( unsigned int drive );
|
D | bios_disks.h | 22 uint8_t drive; member 31 uint8_t drive; member 41 void ( *fill_drive_name ) ( char *buf, uint8_t drive );
|
/external/syslinux/win/ |
D | syslinux.c | 77 int GetBytesPerSector(HANDLE drive) in GetBytesPerSector() argument 83 if (DeviceIoControl(drive, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, in GetBytesPerSector() 94 HANDLE drive; in FixMBR() local 100 drive = CreateFile(driveName, in FixMBR() 105 if (drive == INVALID_HANDLE_VALUE) { in FixMBR() 114 if (GetBytesPerSector(drive) != SECTOR_SIZE) { in FixMBR() 117 GetBytesPerSector(drive), SECTOR_SIZE); in FixMBR() 122 if (ReadFile(drive, sector, sizeof(sector), &howMany, NULL) == 0) { in FixMBR() 154 SetFilePointer(drive, 0, NULL, FILE_BEGIN); in FixMBR() 156 if (WriteFile(drive, sector, sizeof(sector), &howMany, NULL) == 0) { in FixMBR() [all …]
|
/external/syslinux/com32/modules/ |
D | ifmemdsk.c | 162 static const s_mdi * installation_check(int drive) { in installation_check() argument 169 params.edx.w[0] = drive; in installation_check() 195 int found, drive; in scan_drives() local 198 for (found = drive = 0; drive <= 0xFF; ++drive) { in scan_drives() 199 mdi = installation_check(drive); in scan_drives()
|