[lxc-devel] [PATCH 3/4] lxc: kill utmp.h header

Greg Kurz gkurz at fr.ibm.com
Tue Nov 8 11:49:20 UTC 2011


This header doesn't bring much benefit, as there's only one user for
lxc_utmp_mainloop_add()... but it sure brings issues: it's completly
impossible to include the <utmp.h> system header because of the -I
arguments generated by automake.

Signed-off-by: Greg Kurz <gkurz at fr.ibm.com>
---

 src/lxc/Makefile.am |    2 +-
 src/lxc/start.c     |    4 +++-
 src/lxc/utmp.h      |   28 ----------------------------
 3 files changed, 4 insertions(+), 30 deletions(-)
 delete mode 100644 src/lxc/utmp.h

diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index 924cf1d..e8cb14c 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -51,7 +51,7 @@ liblxc_so_SOURCES = \
 	mainloop.c mainloop.h \
 	af_unix.c af_unix.h \
 	\
-	utmp.c utmp.h
+	utmp.c
 
 AM_CFLAGS=-I$(top_srcdir)/src \
 	-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
diff --git a/src/lxc/start.c b/src/lxc/start.c
index 9481a8a..0d481f3 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -120,7 +120,6 @@ int signalfd(int fd, const sigset_t *mask, int flags)
 #include "af_unix.h"
 #include "mainloop.h"
 #include "utils.h"
-#include "utmp.h"
 #include "monitor.h"
 #include "commands.h"
 #include "console.h"
@@ -279,6 +278,9 @@ int lxc_set_state(const char *name, struct lxc_handler *handler, lxc_state_t sta
 	return 0;
 }
 
+extern int lxc_utmp_mainloop_add(struct lxc_epoll_descr *descr,
+				 struct lxc_handler *handler);
+
 int lxc_poll(const char *name, struct lxc_handler *handler)
 {
 	int sigfd = handler->sigfd;
diff --git a/src/lxc/utmp.h b/src/lxc/utmp.h
deleted file mode 100644
index ac3eee4..0000000
--- a/src/lxc/utmp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * lxc: linux Container library
- *
- * (C) Copyright IBM Corp. 2007, 2008
- *
- * Authors:
- * Daniel Lezcano <dlezcano at fr.ibm.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-struct lxc_handler;
-struct lxc_epoll_descr;
-
-int lxc_utmp_mainloop_add(struct lxc_epoll_descr *descr,
-			  struct lxc_handler *handler);





More information about the lxc-devel mailing list