Changeset 330a59f in mainline for uspace/lib/c/generic/io/logctl.c
- Timestamp:
- 2012-08-16T22:45:22Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f72ae3b
- Parents:
- 9ba10f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/logctl.c
r9ba10f0 r330a59f 39 39 #include <ns.h> 40 40 #include <str.h> 41 42 #define SYSINFO_LOGGGER_BOOT_ARGUMENT "init_args.logger"43 41 44 42 /** IPC session with the logger service. */ … … 130 128 } 131 129 132 133 int logctl_get_boot_level(log_level_t *level)134 {135 size_t argument_size;136 void *argument = sysinfo_get_data(SYSINFO_LOGGGER_BOOT_ARGUMENT, &argument_size);137 if (argument == NULL)138 return EINVAL;139 140 char level_str[20];141 str_cpy(level_str, 20, (const char *) argument);142 143 log_level_t boot_level;144 int rc = log_level_from_str(level_str, &boot_level);145 if (rc != EOK)146 return rc;147 148 if (level != NULL)149 *level = (log_level_t) boot_level;150 151 return EOK;152 }153 154 130 /** @} 155 131 */
Note:
See TracChangeset
for help on using the changeset viewer.