Documentation fix

Add relevant comments and explanations.
Fix indentation.
Add copyright notes.
This commit is contained in:
Andrzej Kurek
2018-02-19 03:57:07 -05:00
parent cc6294c12e
commit e1f26b8759
6 changed files with 73 additions and 38 deletions

View File

@@ -1,3 +1,31 @@
/** \brief Syslog to stderr wrapper for Unix-like systems
*
* By dynamically linking this module into an executable, any message sent to the system logs
* via the POSIX or Linux API is instead redirected to standard error.
*
* Compile this program with `cc -fPID -shared -o syslog2stderr.so syslog2stderr.c -ldl`
* and load it dynamically when running `myprogram` with
* `LD_PRELOAD=/path/to/syslog2stderr.so myprogram`.
* On macOS, replace `LD_PRELOAD` by `DYLD_PRELOAD`.
*/
/**
* Copyright (C) 2017-2018, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#include <dlfcn.h>
#include <stdarg.h>
#include <stdio.h>