summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index 532fc5a..29228c8 100644
--- a/misc.h
+++ b/misc.h
@@ -68,6 +68,18 @@ do { \
} \
} while (0)
+/*
+ * NV_STRCAT() - takes a dynamically allocated string followed by a
+ * NULL-terminated list of arbitrary strings and concatenates the
+ * strings with nvstrcat(); the newly allocated string replaces the
+ * original one, which is freed.
+ */
+#define NV_STRCAT(str, args...) \
+do { \
+ char *__tmp_str = (str); \
+ (str) = nvstrcat(__tmp_str, ##args); \
+ nvfree(__tmp_str); \
+} while (0)
void *nvalloc(size_t size);
void *nvrealloc(void *ptr, size_t size);
@@ -82,11 +94,14 @@ int check_euid(Options *op);
int check_runlevel(Options *op);
int adjust_cwd(Options *op, const char *program_name);
char *fget_next_line(FILE *fp, int *eof);
-char *get_next_line(char *buf, char **e);
+char *get_next_line(char *buf, char **e, char *start, int length);
int run_command(Options *op, const char *cmd, char **data,
int output, int status, int redirect);
+int read_text_file(const char *filename, char **buf);
int find_system_utils(Options *op);
int find_module_utils(Options *op);
+int check_selinux(Options *op);
+int check_proc_modprobe_path(Options *op);
int check_development_tools(Options *op);
int nvid_version (const char *str, int *major, int *minor, int *patch);
int continue_after_error(Options *op, const char *fmt, ...);
@@ -97,6 +112,8 @@ void check_installed_files_from_package(Options *op, Package *p);
unsigned int get_installable_file_mask(Options *op);
int tls_test(Options *op, int compat_32_libs);
int check_runtime_configuration(Options *op, Package *p);
+void collapse_multiple_slashes(char *s);
+int is_symbolic_link_to(const char *path, const char *dest);
Distribution get_distribution(Options *op);
int check_for_running_x(Options *op);