Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
return values[i];
}
-extern void remove_trailing_slashes(char *p)
-{
- int l = strlen(p);
- while (--l >= 0 && (p[l] == '/' || p[l] == '\n'))
- p[l] = '\0';
-}
-
/*
* Sets the process title to the specified title. Note that this may fail if
* the kernel doesn't support PR_SET_MM_MAP (kernels <3.18).
#ifndef __LXC_INITUTILS_H
#define __LXC_INITUTILS_H
+#include "config.h"
+
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <unistd.h>
-#include "config.h"
+#include "string_utils.h"
#define DEFAULT_VG "lxc"
#define DEFAULT_THIN_POOL "lxc"
extern const char *lxc_global_config_value(const char *option_name);
-extern void remove_trailing_slashes(char *p);
extern int setproctitle(char *title);
#endif /* __LXC_INITUTILS_H */
return 0;
return 1;
}
+
+void remove_trailing_slashes(char *p)
+{
+ int l = strlen(p);
+ while (--l >= 0 && (p[l] == '/' || p[l] == '\n'))
+ p[l] = '\0';
+}
extern char *lxc_trim_whitespace_in_place(char *buffer);
extern int lxc_is_line_empty(const char *line);
+extern void remove_trailing_slashes(char *p);
#endif /* __LXC_STRING_UTILS_H */