Module: Mesa
Branch: staging/20.0
Commit: af4999d0e04dd0885f593574cf05c28ff62ba1a9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=af4999d0e04dd0885f593574cf05c28ff62ba1a9

Author: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>
Date:   Sat May 23 02:26:04 2020 +0200

radv: Handle failing to create .cache dir.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>
(cherry picked from commit cd61f5234d2c275b21c249fc2effc058a74ecf0a)

---

 .pick_status.json          | 2 +-
 src/amd/vulkan/radv_meta.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 91348a5ba9d..f63ceac4d2f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1363,7 +1363,7 @@
         "description": "radv: Handle failing to create .cache dir.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "f4e499ec79147f4172f3669ae9dafd941aaeeb65"
     },
diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index 448a6168bd2..de2f85148a6 100644
--- a/src/amd/vulkan/radv_meta.c
+++ b/src/amd/vulkan/radv_meta.c
@@ -262,7 +262,8 @@ radv_builtin_cache_path(char *path)
 
        strcpy(path, pwd.pw_dir);
        strcat(path, "/.cache");
-       mkdir(path, 0755);
+       if (mkdir(path, 0755))
+               return false;
 
        ret = snprintf(path, PATH_MAX + 1, "%s%s%zd",
                       pwd.pw_dir, suffix2, sizeof(void *) * 8);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to