chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: netdev - add ipvlan support
[elogind.git]
/
src
/
shared
/
util.h
diff --git
a/src/shared/util.h
b/src/shared/util.h
index 5818fee82e52f48be4bdd9c1fdea8c0ee5f169a9..2e662c9d2d6b1fd18a8f645a6c709322a01e8b6e 100644
(file)
--- a/
src/shared/util.h
+++ b/
src/shared/util.h
@@
-664,13
+664,6
@@
static inline void freep(void *p) {
free(*(void**) p);
}
free(*(void**) p);
}
-#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
- static inline void func##p(type *p) { \
- if (*p) \
- func(*p); \
- } \
- struct __useless_struct_to_allow_trailing_semicolon__
-
static inline void closep(int *fd) {
safe_close(*fd);
}
static inline void closep(int *fd) {
safe_close(*fd);
}
@@
-1069,3
+1062,5
@@
void release_lock_file(LockFile *f);
#define LOCK_FILE_INIT { .fd = -1, .path = NULL }
#define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim })
#define LOCK_FILE_INIT { .fd = -1, .path = NULL }
#define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim })
+
+ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);