[lxc-devel] [GIT] lxc branch, master, updated. 222dcd54439ce392cf74756e733a89784cea79b4
Daniel Lezcano
git at users.sourceforge.net
Wed Jan 13 17:51:36 UTC 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "lxc".
The branch, master has been updated
via 222dcd54439ce392cf74756e733a89784cea79b4 (commit)
via af5b01558c6ab7962f7dcdc883a0debc1aa0444f (commit)
via d066f3b8e2c80e983308bbe2744ce5595c805ca8 (commit)
via 5df6b18f0e5f1ebb86167efa4c43436e01740e79 (commit)
via 3ce45e6458830932261091d70acb552fadd2da9c (commit)
via 312b3ca262cf63f062113bb1ad1d5a19a72cfa77 (commit)
via 7707565969b7273bcebb1be692cbb37471236683 (commit)
via 7a7ff0c6fb427beb77046c60eb302bbdab0d5603 (commit)
from f079d569fc43c225643470df4641e643bd2f8b3c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 222dcd54439ce392cf74756e733a89784cea79b4
Author: Daniel Lezcano <dlezcano at fr.ibm.com>
Date: Wed Jan 13 18:51:16 2010 +0100
remove unused variable
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
commit af5b01558c6ab7962f7dcdc883a0debc1aa0444f
Author: Cedric Le Goater <clg at fr.ibm.com>
Date: Wed Jan 13 18:51:16 2010 +0100
export lxc_config_readline()
lxc_config_readline() will be used to parse configuration variable
assigned from the command line with --define
Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
commit d066f3b8e2c80e983308bbe2744ce5595c805ca8
Author: Clement Calmels <clement.calmels at fr.ibm.com>
Date: Wed Jan 13 18:51:16 2010 +0100
Simplify mainloop
Just use a list instead of array for dynamically allocated stuff. It's
more appropriated.
Signed-off-by: Clement Calmels <clement.calmels at fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
commit 5df6b18f0e5f1ebb86167efa4c43436e01740e79
Author: Clement Calmels <clement.calmels at fr.ibm.com>
Date: Wed Jan 13 18:51:16 2010 +0100
Don't mess descr->ev
A simple test program to show up the issue:
-8<---
#include <stdio.h>
#include <unistd.h>
#include "mainloop.h"
struct lxc_epoll_descr loop;
int cb1(int fd, void *data, struct lxc_epoll_descr *descr)
{
fprintf(stderr, "cb1\n");
return 1;
}
int cb2(int fd, void *data, struct lxc_epoll_descr *descr)
{
fprintf(stderr, "cb2\n");
return 1;
}
int main(int argc, char *argv[])
{
int ret;
int fds[2];
ret = pipe(fds);
if (ret) {
perror("pipe:");
return -1;
}
ret = lxc_mainloop_open(&loop);
if (ret) {
fprintf(stderr, "lxc_mainloop_open: %d\n", ret);
return -1;
}
ret = lxc_mainloop_add_handler(&loop, fds[1], cb1, NULL);
if (ret) {
fprintf(stderr, "lxc_mainloop_add_handler(fds[1]): %d\n", ret);
return -1;
}
ret = lxc_mainloop_add_handler(&loop, fds[0], cb2, NULL);
if (ret) {
fprintf(stderr, "lxc_mainloop_add_handler(fds[0]): %d\n", ret);
return -1;
}
write(fds[1], &ret, sizeof(ret));
ret = lxc_mainloop(&loop);
if (ret) {
fprintf(stderr, "lxc_mainloop: %d\n", ret);
return -1;
}
ret = lxc_mainloop_close(&loop);
if (ret) {
fprintf(stderr, "lxc_mainloop_close: %d\n", ret);
return -1;
}
return 0;
}
Compile and run:
$ gcc test.c -o test -I ./src/lxc/ ./src/lxc/liblxc_so-mainloop.o && ./test
cb2
commit 3ce45e6458830932261091d70acb552fadd2da9c
Author: Clement Calmels <clement.calmels at fr.ibm.com>
Date: Wed Jan 13 18:51:16 2010 +0100
If epoll_ctl fails, the descr->ev array isinconsistent
Let's take an example:
fd = open(..) /* fd = 3 for example */
lxc_mainloop_add_handler(descr, fd, cb1, data1) fails.
the program take care of the error, it closes the fd
Later, reopen a fd (get 3 for again)
lxc_mainloop_add_handler(desc, fd, cb2, data2) is ok.
When something happen on fd, cb1 with data1 will be called instead of
cb2 with data2, because descr->ev contains 2 entries for fd == 3.
Signed-off-by: Clement Calmels <clement.calmels at fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
commit 312b3ca262cf63f062113bb1ad1d5a19a72cfa77
Author: Clement Calmels <clement.calmels at fr.ibm.com>
Date: Wed Jan 13 18:51:16 2010 +0100
fix lxc_mainloop_del_handler
Fix bad index.
Signed-off-by: Clement Calmels <clement.calmels at fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
commit 7707565969b7273bcebb1be692cbb37471236683
Author: Cedric Le Goater <clg at fr.ibm.com>
Date: Wed Jan 13 18:51:15 2010 +0100
use different log categories in commands
lxc_<cmd>.c and <cmd>.c files use the same log category : lxc_<cmd>.
The symbol is multiply defined and linking statically lxc commands is
not possible.
The patch introduces new log categories with a '_ui' suffix to
differentiate the command line interface from the library routine.
Reported-by: Ciprian Dorin, Craciun <ciprian.craciun at gmail.com>
Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
commit 7a7ff0c6fb427beb77046c60eb302bbdab0d5603
Author: Cedric Le Goater <clg at fr.ibm.com>
Date: Wed Jan 13 18:51:15 2010 +0100
fix lxc_file_cb prototype
Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
-----------------------------------------------------------------------
Summary of changes:
src/lxc/conf.c | 4 +-
src/lxc/confile.c | 7 +++-
src/lxc/confile.h | 2 +-
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_checkpoint.c | 2 +-
src/lxc/lxc_console.c | 2 +-
src/lxc/lxc_execute.c | 2 +-
src/lxc/lxc_monitor.c | 2 +-
src/lxc/lxc_restart.c | 2 +-
src/lxc/lxc_start.c | 2 +-
src/lxc/lxc_unshare.c | 2 +-
src/lxc/lxc_wait.c | 2 +-
src/lxc/mainloop.c | 113 ++++++++++++++++++----------------------------
src/lxc/mainloop.h | 5 +-
src/lxc/parse.h | 2 +-
15 files changed, 65 insertions(+), 86 deletions(-)
hooks/post-receive
--
lxc
More information about the lxc-devel
mailing list