0026-report-error-log-when-openDir-failed.patch 1.0 KB
Newer Older
1
From 41d89c54722e674b0b5f24fa0374e57c7444f7f8 Mon Sep 17 00:00:00 2001
O
overweight 已提交
2 3
From: TanYiFeng <tanyifeng1@huawei.com>
Date: Fri, 26 Jul 2019 05:02:55 -0400
4
Subject: [PATCH 26/39] report error log when openDir failed
O
overweight 已提交
5 6 7

Signed-off-by: TanYiFeng <tanyifeng1@huawei.com>
---
D
dogsheng 已提交
8
 .../containers/storage/drivers/quota/projectquota.go          | 4 ++--
O
overweight 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vendor/github.com/containers/storage/drivers/quota/projectquota.go b/vendor/github.com/containers/storage/drivers/quota/projectquota.go
index a160530..c90c46f 100644
--- a/vendor/github.com/containers/storage/drivers/quota/projectquota.go
+++ b/vendor/github.com/containers/storage/drivers/quota/projectquota.go
@@ -448,9 +448,9 @@ func openDir(path string) (*C.DIR, error) {
 	Cpath := C.CString(path)
 	defer free(Cpath)
 
-	dir := C.opendir(Cpath)
+	dir, errno := C.opendir(Cpath)
 	if dir == nil {
-		return nil, fmt.Errorf("Can't open dir")
+		return nil, fmt.Errorf("Can't open dir %s: %v", path, errno.Error())
 	}
 	return dir, nil
 }
-- 
D
dogsheng 已提交
28
2.19.1
O
overweight 已提交
29