diff options
author | sr | 2012-08-24 21:02:36 +0200 |
---|---|---|
committer | sr | 2012-08-24 21:02:36 +0200 |
commit | eca62df908b5bb5ff8382d314bce31c6f64ca6f5 (patch) | |
tree | dbd5f49c8574049b2e15c3488313586353035a27 /src/server/memlog.h | |
parent | [*] Cleanup, comments, more error checks (diff) | |
download | dnbd3-eca62df908b5bb5ff8382d314bce31c6f64ca6f5.tar.gz dnbd3-eca62df908b5bb5ff8382d314bce31c6f64ca6f5.tar.xz dnbd3-eca62df908b5bb5ff8382d314bce31c6f64ca6f5.zip |
...
Diffstat (limited to 'src/server/memlog.h')
-rw-r--r-- | src/server/memlog.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/server/memlog.h b/src/server/memlog.h new file mode 100644 index 0000000..24e3880 --- /dev/null +++ b/src/server/memlog.h @@ -0,0 +1,39 @@ +/* + * This file is part of the Distributed Network Block Device 3 + * + * Copyright(c) 2011-2012 Simon Rettberg + * + * This file may be licensed under the terms of of the + * GNU General Public License Version 2 (the ``GPL''). + * + * Software distributed under the License is distributed + * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the GPL for the specific language + * governing rights and limitations. + * + * You should have received a copy of the GPL along with this + * program. If not, go to http://www.gnu.org/licenses/gpl.html + * or write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef MEMLOG_H_ +#define MEMLOG_H_ + +void initmemlog(); + +/** + * Add a line to the log + */ +void memlogf(char *text, ...); + +/** + * Return log lines, separated by \n + * You need to free() the returned memory after use + * Returns NULL on error + * maxlines - Limit number of lines returned, 0 = everything + */ +char * fetchlog(int maxlines); + +#endif /* MEMLOG_H_ */ |