Changeset 33b8d024 in mainline for uspace/lib
- Timestamp:
- 2018-01-16T20:38:46Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2467b41
- Parents:
- d39c46e0
- Location:
- uspace/lib
- Files:
-
- 23 edited
-
c/generic/malloc.c (modified) (2 diffs)
-
c/include/ipc/devman.h (modified) (1 diff)
-
c/include/malloc.h (modified) (1 diff)
-
drv/generic/private/driver.h (modified) (2 diffs)
-
drv/generic/remote_audio_mixer.c (modified) (2 diffs)
-
drv/generic/remote_audio_pcm.c (modified) (1 diff)
-
drv/include/audio_mixer_iface.h (modified) (1 diff)
-
drv/include/audio_pcm_iface.h (modified) (1 diff)
-
hound/include/hound/client.h (modified) (1 diff)
-
hound/include/hound/protocol.h (modified) (3 diffs)
-
hound/src/client.c (modified) (4 diffs)
-
hound/src/protocol.c (modified) (3 diffs)
-
nic/include/nic.h (modified) (1 diff)
-
posix/source/stdio/scanf.c (modified) (7 diffs)
-
usbdev/include/usb/dev/alternate_ifaces.h (modified) (1 diff)
-
usbdev/include/usb/dev/device.h (modified) (1 diff)
-
usbdev/include/usb/dev/request.h (modified) (1 diff)
-
usbdev/src/devpoll.c (modified) (1 diff)
-
usbdev/src/recognise.c (modified) (1 diff)
-
usbdev/src/request.c (modified) (1 diff)
-
usbhost/include/usb/host/usb_transfer_batch.h (modified) (1 diff)
-
usbhost/src/usb_transfer_batch.c (modified) (1 diff)
-
usbvirt/include/usbvirt/device.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/malloc.c
rd39c46e0 r33b8d024 874 874 * 875 875 */ 876 void *realloc( const void *addr, const size_t size)876 void *realloc(void * const addr, const size_t size) 877 877 { 878 878 if (size == 0) { … … 988 988 * 989 989 */ 990 void free( const void *addr)990 void free(void * const addr) 991 991 { 992 992 if (addr == NULL) -
uspace/lib/c/include/ipc/devman.h
rd39c46e0 r33b8d024 74 74 /** Id of device model. 75 75 */ 76 c onst char *id;76 char *id; 77 77 /** Relevancy of device-to-driver match. 78 78 * The higher is the product of scores specified for the device by the bus driver and by the leaf driver, -
uspace/lib/c/include/malloc.h
rd39c46e0 r33b8d024 38 38 #include <stddef.h> 39 39 40 extern void *malloc( constsize_t size)40 extern void *malloc(size_t size) 41 41 __attribute__((malloc)); 42 extern void *calloc( const size_t nmemb, constsize_t size)42 extern void *calloc(size_t nmemb, size_t size) 43 43 __attribute__((malloc)); 44 extern void *memalign( const size_t align, constsize_t size)44 extern void *memalign(size_t align, size_t size) 45 45 __attribute__((malloc)); 46 extern void *realloc( const void *addr, constsize_t size)46 extern void *realloc(void *addr, size_t size) 47 47 __attribute__((warn_unused_result)); 48 extern void free( constvoid *addr);48 extern void free(void *addr); 49 49 extern void *heap_check(void); 50 50 -
uspace/lib/drv/generic/private/driver.h
rd39c46e0 r33b8d024 57 57 58 58 /** Device name */ 59 c onst char *name;59 char *name; 60 60 61 61 /** Driver-specific data associated with this device */ … … 84 84 85 85 /** Function name */ 86 c onst char *name;86 char *name; 87 87 88 88 /** List of device ids for driver matching */ -
uspace/lib/drv/generic/remote_audio_mixer.c
rd39c46e0 r33b8d024 94 94 * @return Error code. 95 95 */ 96 errno_t audio_mixer_get_info(async_exch_t *exch, c onst char **name, unsigned *items)96 errno_t audio_mixer_get_info(async_exch_t *exch, char **name, unsigned *items) 97 97 { 98 98 if (!exch) … … 131 131 */ 132 132 errno_t audio_mixer_get_item_info(async_exch_t *exch, unsigned item, 133 c onst char **name, unsigned *levels)133 char **name, unsigned *levels) 134 134 { 135 135 if (!exch) -
uspace/lib/drv/generic/remote_audio_pcm.c
rd39c46e0 r33b8d024 184 184 * @note Caller is responsible for freeing newly allocated memory. 185 185 */ 186 errno_t audio_pcm_get_info_str(audio_pcm_sess_t *sess, c onst char **name)186 errno_t audio_pcm_get_info_str(audio_pcm_sess_t *sess, char **name) 187 187 { 188 188 if (!name) -
uspace/lib/drv/include/audio_mixer_iface.h
rd39c46e0 r33b8d024 43 43 #include "ddf/driver.h" 44 44 45 errno_t audio_mixer_get_info(async_exch_t *, c onst char **, unsigned *);45 errno_t audio_mixer_get_info(async_exch_t *, char **, unsigned *); 46 46 errno_t audio_mixer_get_item_info(async_exch_t *, unsigned, 47 c onst char **, unsigned *);47 char **, unsigned *); 48 48 errno_t audio_mixer_get_item_level(async_exch_t *, unsigned, unsigned *); 49 49 errno_t audio_mixer_set_item_level(async_exch_t *, unsigned, unsigned); -
uspace/lib/drv/include/audio_pcm_iface.h
rd39c46e0 r33b8d024 80 80 void audio_pcm_close(audio_pcm_sess_t *); 81 81 82 errno_t audio_pcm_get_info_str(audio_pcm_sess_t *, c onst char **);82 errno_t audio_pcm_get_info_str(audio_pcm_sess_t *, char **); 83 83 errno_t audio_pcm_test_format(audio_pcm_sess_t *, unsigned *, unsigned *, 84 84 pcm_sample_format_t *); -
uspace/lib/hound/include/hound/client.h
rd39c46e0 r33b8d024 57 57 58 58 errno_t hound_context_get_available_targets(hound_context_t *hound, 59 c onst char ***names, size_t *count);59 char ***names, size_t *count); 60 60 errno_t hound_context_get_connected_targets(hound_context_t *hound, 61 c onst char ***names, size_t *count);61 char ***names, size_t *count); 62 62 63 63 errno_t hound_context_connect_target(hound_context_t *hound, const char* target); -
uspace/lib/hound/include/hound/protocol.h
rd39c46e0 r33b8d024 65 65 errno_t hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id); 66 66 67 errno_t hound_service_get_list(hound_sess_t *sess, c onst char ***ids, size_t *count,67 errno_t hound_service_get_list(hound_sess_t *sess, char ***ids, size_t *count, 68 68 int flags, const char *connection); 69 69 … … 77 77 */ 78 78 static inline errno_t hound_service_get_list_all(hound_sess_t *sess, 79 c onst char ***ids, size_t *count, int flags)79 char ***ids, size_t *count, int flags) 80 80 { 81 81 return hound_service_get_list(sess, ids, count, flags, NULL); … … 106 106 bool (*is_record_context)(void *, hound_context_id_t); 107 107 /** Get string identifiers of specified objects */ 108 errno_t (*get_list)(void *, c onst char ***, size_t *, const char *, int);108 errno_t (*get_list)(void *, char ***, size_t *, const char *, int); 109 109 /** Create connection between source and sink */ 110 110 errno_t (*connect)(void *, const char *, const char *); -
uspace/lib/hound/src/client.c
rd39c46e0 r33b8d024 76 76 hound_sess_t *session; 77 77 /** context name, reported to the daemon */ 78 c onst char *name;78 char *name; 79 79 /** True if the instance is record context */ 80 80 bool record; … … 196 196 */ 197 197 errno_t hound_context_get_available_targets(hound_context_t *hound, 198 c onst char ***names, size_t *count)198 char ***names, size_t *count) 199 199 { 200 200 assert(hound); … … 213 213 */ 214 214 errno_t hound_context_get_connected_targets(hound_context_t *hound, 215 c onst char ***names, size_t *count)215 char ***names, size_t *count) 216 216 { 217 217 assert(hound); … … 237 237 assert(target); 238 238 239 c onst char **tgt = NULL;239 char **tgt = NULL; 240 240 size_t count = 1; 241 241 errno_t ret = EOK; -
uspace/lib/hound/src/protocol.c
rd39c46e0 r33b8d024 173 173 * @retval Error code. 174 174 */ 175 errno_t hound_service_get_list(hound_sess_t *sess, c onst char ***ids, size_t *count,175 errno_t hound_service_get_list(hound_sess_t *sess, char ***ids, size_t *count, 176 176 int flags, const char *connection) 177 177 { … … 206 206 207 207 /* Start receiving names */ 208 c onst char **names = NULL;208 char **names = NULL; 209 209 if (name_count) { 210 210 size_t *sizes = calloc(name_count, sizeof(size_t)); … … 446 446 } 447 447 448 c onst char **list = NULL;448 char **list = NULL; 449 449 const int flags = IPC_GET_ARG1(call); 450 450 size_t count = IPC_GET_ARG2(call); -
uspace/lib/nic/include/nic.h
rd39c46e0 r33b8d024 57 57 nic_wv_id_t id; 58 58 nic_wv_type_t type; 59 constvoid *data;59 void *data; 60 60 size_t length; 61 61 struct nic_wol_virtue *next; -
uspace/lib/posix/source/stdio/scanf.c
rd39c46e0 r33b8d024 625 625 626 626 const char *cur_borrowed = NULL; 627 char *cur_duplicated = NULL; 627 628 const char *cur_limited = NULL; 628 c har *cur_updated = NULL;629 const char *cur_updated = NULL; 629 630 630 631 /* Borrow the cursor. Until it is returned to the provider … … 637 638 * than allowed by width. */ 638 639 if (width != -1) { 639 cur_limited = posix_strndup(cur_borrowed, width); 640 cur_duplicated = posix_strndup(cur_borrowed, width); 641 cur_limited = cur_duplicated; 640 642 } else { 641 643 cur_limited = cur_borrowed; 642 644 } 643 cur_updated = (char *)cur_limited;645 cur_updated = cur_limited; 644 646 645 647 long long sres = 0; … … 648 650 /* Try to convert the integer. */ 649 651 if (int_conv_unsigned) { 650 ures = strtoull(cur_limited, &cur_updated, int_conv_base);652 ures = strtoull(cur_limited, (char **) &cur_updated, int_conv_base); 651 653 } else { 652 sres = strtoll(cur_limited, &cur_updated, int_conv_base);654 sres = strtoll(cur_limited, (char **) &cur_updated, int_conv_base); 653 655 } 654 656 655 657 /* Update the cursor so it can be returned to the provider. */ 656 658 cur_borrowed += cur_updated - cur_limited; 657 if ( width != -1 && cur_limited != NULL) {659 if (cur_duplicated != NULL) { 658 660 /* Deallocate duplicated part of the cursor view. */ 659 free(cur_ limited);661 free(cur_duplicated); 660 662 } 661 663 cur_limited = NULL; 662 664 cur_updated = NULL; 665 cur_duplicated = NULL; 663 666 /* Return the cursor to the provider. Input consistency is again 664 667 * the job of the provider, so we can report errors from … … 797 800 const char *cur_borrowed = NULL; 798 801 const char *cur_limited = NULL; 799 char *cur_updated = NULL; 802 char *cur_duplicated = NULL; 803 const char *cur_updated = NULL; 800 804 801 805 /* Borrow the cursor. Until it is returned to the provider … … 808 812 * than allowed by width. */ 809 813 if (width != -1) { 810 cur_limited = posix_strndup(cur_borrowed, width); 814 cur_duplicated = posix_strndup(cur_borrowed, width); 815 cur_limited = cur_duplicated; 811 816 } else { 812 817 cur_limited = cur_borrowed; 813 818 } 814 cur_updated = (char *)cur_limited;819 cur_updated = cur_limited; 815 820 816 821 float fres = 0.0; … … 821 826 switch (length_mod) { 822 827 case LMOD_NONE: 823 fres = posix_strtof(cur_limited, &cur_updated);828 fres = posix_strtof(cur_limited, (char **) &cur_updated); 824 829 break; 825 830 case LMOD_l: 826 dres = posix_strtod(cur_limited, &cur_updated);831 dres = posix_strtod(cur_limited, (char **) &cur_updated); 827 832 break; 828 833 case LMOD_L: 829 ldres = posix_strtold(cur_limited, &cur_updated);834 ldres = posix_strtold(cur_limited, (char **) &cur_updated); 830 835 break; 831 836 default: … … 835 840 /* Update the cursor so it can be returned to the provider. */ 836 841 cur_borrowed += cur_updated - cur_limited; 837 if ( width != -1 && cur_limited != NULL) {842 if (cur_duplicated != NULL) { 838 843 /* Deallocate duplicated part of the cursor view. */ 839 free(cur_ limited);844 free(cur_duplicated); 840 845 } 841 846 cur_limited = NULL; -
uspace/lib/usbdev/include/usb/dev/alternate_ifaces.h
rd39c46e0 r33b8d024 59 59 typedef struct { 60 60 /** Array of alternate interfaces descriptions. */ 61 constusb_alternate_interface_descriptors_t *alternatives;61 usb_alternate_interface_descriptors_t *alternatives; 62 62 /** Size of @c alternatives array. */ 63 63 size_t alternative_count; -
uspace/lib/usbdev/include/usb/dev/device.h
rd39c46e0 r33b8d024 51 51 usb_standard_device_descriptor_t device; 52 52 /** Full configuration descriptor of current configuration. */ 53 constvoid *full_config;53 void *full_config; 54 54 size_t full_config_size; 55 55 } usb_device_descriptors_t; -
uspace/lib/usbdev/include/usb/dev/request.h
rd39c46e0 r33b8d024 70 70 void *, size_t, size_t *); 71 71 errno_t usb_request_get_full_configuration_descriptor_alloc(usb_pipe_t *, 72 int, constvoid **, size_t *);72 int, void **, size_t *); 73 73 errno_t usb_request_set_descriptor(usb_pipe_t *, usb_request_type_t, 74 74 usb_request_recipient_t, uint8_t, uint8_t, uint16_t, const void *, size_t); -
uspace/lib/usbdev/src/devpoll.c
rd39c46e0 r33b8d024 80 80 { 81 81 assert(arg); 82 constpolling_data_t *data = arg;82 polling_data_t *data = arg; 83 83 /* Helper to reduce typing. */ 84 84 const usb_device_auto_polling_t *params = &data->auto_polling; -
uspace/lib/usbdev/src/recognise.c
rd39c46e0 r33b8d024 61 61 */ 62 62 static errno_t usb_add_match_id(match_id_list_t *matches, int score, 63 c onst char *match_str)63 char *match_str) 64 64 { 65 65 assert(matches); -
uspace/lib/usbdev/src/request.c
rd39c46e0 r33b8d024 475 475 errno_t usb_request_get_full_configuration_descriptor_alloc( 476 476 usb_pipe_t *pipe, int index, 477 constvoid **descriptor_ptr, size_t *descriptor_size)477 void **descriptor_ptr, size_t *descriptor_size) 478 478 { 479 479 errno_t rc; -
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
rd39c46e0 r33b8d024 105 105 void *arg 106 106 ); 107 void usb_transfer_batch_destroy( constusb_transfer_batch_t *instance);107 void usb_transfer_batch_destroy(usb_transfer_batch_t *instance); 108 108 109 109 void usb_transfer_batch_finish_error(const usb_transfer_batch_t *instance, -
uspace/lib/usbhost/src/usb_transfer_batch.c
rd39c46e0 r33b8d024 94 94 * @param[in] instance Batch structure to use. 95 95 */ 96 void usb_transfer_batch_destroy( constusb_transfer_batch_t *instance)96 void usb_transfer_batch_destroy(usb_transfer_batch_t *instance) 97 97 { 98 98 if (!instance) -
uspace/lib/usbvirt/include/usbvirt/device.h
rd39c46e0 r33b8d024 154 154 usb_standard_configuration_descriptor_t *descriptor; 155 155 /** Array of extra data. */ 156 constusbvirt_device_configuration_extras_t *extra;156 usbvirt_device_configuration_extras_t *extra; 157 157 /** Length of @c extra array. */ 158 158 size_t extra_count;
Note:
See TracChangeset
for help on using the changeset viewer.
