Files
cgroups-rs/src/systemd/dbus/error.rs
Xuewei Niu c49bee218f systemd: Do not check systemd version
The systemd version is purely informational and should not be parsed, as
documented in the [1]. In practice, systemd version has different formats
on OpenShift and Ubuntu.

This commit skips the version check and allows all operations. The errors
will be thrown from dbus when performing unsupported operations on obsolete
versions of systemd.

1: https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.systemd1.html

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2025-08-07 15:05:53 +08:00

16 lines
307 B
Rust

// Copyright (c) 2025 Ant Group
//
// SPDX-License-Identifier: Apache-2.0
//
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("invalid properties")]
InvalidProperties,
#[error("dbus error: {0}")]
Dbus(#[from] zbus::Error),
}