Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Okstad <pokstad@gitlab.com>2019-06-12 17:57:02 +0300
committerPaul Okstad <pokstad@gitlab.com>2019-06-12 17:57:02 +0300
commit33e4157124ed75328be0f0143ed7e8719baa512d (patch)
treec4046adf56cc1c43e7c4d616c52641dbbb2b5e11
parent0dcb5c579e63754f557aef91a4fa7a00e5b8b127 (diff)
parente713baaa3e6f0bec5087c06243e9a84c2b69cfdf (diff)
Merge branch 'zj-int64-fsstat' into 'master'
Cast FsStat syscall to int64 Closes #1726 See merge request gitlab-org/gitaly!1306
-rw-r--r--changelogs/unreleased/zj-int64-fsstat.yml3
-rw-r--r--internal/helper/fstype/detect_linux.go4
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/zj-int64-fsstat.yml b/changelogs/unreleased/zj-int64-fsstat.yml
new file mode 100644
index 000000000..9ca699352
--- /dev/null
+++ b/changelogs/unreleased/zj-int64-fsstat.yml
@@ -0,0 +1,3 @@
+title: Cast FsStat syscall to int64
+type: fixed
+merge_request: 1306
diff --git a/internal/helper/fstype/detect_linux.go b/internal/helper/fstype/detect_linux.go
index cf9322749..98c7b1b8a 100644
--- a/internal/helper/fstype/detect_linux.go
+++ b/internal/helper/fstype/detect_linux.go
@@ -8,5 +8,7 @@ func statFileSystemType(path string) (int64, error) {
return 0, err
}
- return stat.Type, nil
+ // This explicit cast to int64 is required for systems where the syscall
+ // returns an int32 instead.
+ return int64(stat.Type), nil
}