summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-04-08 11:08:16 +0200
committerAndy Wingo <wingo@pobox.com>2015-04-08 11:08:16 +0200
commit7b061de2d0601a33f7246c4b909f30ddc44d7ab6 (patch)
tree6b6378f2b4a2499b274ca1fd8c154554635e8156 /src
parent679327ab991edd0a13a0cff335ea5c9c8a7ef705 (diff)
Compiling.
Diffstat (limited to 'src')
-rw-r--r--src/core/cgroup.c3
-rw-r--r--src/core/execute.c1
-rw-r--r--src/core/service.c2
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-types.c2
-rw-r--r--src/login/loginctl.c10
-rw-r--r--src/shared/build.h1
-rw-r--r--src/shared/missing.h10
-rw-r--r--src/shared/udev-util.h2
-rw-r--r--src/shared/util.c65
-rw-r--r--src/shared/util.h2
10 files changed, 13 insertions, 85 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 6b8abb480..b28137789 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -933,7 +933,8 @@ int manager_setup_cgroup(Manager *m) {
/* 3. Install agent */
if (m->running_as == SYSTEMD_SYSTEM) {
- r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH);
+ r = -EINVAL;
+ // cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH);
if (r < 0)
log_warning_errno(r, "Failed to install release agent, ignoring: %m");
else if (r > 0)
diff --git a/src/core/execute.c b/src/core/execute.c
index 02df51b5b..027e3319e 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -61,7 +61,6 @@
#include "namespace.h"
#include "exit-status.h"
#include "missing.h"
-#include "utmp-wtmp.h"
#include "def.h"
#include "path-util.h"
#include "env-util.h"
diff --git a/src/core/service.c b/src/core/service.c
index d9385504e..beaf21340 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -347,7 +347,7 @@ static int service_add_fd_store(Service *s, int fd) {
return 0;
LIST_FOREACH(fd_store, fs, s->fd_store) {
- r = same_fd(fs->fd, fd);
+ r = -EINVAL;
if (r < 0)
return r;
if (r > 0) {
diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c
index 5ae47900a..455ae28d1 100644
--- a/src/libsystemd/sd-rtnl/rtnl-types.c
+++ b/src/libsystemd/sd-rtnl/rtnl-types.c
@@ -357,8 +357,8 @@ static const NLType rtnl_address_types[IFA_MAX + 1] = {
/*
[IFA_ANYCAST],
[IFA_MULTICAST],
-*/
[IFA_FLAGS] = { .type = NLA_U32 },
+*/
};
static const NLTypeSystem rtnl_address_type_system = {
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index ec102ae4c..6c173ed61 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -492,7 +492,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
if (i.scope) {
printf("\t Unit: %s\n", i.scope);
show_unit_cgroup(bus, "org.freedesktop.systemd1.Scope", i.scope, i.leader);
-
+#if 0
if (arg_transport == BUS_TRANSPORT_LOCAL) {
show_journal_by_unit(
@@ -508,6 +508,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
true,
NULL);
}
+#endif
}
return 0;
@@ -576,7 +577,7 @@ static int print_user_status_info(sd_bus *bus, const char *path, bool *new_line)
if (i.slice) {
printf("\t Unit: %s\n", i.slice);
show_unit_cgroup(bus, "org.freedesktop.systemd1.Slice", i.slice, 0);
-
+#if 0
show_journal_by_unit(
stdout,
i.slice,
@@ -589,6 +590,7 @@ static int print_user_status_info(sd_bus *bus, const char *path, bool *new_line)
SD_JOURNAL_LOCAL_ONLY,
true,
NULL);
+#endif
}
finish:
@@ -1272,7 +1274,11 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'o':
+#if 0
arg_output = output_mode_from_string(optarg);
+#else
+ arg_output = -1;
+#endif
if (arg_output < 0) {
log_error("Unknown output '%s'.", optarg);
return -EINVAL;
diff --git a/src/shared/build.h b/src/shared/build.h
index b0a5a7246..653a505e6 100644
--- a/src/shared/build.h
+++ b/src/shared/build.h
@@ -130,7 +130,6 @@
_IMA_FEATURE_ " " \
_APPARMOR_FEATURE_ " " \
_SMACK_FEATURE_ " " \
- _SYSVINIT_FEATURE_ " " \
_LIBCRYPTSETUP_FEATURE_ " " \
_GCRYPT_FEATURE_ " " \
_GNUTLS_FEATURE_ " " \
diff --git a/src/shared/missing.h b/src/shared/missing.h
index ca670cea4..4abd0232f 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -930,13 +930,3 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha
#ifndef RENAME_NOREPLACE
#define RENAME_NOREPLACE (1 << 0)
#endif
-
-#if !HAVE_DECL_KCMP
-static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
- return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
-}
-#endif
-
-#ifndef KCMP_FILE
-#define KCMP_FILE 0
-#endif
diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h
index 5f09ce181..0a7741afe 100644
--- a/src/shared/udev-util.h
+++ b/src/shared/udev-util.h
@@ -21,7 +21,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "udev.h"
+#include "libudev.h"
#include "util.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref);
diff --git a/src/shared/util.c b/src/shared/util.c
index 605fffcb7..72984735c 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -7794,71 +7794,6 @@ int fd_setcrtime(int fd, usec_t usec) {
return 0;
}
-int same_fd(int a, int b) {
- struct stat sta, stb;
- pid_t pid;
- int r, fa, fb;
-
- assert(a >= 0);
- assert(b >= 0);
-
- /* Compares two file descriptors. Note that semantics are
- * quite different depending on whether we have kcmp() or we
- * don't. If we have kcmp() this will only return true for
- * dup()ed file descriptors, but not otherwise. If we don't
- * have kcmp() this will also return true for two fds of the same
- * file, created by separate open() calls. Since we use this
- * call mostly for filtering out duplicates in the fd store
- * this difference hopefully doesn't matter too much. */
-
- if (a == b)
- return true;
-
- /* Try to use kcmp() if we have it. */
- pid = getpid();
- r = kcmp(pid, pid, KCMP_FILE, a, b);
- if (r == 0)
- return true;
- if (r > 0)
- return false;
- if (errno != ENOSYS)
- return -errno;
-
- /* We don't have kcmp(), use fstat() instead. */
- if (fstat(a, &sta) < 0)
- return -errno;
-
- if (fstat(b, &stb) < 0)
- return -errno;
-
- if ((sta.st_mode & S_IFMT) != (stb.st_mode & S_IFMT))
- return false;
-
- /* We consider all device fds different, since two device fds
- * might refer to quite different device contexts even though
- * they share the same inode and backing dev_t. */
-
- if (S_ISCHR(sta.st_mode) || S_ISBLK(sta.st_mode))
- return false;
-
- if (sta.st_dev != stb.st_dev || sta.st_ino != stb.st_ino)
- return false;
-
- /* The fds refer to the same inode on disk, let's also check
- * if they have the same fd flags. This is useful to
- * distuingish the read and write side of a pipe created with
- * pipe(). */
- fa = fcntl(a, F_GETFL);
- if (fa < 0)
- return -errno;
-
- fb = fcntl(b, F_GETFL);
- if (fb < 0)
- return -errno;
-
- return fa == fb;
-}
-
int chattr_fd(int fd, bool b, unsigned mask) {
unsigned old_attr, new_attr;
diff --git a/src/shared/util.h b/src/shared/util.h
index 124c7c06d..11cc10ba3 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -1054,8 +1054,6 @@ int fd_getcrtime(int fd, usec_t *usec);
int path_getcrtime(const char *p, usec_t *usec);
int fd_getcrtime_at(int dirfd, const char *name, usec_t *usec, int flags);
-int same_fd(int a, int b);
-
int chattr_fd(int fd, bool b, unsigned mask);
int chattr_path(const char *p, bool b, unsigned mask);
int change_attr_fd(int fd, unsigned value, unsigned mask);