mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-01-07 22:27:24 +08:00
fix 32-bit build
This commit is contained in:
parent
b37a5b9a45
commit
d665aecd88
2 changed files with 14 additions and 2 deletions
|
|
@ -251,7 +251,7 @@ func decryptSecrets(secrets []secret) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
const RAMFS_MAGIC = 0x858458f6
|
||||
const RAMFS_MAGIC int32 = -2054924042
|
||||
|
||||
func mountSecretFs(mountpoint string, keysGid int) error {
|
||||
if err := os.MkdirAll(mountpoint, 0750); err != nil {
|
||||
|
|
@ -262,7 +262,7 @@ func mountSecretFs(mountpoint string, keysGid int) error {
|
|||
if err := unix.Statfs(mountpoint, &buf); err != nil {
|
||||
return fmt.Errorf("Cannot get statfs for directory '%s': %w", mountpoint, err)
|
||||
}
|
||||
if buf.Type != RAMFS_MAGIC {
|
||||
if int32(buf.Type) != RAMFS_MAGIC {
|
||||
if err := unix.Mount("none", mountpoint, "ramfs", unix.MS_NODEV|unix.MS_NOSUID, "mode=0750"); err != nil {
|
||||
return fmt.Errorf("Cannot mount: %s", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue