]> git.ozlabs.org Git - petitboot/blobdiff - lib/system/system.c
configure.ac: Fix unmatched brackets
[petitboot] / lib / system / system.c
index 0253ac8778e32242bf055d2a3eadbcede4ba1920..b1121a17a4df6e59ccc9f66541845ed14c49ecb0 100644 (file)
@@ -28,6 +28,11 @@ const struct pb_system_apps pb_system_apps = {
        .wget           = HOST_PROG_WGET,
        .ip             = HOST_PROG_IP,
        .udhcpc         = HOST_PROG_UDHCPC,
+       .vgscan         = HOST_PROG_VGSCAN,
+       .vgchange       = HOST_PROG_VGCHANGE,
+       .pb_plugin      = HOST_PROG_PB_PLUGIN,
+       .pb_exec        = HOST_PROG_PB_EXEC,
+       .sh             = HOST_PROG_SH,
 };
 
 #ifndef TFTP_TYPE
@@ -39,8 +44,8 @@ enum tftp_type tftp_type = TFTP_TYPE;
 int pb_mkdir_recursive(const char *dir)
 {
        struct stat statbuf;
+       int rc, mode = 0755;
        char *str, *sep;
-       int mode = 0755;
 
        if (!*dir)
                return 0;
@@ -57,6 +62,8 @@ int pb_mkdir_recursive(const char *dir)
        str = talloc_strdup(NULL, dir);
        sep = strchr(*str == '/' ? str + 1 : str, '/');
 
+       rc = 0;
+
        while (1) {
 
                /* terminate the path at sep */
@@ -65,7 +72,8 @@ int pb_mkdir_recursive(const char *dir)
 
                if (mkdir(str, mode) && errno != EEXIST) {
                        pb_log("mkdir(%s): %s\n", str, strerror(errno));
-                       return -1;
+                       rc = -1;
+                       break;
                }
 
                if (!sep)
@@ -78,7 +86,7 @@ int pb_mkdir_recursive(const char *dir)
 
        talloc_free(str);
 
-       return 0;
+       return rc;
 }
 
 int pb_rmdir_recursive(const char *base, const char *dir)