Changeset acdb5bac in mainline
- Timestamp:
- 2013-05-20T18:42:25Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6e8ed225
- Parents:
- 44ecf89
- Location:
- uspace
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ahci/ahci.c
r44ecf89 racdb5bac 242 242 } 243 243 244 bzero(buf, sata->block_size);244 memset(buf, 0, sata->block_size); 245 245 246 246 fibril_mutex_lock(&sata->lock); … … 444 444 } 445 445 446 bzero(idata, SATA_IDENTIFY_DEVICE_BUFFER_LENGTH);446 memset(idata, 0, SATA_IDENTIFY_DEVICE_BUFFER_LENGTH); 447 447 448 448 fibril_mutex_lock(&sata->lock); … … 637 637 } 638 638 639 bzero(idata, SATA_SET_FEATURE_BUFFER_LENGTH);639 memset(idata, 0, SATA_SET_FEATURE_BUFFER_LENGTH); 640 640 641 641 fibril_mutex_lock(&sata->lock); … … 954 954 goto error_retfis; 955 955 956 bzero(virt_fb, size);956 memset(virt_fb, 0, size); 957 957 sata->port->pxfbu = HI(phys); 958 958 sata->port->pxfb = LO(phys); … … 964 964 goto error_cmd; 965 965 966 bzero(virt_cmd, size);966 memset(virt_cmd, 0, size); 967 967 sata->port->pxclbu = HI(phys); 968 968 sata->port->pxclb = LO(phys); … … 975 975 goto error_table; 976 976 977 bzero(virt_table, size);977 memset(virt_table, 0, size); 978 978 sata->cmd_header->cmdtableu = HI(phys); 979 979 sata->cmd_header->cmdtable = LO(phys); … … 1287 1287 { 1288 1288 uint8_t model[40]; 1289 bzero(model, 40);1289 memset(model, 0, 40); 1290 1290 1291 1291 for (unsigned int i = 0; i < 20; i++) { -
uspace/drv/bus/usb/ohci/hc.c
r44ecf89 racdb5bac 602 602 assert(instance); 603 603 604 bzero(&instance->rh, sizeof(instance->rh));604 memset(&instance->rh, 0, sizeof(instance->rh)); 605 605 /* Init queues */ 606 606 const int ret = hc_init_transfer_lists(instance); -
uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
r44ecf89 racdb5bac 53 53 { 54 54 assert(instance); 55 bzero(instance, sizeof(ed_t));55 memset(instance, 0, sizeof(ed_t)); 56 56 57 57 if (ep == NULL) { -
uspace/drv/bus/usb/ohci/hw_struct/hcca.h
r44ecf89 racdb5bac 68 68 hcca_t *hcca = memalign(256, sizeof(hcca_t)); 69 69 if (hcca) 70 bzero(hcca, sizeof(hcca_t));70 memset(hcca, 0, sizeof(hcca_t)); 71 71 return hcca; 72 72 } -
uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c
r44ecf89 racdb5bac 58 58 { 59 59 assert(instance); 60 bzero(instance, sizeof(td_t));60 memset(instance, 0, sizeof(td_t)); 61 61 /* Set PID and Error code */ 62 62 OHCI_MEM32_WR(instance->status, -
uspace/drv/bus/usb/uhci/uhci_batch.c
r44ecf89 racdb5bac 112 112 CHECK_NULL_DISPOSE_RETURN(uhci_batch->device_buffer, 113 113 "Failed to allocate UHCI buffer.\n"); 114 bzero(uhci_batch->device_buffer, total_size);114 memset(uhci_batch->device_buffer, 0, total_size); 115 115 116 116 uhci_batch->tds = uhci_batch->device_buffer; -
uspace/drv/bus/usb/usbmast/scsi_ms.c
r44ecf89 racdb5bac 167 167 */ 168 168 169 bzero(inq_res, sizeof(*inq_res));169 memset(inq_res, 0, sizeof(*inq_res)); 170 170 171 171 inq_res->device_type = BIT_RANGE_EXTRACT(uint8_t, -
uspace/drv/char/i8042/buffer.h
r44ecf89 racdb5bac 76 76 buffer->read_head = buffer->buffer; 77 77 buffer->write_head = buffer->buffer; 78 bzero(buffer->buffer, size);78 memset(buffer->buffer, 0, size); 79 79 } 80 80 -
uspace/drv/nic/e1k/e1k.c
r44ecf89 racdb5bac 293 293 assert(info); 294 294 295 bzero(info, sizeof(nic_device_info_t));295 memset(info, 0, sizeof(nic_device_info_t)); 296 296 297 297 info->vendor_id = 0x8086; … … 1581 1581 goto error; 1582 1582 1583 bzero(e1000->tx_ring_virt,1583 memset(e1000->tx_ring_virt, 0, 1584 1584 E1000_TX_FRAME_COUNT * sizeof(e1000_tx_descriptor_t)); 1585 1585 … … 1872 1872 } 1873 1873 1874 bzero(e1000, sizeof(e1000_t));1874 memset(e1000, 0, sizeof(e1000_t)); 1875 1875 1876 1876 nic_set_specific(nic, e1000); -
uspace/drv/nic/ne2k/dp8390.c
r44ecf89 racdb5bac 446 446 return NULL; 447 447 448 bzero(frame->data, length);448 memset(frame->data, 0, length); 449 449 uint8_t last = page + length / DP_PAGE; 450 450 -
uspace/drv/nic/rtl8139/driver.c
r44ecf89 racdb5bac 1020 1020 } 1021 1021 1022 bzero(rtl8139, sizeof(rtl8139_t));1022 memset(rtl8139, 0, sizeof(rtl8139_t)); 1023 1023 1024 1024 rtl8139->nic_data = nic_data; -
uspace/lib/c/generic/device/hw_res_parsed.c
r44ecf89 racdb5bac 188 188 hw_resource_list_t hw_resources; 189 189 hw_res_list_parsed_clean(hw_res_parsed); 190 bzero(&hw_resources, sizeof(hw_resource_list_t));190 memset(&hw_resources, 0, sizeof(hw_resource_list_t)); 191 191 192 192 int rc = hw_res_get_resource_list(sess, &hw_resources); -
uspace/lib/c/generic/net/inet.c
r44ecf89 racdb5bac 144 144 /* Erase if no address */ 145 145 if (!address) { 146 bzero(data, count);146 memset(data, 0, count); 147 147 return ENOENT; 148 148 } … … 181 181 } else { 182 182 /* Erase the rest of the address */ 183 bzero(data + index, count - index);183 memset(data + index, 0, count - index); 184 184 return EOK; 185 185 } -
uspace/lib/c/generic/net/socket_client.c
r44ecf89 racdb5bac 446 446 return ENOMEM; 447 447 448 bzero(socket, sizeof(*socket));448 memset(socket, 0, sizeof(*socket)); 449 449 fibril_rwlock_write_lock(&socket_globals.lock); 450 450 … … 657 657 return ENOMEM; 658 658 } 659 bzero(new_socket, sizeof(*new_socket));659 memset(new_socket, 0, sizeof(*new_socket)); 660 660 socket_id = socket_generate_new_id(); 661 661 if (socket_id <= 0) { -
uspace/lib/c/include/device/hw_res_parsed.h
r44ecf89 racdb5bac 127 127 free(list->dma_channels.channels); 128 128 129 bzero(list, sizeof(hw_res_list_parsed_t));129 memset(list, 0, sizeof(hw_res_list_parsed_t)); 130 130 } 131 131 … … 136 136 static inline void hw_res_list_parsed_init(hw_res_list_parsed_t *list) 137 137 { 138 bzero(list, sizeof(hw_res_list_parsed_t));138 memset(list, 0, sizeof(hw_res_list_parsed_t)); 139 139 } 140 140 -
uspace/lib/c/include/mem.h
r44ecf89 racdb5bac 38 38 #include <sys/types.h> 39 39 40 #define bzero(ptr, len) memset((ptr), 0, (len))41 42 40 extern void *memset(void *, int, size_t) 43 41 __attribute__ ((optimize("-fno-tree-loop-distribute-patterns"))); -
uspace/lib/drv/generic/remote_nic.c
r44ecf89 racdb5bac 104 104 105 105 nic_address_t address; 106 bzero(&address, sizeof(nic_address_t));106 memset(&address, 0, sizeof(nic_address_t)); 107 107 108 108 int rc = nic_iface->get_address(dev, &address); … … 173 173 174 174 nic_device_stats_t stats; 175 bzero(&stats, sizeof(nic_device_stats_t));175 memset(&stats, 0, sizeof(nic_device_stats_t)); 176 176 177 177 int rc = nic_iface->get_stats(dev, &stats); … … 208 208 209 209 nic_device_info_t info; 210 bzero(&info, sizeof(nic_device_info_t));210 memset(&info, 0, sizeof(nic_device_info_t)); 211 211 212 212 int rc = nic_iface->get_device_info(dev, &info); … … 399 399 } 400 400 401 bzero(address_list, max_count * sizeof(nic_address_t));401 memset(address_list, 0, max_count * sizeof(nic_address_t)); 402 402 nic_unicast_mode_t mode = NIC_UNICAST_DEFAULT; 403 403 size_t address_count = 0; … … 503 503 } 504 504 505 bzero(address_list, max_count * sizeof(nic_address_t));505 memset(address_list, 0, max_count * sizeof(nic_address_t)); 506 506 nic_multicast_mode_t mode = NIC_MULTICAST_BLOCKED; 507 507 size_t address_count = 0; … … 667 667 } 668 668 669 bzero(address_list, max_count * sizeof(nic_address_t));669 memset(address_list, 0, max_count * sizeof(nic_address_t)); 670 670 size_t address_count = 0; 671 671 … … 759 759 760 760 nic_vlan_mask_t vlan_mask; 761 bzero(&vlan_mask, sizeof(nic_vlan_mask_t));761 memset(&vlan_mask, 0, sizeof(nic_vlan_mask_t)); 762 762 763 763 int rc = nic_iface->vlan_get_mask(dev, &vlan_mask); … … 932 932 } 933 933 934 bzero(data, max_length);934 memset(data, 0, max_length); 935 935 936 936 int rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length, … … 982 982 } 983 983 984 bzero(id_list, max_count * sizeof (nic_wv_id_t));984 memset(id_list, 0, max_count * sizeof (nic_wv_id_t)); 985 985 986 986 int rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list, … … 1047 1047 } 1048 1048 1049 bzero(data, max_length);1049 memset(data, 0, max_length); 1050 1050 1051 1051 int rc = nic_iface->wol_load_info(dev, &type, max_length, data, -
uspace/lib/nic/src/nic_driver.c
r44ecf89 racdb5bac 682 682 fibril_rwlock_initialize(&nic_data->wv_lock); 683 683 684 bzero(&nic_data->mac, sizeof(nic_address_t));685 bzero(&nic_data->default_mac, sizeof(nic_address_t));686 bzero(&nic_data->stats, sizeof(nic_device_stats_t));684 memset(&nic_data->mac, 0, sizeof(nic_address_t)); 685 memset(&nic_data->default_mac, 0, sizeof(nic_address_t)); 686 memset(&nic_data->stats, 0, sizeof(nic_device_stats_t)); 687 687 688 688 return nic_data; -
uspace/lib/nic/src/nic_impl.c
r44ecf89 racdb5bac 129 129 130 130 fibril_rwlock_write_lock(&nic_data->stats_lock); 131 bzero(&nic_data->stats, sizeof(nic_device_stats_t));131 memset(&nic_data->stats, 0, sizeof(nic_device_stats_t)); 132 132 fibril_rwlock_write_unlock(&nic_data->stats_lock); 133 133 … … 535 535 return ENOMEM; 536 536 } 537 bzero(virtue, sizeof(nic_wol_virtue_t));537 memset(virtue, 0, sizeof(nic_wol_virtue_t)); 538 538 if (length != 0) { 539 539 virtue->data = malloc(length); -
uspace/lib/nic/src/nic_rx_control.c
r44ecf89 racdb5bac 55 55 int nic_rxc_init(nic_rxc_t *rxc) 56 56 { 57 bzero(rxc, sizeof(nic_rxc_t));57 memset(rxc, 0, sizeof(nic_rxc_t)); 58 58 int rc; 59 59 rc = nic_addr_db_init(&rxc->blocked_sources, ETH_ADDR); -
uspace/lib/nic/src/nic_wol_virtues.c
r44ecf89 racdb5bac 73 73 int nic_wol_virtues_init(nic_wol_virtues_t *wvs) 74 74 { 75 bzero(wvs, sizeof(nic_wol_virtues_t));75 memset(wvs, 0, sizeof(nic_wol_virtues_t)); 76 76 wvs->table_operations.hash = nic_wv_hash; 77 77 wvs->table_operations.key_hash = nic_wv_key_hash; -
uspace/lib/posix/source/strings.c
r44ecf89 racdb5bac 155 155 void posix_bzero(void *mem, size_t n) 156 156 { 157 bzero(mem, n);157 memset(mem, 0, n); 158 158 } 159 159 -
uspace/lib/usb/src/debug.c
r44ecf89 racdb5bac 84 84 * Remove previous string. 85 85 */ 86 bzero(buffer_dump[buffer_dump_index], BUFFER_DUMP_LEN);86 memset(buffer_dump[buffer_dump_index], 0, BUFFER_DUMP_LEN); 87 87 88 88 /* Do the actual dump. */
Note:
See TracChangeset
for help on using the changeset viewer.