Changeset f3e2663 in mainline for uspace/lib/c
- Timestamp:
- 2011-04-03T11:17:45Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 106743d
- Parents:
- 10eb754 (diff), b2a081ae (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c
- Files:
-
- 1 added
- 14 edited
- 1 moved
-
Makefile (modified) (1 diff)
-
arch/abs32le/_link.ld.in (modified) (1 diff)
-
arch/amd64/_link.ld.in (modified) (1 diff)
-
arch/arm32/_link.ld.in (modified) (1 diff)
-
arch/ia32/_link.ld.in (modified) (1 diff)
-
arch/ia64/_link.ld.in (modified) (2 diffs)
-
arch/mips32/_link.ld.in (modified) (1 diff)
-
arch/ppc32/_link.ld.in (modified) (1 diff)
-
arch/sparc64/_link.ld.in (modified) (1 diff)
-
generic/adt/measured_strings.c (modified) (1 diff)
-
generic/devman.c (modified) (3 diffs)
-
generic/io/log.c (added)
-
generic/vfs/vfs.c (modified) (1 diff)
-
include/devman.h (modified) (1 diff)
-
include/io/log.h (moved) (moved from kernel/arch/amd64/include/memstr.h ) (2 diffs)
-
include/ipc/devman.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
r10eb754 rf3e2663 76 76 generic/io/io.c \ 77 77 generic/io/printf.c \ 78 generic/io/log.c \ 78 79 generic/io/klog.c \ 79 80 generic/io/snprintf.c \ -
uspace/lib/c/arch/abs32le/_link.ld.in
r10eb754 rf3e2663 11 11 12 12 .text : { 13 *(.text );14 *(.rodata *);13 *(.text .text.*); 14 *(.rodata .rodata.*); 15 15 } :text 16 16 -
uspace/lib/c/arch/amd64/_link.ld.in
r10eb754 rf3e2663 16 16 17 17 .text : { 18 *(.text );19 *(.rodata *);18 *(.text .text.*); 19 *(.rodata .rodata.*); 20 20 } :text 21 21 -
uspace/lib/c/arch/arm32/_link.ld.in
r10eb754 rf3e2663 15 15 16 16 .text : { 17 *(.text );18 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 19 19 } :text 20 20 -
uspace/lib/c/arch/ia32/_link.ld.in
r10eb754 rf3e2663 16 16 17 17 .text : { 18 *(.text );19 *(.rodata *);18 *(.text .text.*); 19 *(.rodata .rodata.*); 20 20 } :text 21 21 -
uspace/lib/c/arch/ia64/_link.ld.in
r10eb754 rf3e2663 15 15 16 16 .text : { 17 *(.text );18 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 19 19 } :text 20 20 … … 23 23 .got : { 24 24 _gp = .; 25 *(.got *);25 *(.got .got.*); 26 26 } :data 27 27 -
uspace/lib/c/arch/mips32/_link.ld.in
r10eb754 rf3e2663 15 15 16 16 .text : { 17 *(.text );18 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 19 19 } :text 20 20 -
uspace/lib/c/arch/ppc32/_link.ld.in
r10eb754 rf3e2663 15 15 16 16 .text : { 17 *(.text );18 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 19 19 } :text 20 20 -
uspace/lib/c/arch/sparc64/_link.ld.in
r10eb754 rf3e2663 15 15 16 16 .text : { 17 *(.text );18 *(.rodata *);17 *(.text .text.*); 18 *(.rodata .rodata.*); 19 19 } :text 20 20 -
uspace/lib/c/generic/adt/measured_strings.c
r10eb754 rf3e2663 74 74 new->length = length; 75 75 new->value = ((uint8_t *) new) + sizeof(measured_string_t); 76 / / append terminating zero explicitly - to be safe76 /* Append terminating zero explicitly - to be safe */ 77 77 memcpy(new->value, string, new->length); 78 78 new->value[new->length] = '\0'; -
uspace/lib/c/generic/devman.c
r10eb754 rf3e2663 147 147 ret = devman_send_match_id(phone, match_id); 148 148 if (ret != EOK) { 149 printf("Driver failed to send match id, error %d\n",150 ret);151 149 return ret; 152 150 } … … 195 193 } 196 194 197 devman_send_match_ids(phone, match_ids); 198 199 async_wait_for(req, &retval); 200 201 async_serialize_end(); 202 195 int match_ids_rc = devman_send_match_ids(phone, match_ids); 196 197 async_wait_for(req, &retval); 198 199 async_serialize_end(); 200 201 /* Prefer the answer to DEVMAN_ADD_FUNCTION in case of errors. */ 202 if ((match_ids_rc != EOK) && (retval == EOK)) { 203 retval = match_ids_rc; 204 } 205 203 206 if (retval == EOK) 204 207 fun_handle = (int) IPC_GET_ARG1(answer); … … 326 329 } 327 330 331 int devman_device_get_handle_by_class(const char *classname, 332 const char *devname, devman_handle_t *handle, unsigned int flags) 333 { 334 int phone = devman_get_phone(DEVMAN_CLIENT, flags); 335 336 if (phone < 0) 337 return phone; 338 339 async_serialize_start(); 340 341 ipc_call_t answer; 342 aid_t req = async_send_1(phone, DEVMAN_DEVICE_GET_HANDLE_BY_CLASS, 343 flags, &answer); 344 345 sysarg_t retval = async_data_write_start(phone, classname, 346 str_size(classname)); 347 if (retval != EOK) { 348 async_wait_for(req, NULL); 349 async_serialize_end(); 350 return retval; 351 } 352 retval = async_data_write_start(phone, devname, 353 str_size(devname)); 354 if (retval != EOK) { 355 async_wait_for(req, NULL); 356 async_serialize_end(); 357 return retval; 358 } 359 360 async_wait_for(req, &retval); 361 362 async_serialize_end(); 363 364 if (retval != EOK) { 365 if (handle != NULL) 366 *handle = (devman_handle_t) -1; 367 return retval; 368 } 369 370 if (handle != NULL) 371 *handle = (devman_handle_t) IPC_GET_ARG1(answer); 372 373 return retval; 374 } 375 328 376 329 377 /** @} -
uspace/lib/c/generic/vfs/vfs.c
r10eb754 rf3e2663 756 756 { 757 757 struct stat stat; 758 int rc; 759 760 rc = fstat(fildes, &stat); 761 758 759 int rc = fstat(fildes, &stat); 760 if (rc != 0) 761 return rc; 762 762 763 if (!stat.device) 763 764 return -1; -
uspace/lib/c/include/devman.h
r10eb754 rf3e2663 53 53 extern int devman_device_get_handle(const char *, devman_handle_t *, 54 54 unsigned int); 55 extern int devman_device_get_handle_by_class(const char *, const char *, 56 devman_handle_t *, unsigned int); 55 57 56 58 extern int devman_add_device_to_class(devman_handle_t, const char *); -
uspace/lib/c/include/io/log.h
r10eb754 rf3e2663 1 1 /* 2 * Copyright (c) 2005 Sergey Bondari 2 * Copyright (c) 2011 Vojtech Horky 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 /** @addtogroup amd6430 /** @addtogroup libc 30 31 * @{ 31 32 */ 32 /** @file33 */34 33 35 #ifndef KERN_amd64_MEMSTR_H_36 #define KERN_amd64_MEMSTR_H_34 #ifndef LIBC_IO_LOG_H_ 35 #define LIBC_IO_LOG_H_ 37 36 38 # define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt))37 #include <stdarg.h> 39 38 40 extern void memsetw(void *, size_t, uint16_t); 41 extern void memsetb(void *, size_t, uint8_t); 39 typedef enum { 40 LVL_FATAL, 41 LVL_ERROR, 42 LVL_WARN, 43 LVL_NOTE, 44 LVL_DEBUG, 45 LVL_DEBUG2, 46 47 /** For checking range of values */ 48 LVL_LIMIT 49 } log_level_t; 50 51 extern int log_init(const char *, log_level_t); 52 extern void log_msg(log_level_t, const char *, ...); 53 extern void log_msgv(log_level_t, const char *, va_list); 42 54 43 55 #endif -
uspace/lib/c/include/ipc/devman.h
r10eb754 rf3e2663 148 148 149 149 typedef enum { 150 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD 150 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD, 151 DEVMAN_DEVICE_GET_HANDLE_BY_CLASS 151 152 } client_to_devman_t; 152 153
Note:
See TracChangeset
for help on using the changeset viewer.
