summaryrefslogtreecommitdiffstats
path: root/discover/file.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-08-08 14:40:59 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-08-08 16:28:39 +0800
commita70807730ef59efc4116556ecabe1b9f70ce605b (patch)
treee23003459b930003ad6ab06f71ac7fb7aa014b1f /discover/file.h
parentbee85b3946d50bc4ee02ab889f4b3a9cd0defe98 (diff)
downloadtalos-petitboot-a70807730ef59efc4116556ecabe1b9f70ce605b.tar.gz
talos-petitboot-a70807730ef59efc4116556ecabe1b9f70ce605b.zip
discover: separate file-reading code into file.c
We'll need to read files in the network config code, so add a 'file' object, containing the read_file function. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/file.h')
-rw-r--r--discover/file.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/discover/file.h b/discover/file.h
new file mode 100644
index 0000000..1997eca
--- /dev/null
+++ b/discover/file.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2013 Jeremy Kerr <jk@ozlabs.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef FILE_H
+#define FILE_H
+
+int read_file(void *ctx, const char *filename, char **bufp, int *lenp);
+
+#endif /* FILE_H */
+
OpenPOWER on IntegriCloud