chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nspawn: use automatic cleanup for umask
[elogind.git]
/
src
/
shared
/
util.h
diff --git
a/src/shared/util.h
b/src/shared/util.h
index d25b7ee1ee4c9925224cd027d6725d7d85f524ea..1a607cf37c3599bc5729df984a1a55edd7badde3 100644
(file)
--- a/
src/shared/util.h
+++ b/
src/shared/util.h
@@
-31,6
+31,7
@@
#include <signal.h>
#include <sched.h>
#include <limits.h>
#include <signal.h>
#include <sched.h>
#include <limits.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/resource.h>
@@
-256,6
+257,7
@@
int undecchar(char c);
char *cescape(const char *s);
char *cunescape(const char *s);
char *cunescape_length(const char *s, size_t length);
char *cescape(const char *s);
char *cunescape(const char *s);
char *cunescape_length(const char *s, size_t length);
+char *cunescape_length_with_prefix(const char *s, size_t length, const char *prefix);
char *xescape(const char *s, const char *bad);
char *xescape(const char *s, const char *bad);
@@
-374,6
+376,7
@@
void status_welcome(void);
int fd_columns(int fd);
unsigned columns(void);
int fd_columns(int fd);
unsigned columns(void);
+unsigned columns_uncached(void);
int fd_lines(int fd);
unsigned lines(void);
int fd_lines(int fd);
unsigned lines(void);
@@
-417,10
+420,6
@@
bool nulstr_contains(const char*nulstr, const char *needle);
bool plymouth_running(void);
bool plymouth_running(void);
-void parse_syslog_priority(char **p, int *priority);
-void skip_syslog_pid(char **buf);
-void skip_syslog_date(char **buf);
-
bool hostname_is_valid(const char *s);
char* hostname_cleanup(char *s);
bool hostname_is_valid(const char *s);
char* hostname_cleanup(char *s);
@@
-432,8
+431,8
@@
int terminal_vhangup(const char *name);
int vt_disallocate(const char *name);
int copy_file(const char *from, const char *to);
int vt_disallocate(const char *name);
int copy_file(const char *from, const char *to);
-int symlink_or_copy(const char *from, const char *to);
-int symlink_
or_copy_
atomic(const char *from, const char *to);
+
+int symlink_atomic(const char *from, const char *to);
int fchmod_umask(int fd, mode_t mode);
int fchmod_umask(int fd, mode_t mode);
@@
-530,3
+529,9
@@
void warn_melody(void);
int get_shell(char **ret);
int get_home_dir(char **ret);
int get_shell(char **ret);
int get_home_dir(char **ret);
+
+void freep(void *p);
+void fclosep(FILE **f);
+void closep(int *fd);
+void closedirp(DIR **d);
+void umaskp(mode_t *u);