summaryrefslogtreecommitdiffstats
path: root/helper/helper.h
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-08-19 13:41:12 +0100
committerRichard Jones <rjones@redhat.com>2010-08-24 13:17:41 +0100
commite23a9c8f05e3646feb826d5db36d8656a80a27ab (patch)
tree06f7da9f29f346e445499048e8045b7dd074e48a /helper/helper.h
parentc0a9555e8559a0dbf432367f87c59c2a49520c99 (diff)
downloadfebootstrap-e23a9c8f05e3646feb826d5db36d8656a80a27ab.tar.gz
febootstrap-e23a9c8f05e3646feb826d5db36d8656a80a27ab.tar.xz
febootstrap-e23a9c8f05e3646feb826d5db36d8656a80a27ab.zip
Refactor febootstrap-supermin-helper code into separate files.
This is just code movement. There is no change to the code.
Diffstat (limited to 'helper/helper.h')
-rw-r--r--helper/helper.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/helper/helper.h b/helper/helper.h
new file mode 100644
index 0000000..42bf824
--- /dev/null
+++ b/helper/helper.h
@@ -0,0 +1,46 @@
+/* febootstrap-supermin-helper reimplementation in C.
+ * Copyright (C) 2009-2010 Red Hat Inc.
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef FEBOOTSTRAP_SUPERMIN_HELPER_H
+#define FEBOOTSTRAP_SUPERMIN_HELPER_H
+
+/* main.c */
+extern struct timeval start_t;
+extern int verbose;
+
+/* appliance.c */
+extern void create_appliance (char **inputs, int nr_inputs, const char *whitelist, const char *modpath, const char *initrd);
+
+/* kernel.c */
+extern const char *create_kernel (const char *hostcpu, const char *kernel);
+
+/* utils.c */
+extern void print_timestamped_message (const char *fs, ...);
+extern int64_t timeval_diff (const struct timeval *x, const struct timeval *y);
+extern int reverse_filevercmp (const void *p1, const void *p2);
+extern void add_string (char ***argv, size_t *n_used, size_t *n_alloc, const char *str);
+extern size_t count_strings (char *const *argv);
+extern char **read_dir (const char *name);
+extern char **filter (char **strings, int (*)(const char *));
+extern char **filter_fnmatch (char **strings, const char *patt, int flags);
+extern char **filter_notmatching_substring (char **strings, const char *sub);
+extern void sort (char **strings, int (*compare) (const void *, const void *));
+extern int isdir (const char *path);
+extern char **load_file (const char *filename);
+
+#endif /* FEBOOTSTRAP_SUPERMIN_HELPER_H */