chiark / gitweb /
remove unused includes
[elogind.git] / src / test / test-ns.c
index 7714e49ad9f04b9450f13cb85198e94c163ce81a..76b131c284449b6c95d1e2a3165f7f1a62b5c8f8 100644 (file)
 ***/
 
 #include <stdlib.h>
-#include <string.h>
 #include <unistd.h>
-#include <sys/mount.h>
-#include <linux/fs.h>
 
 #include "namespace.h"
-#include "execute.h"
 #include "log.h"
 
 int main(int argc, char *argv[]) {
@@ -65,12 +61,12 @@ int main(int argc, char *argv[]) {
                             PROTECT_SYSTEM_NO,
                             0);
         if (r < 0) {
-                log_error("Failed to setup namespace: %s", strerror(-r));
+                log_error_errno(r, "Failed to setup namespace: %m");
                 return 1;
         }
 
         execl("/bin/sh", "/bin/sh", NULL);
-        log_error("execl(): %m");
+        log_error_errno(errno, "execl(): %m");
 
         return 1;
 }