]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Fix compilation warning
authorDaniel Lezcano <daniel.lezcano@free.fr>
Tue, 12 Oct 2010 13:11:45 +0000 (15:11 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 12 Oct 2010 13:11:45 +0000 (15:11 +0200)
Fix some compilation warnings:
 * include caps.h in lxc_checkpoint and lxc_restart
 * check the return of the timer notification read

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_checkpoint.c
src/lxc/lxc_restart.c
src/lxc/utmp.c

index 8567f8946abbf2b572945ff29e18b8640e91f2e5..76f6709f299c9b0beb9f4cea9d2b3c60bd16b8ec 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "arguments.h"
 #include "config.h"
+#include "caps.h"
 
 lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint);
 
index 3467057547a8f0824cceef0bb0d90456f813f7d5..75486821cb34161da3248c6790b348425cded036 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "log.h"
 #include "lxc.h"
+#include "caps.h"
 #include "conf.h"
 #include "config.h"
 #include "confile.h"
index e6249cec2f6647bd9960f22cc095faad5f2de14a..691c3ef9d7bb3a2eb1d08191136a1680153a4cc0 100644 (file)
@@ -294,13 +294,16 @@ static int utmp_shutdown_handler(int fd, void *data,
                                 struct lxc_epoll_descr *descr)
 {
        int ntasks;
+       ssize_t nread;
        struct lxc_utmp *utmp_data = (struct lxc_utmp *)data;
        struct lxc_handler *handler = utmp_data->handler;
        struct lxc_conf *conf = handler->conf;
        uint64_t expirations;
 
        /* read and clear notifications */
-       read(fd, &expirations, sizeof(expirations));
+       nread = read(fd, &expirations, sizeof(expirations));
+       if (nread < 0)
+               SYSERROR("Failed to read timer notification");
 
        ntasks = utmp_get_ntasks(handler);