Changeset 04da852 in mainline
- Timestamp:
- 2012-08-16T11:09:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c67b41
- Parents:
- c8cbd39
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/logctl.c
rc8cbd39 r04da852 38 38 #include <sysinfo.h> 39 39 #include <ns.h> 40 #include <str.h> 40 41 41 #define SYSINFO_ DEFAULT_LOG_LEVEL "logger.level"42 #define SYSINFO_LOGGGER_BOOT_ARGUMENT "init_args.logger" 42 43 43 44 /** IPC session with the logger service. */ … … 78 79 int logctl_get_boot_level(log_level_t *level) 79 80 { 80 s ysarg_t boot_level_arg;81 int rc = sysinfo_get_value(SYSINFO_DEFAULT_LOG_LEVEL, &boot_level_arg);82 if ( rc != EOK)83 return rc;81 size_t argument_size; 82 void *argument = sysinfo_get_data(SYSINFO_LOGGGER_BOOT_ARGUMENT, &argument_size); 83 if (argument == NULL) 84 return EINVAL; 84 85 85 log_level_t boot_level = (log_level_t) boot_level_arg; 86 char level_str[10]; 87 str_cpy(level_str, 10, (const char *) argument); 88 89 int level_int = strtol(level_str, NULL, 0); 90 91 log_level_t boot_level = (log_level_t) level_int; 86 92 if (boot_level >= LVL_LIMIT) 87 93 return EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.