dhcp/trivial: add '/* NM_IGNORED */' comment to #endif added by NetworkManager

This commit is contained in:
Thomas Haller
2015-01-11 19:54:45 +01:00
parent a05b04c0fd
commit 94b9c79cf6
9 changed files with 40 additions and 40 deletions

View File

@@ -32,17 +32,17 @@
#include "strv.h"
#include "siphash24.h"
#include "libudev-private.h"
#endif
#endif /* NM_IGNORED */
#include "dhcp-lease-internal.h"
#if 0 /* NM_IGNORED */
#include "log.h"
#include "utf8.h"
#endif
#endif /* NM_IGNORED */
#include "util.h"
#if 0 /* NM_IGNORED */
#include "conf-parser.h"
#include "condition.h"
#endif
#endif /* NM_IGNORED */
#include "network-internal.h"
#if 0 /* NM_IGNORED */
@@ -306,7 +306,7 @@ int config_parse_hwaddr(const char *unit,
return 0;
}
#endif
#endif /* NM_IGNORED */
void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) {
unsigned i;

View File

@@ -65,7 +65,7 @@ int config_parse_ifalias(const char *unit, const char *filename, unsigned line,
int net_get_unique_predictable_data(struct udev_device *device, uint8_t result[8]);
const char *net_get_name(struct udev_device *device);
#endif
#endif /* NM_IGNORED */
void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size);
int deserialize_in_addrs(struct in_addr **addresses, const char *string);

View File

@@ -34,7 +34,7 @@
#include "list.h"
#if 0 /* NM_IGNORED */
#include "mkdir.h"
#endif
#endif /* NM_IGNORED */
#include "fileio.h"
#include "unaligned.h"
#include "in-addr-util.h"

View File

@@ -32,7 +32,7 @@
#include "udev.h"
#include "udev-util.h"
#include "virt.h"
#endif
#endif /* NM_IGNORED */
#include "siphash24.h"
#include "util.h"
#include "refcnt.h"
@@ -1180,7 +1180,7 @@ int sd_dhcp6_client_new(sd_dhcp6_client **ret)
#if 0 /* NM_IGNORED */
sd_id128_t machine_id;
int r;
#endif
#endif /* NM_IGNORED */
size_t t;
assert_return(ret, -EINVAL);
@@ -1210,7 +1210,7 @@ int sd_dhcp6_client_new(sd_dhcp6_client **ret)
/* a bit of snake-oil perhaps, but no need to expose the machine-id
directly */
siphash24(client->duid.en.id, &machine_id, sizeof(machine_id), HASH_KEY.bytes);
#endif
#endif /* NM_IGNORED */
client->req_opts_len = ELEMENTSOF(default_req_opts);

View File

@@ -410,4 +410,4 @@ do { \
#endif
#include "log.h"
#endif
#endif /* NM_IGNORED */

View File

@@ -312,7 +312,7 @@ int strv_split_quoted(char ***t, const char *s, bool relax) {
return 0;
}
#endif
#endif /* NM_IGNORED */
char *strv_join(char **l, const char *separator) {
char *r, *e;

View File

@@ -32,7 +32,7 @@
#include "time-util.h"
#if 0 /* NM_IGNORED */
#include "strv.h"
#endif
#endif /* NM_IGNORED */
usec_t now(clockid_t clock_id) {
struct timespec ts;
@@ -279,7 +279,7 @@ char *format_timestamp_relative(char *buf, size_t l, usec_t t) {
buf[l-1] = 0;
return buf;
}
#endif
#endif /* NM_IGNORED */
char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
static const struct {
@@ -981,7 +981,7 @@ bool timezone_is_valid(const char *name) {
return true;
}
#endif
#endif /* NM_IGNORED */
clockid_t clock_boottime_or_monotonic(void) {
static clockid_t clock = -1;

View File

@@ -90,7 +90,7 @@
#include "gunicode.h"
#include "virt.h"
#include "def.h"
#endif
#endif /* NM_IGNORED */
#if 0 /* NM_IGNORED */
int saved_argc = 0;
@@ -112,7 +112,7 @@ size_t page_size(void) {
pgsz = (size_t) r;
return pgsz;
}
#endif
#endif /* NM_IGNORED */
bool streq_ptr(const char *a, const char *b) {
@@ -311,7 +311,7 @@ int parse_uid(const char *s, uid_t* ret_uid) {
*ret_uid = uid;
return 0;
}
#endif
#endif /* NM_IGNORED */
int safe_atou(const char *s, unsigned *ret_u) {
char *x = NULL;
@@ -466,7 +466,7 @@ int safe_atod(const char *s, double *ret_d) {
*ret_d = (double) d;
return 0;
}
#endif
#endif /* NM_IGNORED */
static size_t strcspn_escaped(const char *s, const char *reject) {
bool escaped = false;
@@ -617,7 +617,7 @@ int get_starttime_of_pid(pid_t pid, unsigned long long *st) {
return 0;
}
#endif
#endif /* NM_IGNORED */
int fchmod_umask(int fd, mode_t m) {
mode_t u;
@@ -875,7 +875,7 @@ int get_process_gid(pid_t pid, gid_t *gid) {
assert_cc(sizeof(uid_t) == sizeof(gid_t));
return get_process_id(pid, "Gid:", gid);
}
#endif
#endif /* NM_IGNORED */
char *strnappend(const char *s, const char *suffix, size_t b) {
size_t a;
@@ -1049,7 +1049,7 @@ int reset_signal_mask(void) {
return 0;
}
#endif
#endif /* NM_IGNORED */
char *strstrip(char *s) {
char *e;
@@ -1158,7 +1158,7 @@ int rmdir_parents(const char *path, const char *stop) {
return 0;
}
#endif
#endif /* NM_IGNORED */
char hexchar(int x) {
static const char table[16] = "0123456789abcdef";
@@ -1646,7 +1646,7 @@ int close_all_fds(const int except[], unsigned n_except) {
return r;
}
#endif
#endif /* NM_IGNORED */
bool chars_intersect(const char *a, const char *b) {
const char *p;
@@ -2269,7 +2269,7 @@ void safe_close_pair(int p[]) {
p[0] = safe_close(p[0]);
p[1] = safe_close(p[1]);
}
#endif
#endif /* NM_IGNORED */
ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
uint8_t *p = buf;
@@ -2551,7 +2551,7 @@ char* dirname_malloc(const char *path) {
return dir;
}
#endif
#endif /* NM_IGNORED */
int dev_urandom(void *p, size_t n) {
#if 0 /* NM_IGNORED */
@@ -2597,7 +2597,7 @@ int dev_urandom(void *p, size_t n) {
#else /* NM IGNORED */
int fd;
ssize_t k;
#endif
#endif /* NM_IGNORED */
fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC|O_NOCTTY);
if (fd < 0)
@@ -4169,7 +4169,7 @@ char* strshorten(char *s, size_t l) {
return s;
}
#endif
#endif /* NM_IGNORED */
static bool hostname_valid_char(char c) {
return
@@ -4272,7 +4272,7 @@ int pipe_eof(int fd) {
return pollfd.revents & POLLHUP;
}
#endif
#endif /* NM_IGNORED */
int fd_wait_for_event(int fd, int event, usec_t t) {
@@ -4805,7 +4805,7 @@ int get_files_in_directory(const char *path, char ***list) {
return n;
}
#endif
#endif /* NM_IGNORED */
char *strjoin(const char *x, ...) {
va_list ap;
@@ -5172,7 +5172,7 @@ finish:
return buf;
}
#endif
#endif /* NM_IGNORED */
void* memdup(const void *p, size_t l) {
void *r;
@@ -5619,7 +5619,7 @@ bool string_is_safe(const char *p) {
return true;
}
#endif
#endif /* NM_IGNORED */
/**
* Check if a string contains control characters. If 'ok' is non-NULL
@@ -6122,7 +6122,7 @@ char *strrep(const char *s, unsigned n) {
*p = 0;
return r;
}
#endif
#endif /* NM_IGNORED */
void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size) {
size_t a, newalloc;
@@ -6538,7 +6538,7 @@ int getpeersec(int fd, char **ret) {
*ret = s;
return 0;
}
#endif
#endif /* NM_IGNORED */
/* This is much like like mkostemp() but is subject to umask(). */
int mkostemp_safe(char *pattern, int flags) {
@@ -6943,7 +6943,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
}
}
}
#endif
#endif /* NM_IGNORED */
int fflush_and_check(FILE *f) {
assert(f);
@@ -7005,7 +7005,7 @@ char *tempfn_random(const char *p) {
return t;
}
#endif
#endif /* NM_IGNORED */
/* make sure the hostname is not "localhost" */
bool is_localhost(const char *hostname) {
@@ -7344,5 +7344,5 @@ int sethostname_idempotent(const char *s) {
return 1;
}
#endif
#endif /* NM_IGNORED */

View File

@@ -85,12 +85,12 @@
#else
# error Unknown rlim_t size
#endif
#endif
#endif /* NM_IGNORED */
#include "macro.h"
#if 0 /* NM_IGNORED */
#include "missing.h"
#endif
#endif /* NM_IGNORED */
#include "time-util.h"
/* What is interpreted as whitespace? */
@@ -987,7 +987,7 @@ bool pid_is_unwaited(pid_t pid);
#if 0 /* NM_IGNORED */
int getpeercred(int fd, struct ucred *ucred);
int getpeersec(int fd, char **ret);
#endif
#endif /* NM_IGNORED */
int writev_safe(int fd, const struct iovec *w, int j);
@@ -1010,7 +1010,7 @@ union file_handle_union {
struct file_handle handle;
char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ];
};
#endif
#endif /* NM_IGNORED */
int update_reboot_param_file(const char *param);