internal/wayland: remove fd typecasts
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m21s
Test / Hakurei (push) Successful in 3m14s
Test / Hpkg (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 4m18s
Test / Hakurei (race detector) (push) Successful in 5m5s
Test / Flake checks (push) Successful in 1m24s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m21s
Test / Hakurei (push) Successful in 3m14s
Test / Hpkg (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 4m18s
Test / Hakurei (race detector) (push) Successful in 5m5s
Test / Flake checks (push) Successful in 1m24s
These are no longer necessary since RawConn is no longer used. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -117,19 +117,26 @@ func (e *Error) Error() string {
|
||||
}
|
||||
}
|
||||
|
||||
// bindWaylandFd calls hakurei_bind_wayland_fd. A non-nil error has concrete type [Error].
|
||||
func bindWaylandFd(socketPath string, fd uintptr, appID, instanceID string, syncFd uintptr) error {
|
||||
// securityContextBind calls hakurei_security_context_bind.
|
||||
//
|
||||
// A non-nil error has concrete type [Error].
|
||||
func securityContextBind(
|
||||
socketPath string,
|
||||
serverFd int,
|
||||
appID, instanceID string,
|
||||
closeFd int,
|
||||
) error {
|
||||
if hasNull(appID) || hasNull(instanceID) {
|
||||
return syscall.EINVAL
|
||||
}
|
||||
|
||||
var e Error
|
||||
e.Cause, e.Errno = C.hakurei_bind_wayland_fd(
|
||||
e.Cause, e.Errno = C.hakurei_security_context_bind(
|
||||
C.CString(socketPath),
|
||||
C.int(fd),
|
||||
C.int(serverFd),
|
||||
C.CString(appID),
|
||||
C.CString(instanceID),
|
||||
C.int(syncFd),
|
||||
C.int(closeFd),
|
||||
)
|
||||
|
||||
if e.Cause == RSuccess {
|
||||
|
||||
Reference in New Issue
Block a user