cryptsetup: Provide implementation without cgo

This commit is contained in:
Malte Poll 2023-05-19 14:30:46 +02:00 committed by Malte Poll
parent 524718d82c
commit c1dbbf34c3
3 changed files with 21 additions and 1 deletions

View File

@ -2,7 +2,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library( go_library(
name = "cryptsetup", name = "cryptsetup",
srcs = ["cryptsetup.go"], srcs = [
"crypsetup_cross.go",
"cryptsetup_cgo.go",
],
# keep # keep
cdeps = [ cdeps = [
"@//rpm:cryptsetup", "@//rpm:cryptsetup",

View File

@ -0,0 +1,15 @@
//go:build !linux || !cgo
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package cryptsetup
const (
// ReadWriteQueueBypass is a flag to disable the write and read workqueues for a crypt device.
ReadWriteQueueBypass = cryptActivateNoReadWorkqueue | cryptActivateNoWriteWorkqueue
cryptActivateNoReadWorkqueue = 0x1000000
cryptActivateNoWriteWorkqueue = 0x2000000
)

View File

@ -1,3 +1,5 @@
//go:build linux && cgo
/* /*
Copyright (c) Edgeless Systems GmbH Copyright (c) Edgeless Systems GmbH