/system/core/mkbootimg/ |
D | mkbootimg.c | 97 boot_img_hdr hdr; in main() local 122 memset(&hdr, 0, sizeof(hdr)); in main() 165 hdr.page_size = pagesize; in main() 167 hdr.kernel_addr = base + kernel_offset; in main() 168 hdr.ramdisk_addr = base + ramdisk_offset; in main() 169 hdr.second_addr = base + second_offset; in main() 170 hdr.tags_addr = base + tags_offset; in main() 192 strcpy((char *) hdr.name, board); in main() 194 memcpy(hdr.magic, BOOT_MAGIC, BOOT_MAGIC_SIZE); in main() 203 strncpy((char *)hdr.cmdline, cmdline, BOOT_ARGS_SIZE - 1); in main() [all …]
|
/system/core/fastboot/ |
D | bootimg.c | 50 boot_img_hdr *hdr; in mkbootimg() local 60 hdr = calloc(*bootimg_size, 1); in mkbootimg() 62 if(hdr == 0) { in mkbootimg() 63 return hdr; in mkbootimg() 66 memcpy(hdr->magic, BOOT_MAGIC, BOOT_MAGIC_SIZE); in mkbootimg() 68 hdr->kernel_size = kernel_size; in mkbootimg() 69 hdr->ramdisk_size = ramdisk_size; in mkbootimg() 70 hdr->second_size = second_size; in mkbootimg() 72 hdr->kernel_addr = base + kernel_offset; in mkbootimg() 73 hdr->ramdisk_addr = base + ramdisk_offset; in mkbootimg() [all …]
|
D | usb_linux.c | 103 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)_desc; in check() local 106 if(hdr->bLength < size) return -1; in check() 107 if(hdr->bLength > len) return -1; in check() 108 if(hdr->bDescriptorType != type) return -1; in check() 182 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)ptr; in filter_usb_device() local 183 if (check(hdr, len, USB_DT_INTERFACE, USB_DT_INTERFACE_SIZE) == 0) in filter_usb_device() 185 len -= hdr->bLength; in filter_usb_device() 186 ptr += hdr->bLength; in filter_usb_device() 204 struct usb_descriptor_header *hdr = (struct usb_descriptor_header *)ptr; in filter_usb_device() local 205 if (check(hdr, len, USB_DT_ENDPOINT, USB_DT_ENDPOINT_SIZE) == 0) in filter_usb_device() [all …]
|
/system/extras/sound/ |
D | playwav.c | 153 struct wav_header hdr; in wav_play() local 161 if (read(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) { in wav_play() 166 hdr.num_channels, hdr.sample_rate, hdr.bits_per_sample, in wav_play() 167 hdr.audio_format == FORMAT_PCM ? "PCM" : "unknown"); in wav_play() 169 if ((hdr.riff_id != ID_RIFF) || in wav_play() 170 (hdr.riff_fmt != ID_WAVE) || in wav_play() 171 (hdr.fmt_id != ID_FMT)) { in wav_play() 175 if ((hdr.audio_format != FORMAT_PCM) || in wav_play() 176 (hdr.fmt_sz != 16)) { in wav_play() 180 if (hdr.bits_per_sample != 16) { in wav_play() [all …]
|
/system/extras/ext4_utils/ |
D | extent.c | 98 struct ext4_extent_header *hdr = in do_inode_allocate_extents() local 100 hdr->eh_magic = EXT4_EXT_MAGIC; in do_inode_allocate_extents() 101 hdr->eh_entries = allocation_len; in do_inode_allocate_extents() 102 hdr->eh_max = 3; in do_inode_allocate_extents() 103 hdr->eh_generation = 0; in do_inode_allocate_extents() 104 hdr->eh_depth = 0; in do_inode_allocate_extents() 108 struct ext4_extent_header *hdr = in do_inode_allocate_extents() local 110 hdr->eh_magic = EXT4_EXT_MAGIC; in do_inode_allocate_extents() 111 hdr->eh_entries = 1; in do_inode_allocate_extents() 112 hdr->eh_max = 3; in do_inode_allocate_extents() [all …]
|
D | contents.c | 411 struct ext4_xattr_ibody_header *hdr = (struct ext4_xattr_ibody_header *) (inode + 1); in xattr_addto_inode() local 412 struct ext4_xattr_entry *first = (struct ext4_xattr_entry *) (hdr + 1); in xattr_addto_inode() 421 hdr->h_magic = cpu_to_le32(EXT4_XATTR_MAGIC); in xattr_addto_inode()
|
/system/core/sdcard/ |
D | sdcard.c | 517 static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) { in get_caller_has_rw_locked() argument 523 appid_t appid = multiuser_get_app_id(hdr->uid); in get_caller_has_rw_locked() 531 const struct fuse_in_header *hdr, const struct node* parent_node, in check_caller_access_to_name() argument 549 if (hdr->uid == 0) { in check_caller_access_to_name() 556 if (parent_node && hdr->uid == parent_node->uid) { in check_caller_access_to_name() 568 const struct fuse_in_header *hdr, const struct node* node, int mode, bool has_rw) { in check_caller_access_to_node() argument 569 return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw); in check_caller_access_to_node() 748 struct fuse_out_header hdr; in fuse_status() local 749 hdr.len = sizeof(hdr); in fuse_status() 750 hdr.error = err; in fuse_status() [all …]
|
/system/core/gpttool/ |
D | gpttool.c | 119 struct efi_header *hdr = &ptbl->header; in add_ptn() local 128 if (last > hdr->last_lba) { in add_ptn() 254 struct efi_header *hdr = &ptbl.header; in main() local 305 memcpy(hdr->magic, EFI_MAGIC, sizeof(hdr->magic)); in main() 306 hdr->version = EFI_VERSION; in main() 307 hdr->header_sz = sizeof(struct efi_header); in main() 308 hdr->header_lba = 1; in main() 309 hdr->backup_lba = sz - 1; in main() 310 hdr->first_lba = 34; in main() 311 hdr->last_lba = sz - 1; in main() [all …]
|
/system/core/fastbootd/ |
D | commands.c | 64 struct boot_img_hdr *hdr; in cmd_boot() local 95 hdr = (struct boot_img_hdr *) ptr; in cmd_boot() 102 if ((size_t) sz < sizeof(*hdr)) { in cmd_boot() 107 kernel_actual = ROUND_TO_PAGE(hdr->kernel_size, hdr->page_size); in cmd_boot() 108 ramdisk_actual = ROUND_TO_PAGE(hdr->ramdisk_size, hdr->page_size); in cmd_boot() 109 second_actual = ROUND_TO_PAGE(hdr->second_size, hdr->page_size); in cmd_boot() 111 new_atags = (char *) create_atags((unsigned *) atags_ptr, atags_sz, hdr, &new_atags_sz); in cmd_boot() 122 if ((int) (hdr->page_size + kernel_actual + ramdisk_actual) < sz) { in cmd_boot() 127 kernel_ptr = (void *)((uintptr_t) ptr + hdr->page_size); in cmd_boot() 133 rv = prepare_boot_linux(hdr->kernel_addr, kernel_ptr, kernel_actual, in cmd_boot() [all …]
|
D | bootimg.h | 96 void bootimg_set_cmdline(boot_img_hdr *hdr, const char *cmdline);
|
/system/core/fastbootd/commands/ |
D | boot.c | 148 unsigned *create_atags(unsigned *atags_position, int atag_size, const struct boot_img_hdr *hdr, int… in create_atags() argument 152 hdr->page_size)); in create_atags() 181 if (hdr->ramdisk_size > 0) { in create_atags() 190 .start = hdr->ramdisk_addr, in create_atags() 191 .size = hdr->ramdisk_size in create_atags() 201 cmdl_length = strnlen((char *) hdr->cmdline, BOOT_ARGS_SIZE - 1); in create_atags() 213 (char *) hdr->cmdline, cmdl_length); in create_atags()
|
/system/core/logd/ |
D | LogListener.cpp | 44 struct msghdr hdr = { in onDataAvailable() local 56 ssize_t n = recvmsg(socket, &hdr, 0); in onDataAvailable() 63 struct cmsghdr *cmsg = CMSG_FIRSTHDR(&hdr); in onDataAvailable() 70 cmsg = CMSG_NXTHDR(&hdr, cmsg); in onDataAvailable()
|
/system/core/libcutils/ |
D | uevent.c | 53 struct msghdr hdr = { in uevent_kernel_multicast_uid_recv() local 64 ssize_t n = recvmsg(socket, &hdr, 0); in uevent_kernel_multicast_uid_recv() 69 struct cmsghdr *cmsg = CMSG_FIRSTHDR(&hdr); in uevent_kernel_multicast_uid_recv()
|