procfs2 0.2.3

A modern, zero-copy, strongly-typed Rust library for reading Linux /proc and /sys
Documentation
1
2
3
4
5
6
7
8
9
use crate::error::{KernelVersion, Result};

/// Reads the running kernel version from `/proc/version`.
///
/// Delegates to [`KernelVersion::current`] which parses the version
/// string embedded in `/proc/version`.
pub fn version() -> Result<KernelVersion> {
    KernelVersion::current()
}