typo: priviledged -> privileged
This commit is contained in:
parent
41696f5364
commit
1b259e2deb
|
@ -45,7 +45,7 @@ pub struct LegacyDrmDevice<A: AsRawFd + 'static> {
|
|||
|
||||
pub(in crate::backend::drm) struct Dev<A: AsRawFd + 'static> {
|
||||
fd: A,
|
||||
priviledged: bool,
|
||||
privileged: bool,
|
||||
active: Arc<AtomicBool>,
|
||||
old_state: HashMap<crtc::Handle, (crtc::Info, Vec<connector::Handle>)>,
|
||||
logger: ::slog::Logger,
|
||||
|
@ -77,7 +77,7 @@ impl<A: AsRawFd + 'static> Drop for Dev<A> {
|
|||
}
|
||||
}
|
||||
}
|
||||
if self.priviledged {
|
||||
if self.privileged {
|
||||
if let Err(err) = self.release_master_lock() {
|
||||
error!(self.logger, "Failed to drop drm master state. Error: {}", err);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ impl<A: AsRawFd + 'static> LegacyDrmDevice<A> {
|
|||
let active = Arc::new(AtomicBool::new(true));
|
||||
let mut dev = Dev {
|
||||
fd: dev,
|
||||
priviledged: true,
|
||||
privileged: true,
|
||||
old_state: HashMap::new(),
|
||||
active: active.clone(),
|
||||
logger: log.clone(),
|
||||
|
@ -112,8 +112,8 @@ impl<A: AsRawFd + 'static> LegacyDrmDevice<A> {
|
|||
|
||||
// we want to modeset, so we better be the master, if we run via a tty session
|
||||
if dev.acquire_master_lock().is_err() {
|
||||
warn!(log, "Unable to become drm master, assuming unpriviledged mode");
|
||||
dev.priviledged = false;
|
||||
warn!(log, "Unable to become drm master, assuming unprivileged mode");
|
||||
dev.privileged = false;
|
||||
};
|
||||
|
||||
// enumerate (and save) the current device state
|
||||
|
|
|
@ -23,7 +23,7 @@ use crate::backend::session::{AsSessionObserver, SessionObserver};
|
|||
pub struct LegacyDrmDeviceObserver<A: AsRawFd + 'static> {
|
||||
dev: Weak<Dev<A>>,
|
||||
dev_id: dev_t,
|
||||
priviledged: bool,
|
||||
privileged: bool,
|
||||
active: Arc<AtomicBool>,
|
||||
backends: Weak<RefCell<HashMap<crtc::Handle, Weak<LegacyDrmSurfaceInternal<A>>>>>,
|
||||
logger: ::slog::Logger,
|
||||
|
@ -35,7 +35,7 @@ impl<A: AsRawFd + 'static> AsSessionObserver<LegacyDrmDeviceObserver<A>> for Leg
|
|||
dev: Rc::downgrade(&self.dev),
|
||||
dev_id: self.dev_id,
|
||||
active: self.active.clone(),
|
||||
priviledged: self.dev.priviledged,
|
||||
privileged: self.dev.privileged,
|
||||
backends: Rc::downgrade(&self.backends),
|
||||
logger: self.logger.clone(),
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ impl<A: AsRawFd + 'static> SessionObserver for LegacyDrmDeviceObserver<A> {
|
|||
}
|
||||
}
|
||||
self.active.store(false, Ordering::SeqCst);
|
||||
if self.priviledged {
|
||||
if self.privileged {
|
||||
if let Some(device) = self.dev.upgrade() {
|
||||
if let Err(err) = device.release_master_lock() {
|
||||
error!(self.logger, "Failed to drop drm master state. Error: {}", err);
|
||||
|
@ -84,7 +84,7 @@ impl<A: AsRawFd + 'static> SessionObserver for LegacyDrmDeviceObserver<A> {
|
|||
}
|
||||
}
|
||||
self.active.store(true, Ordering::SeqCst);
|
||||
if self.priviledged {
|
||||
if self.privileged {
|
||||
if let Some(device) = self.dev.upgrade() {
|
||||
if let Err(err) = device.acquire_master_lock() {
|
||||
crit!(self.logger, "Failed to acquire drm master again. Error: {}", err);
|
||||
|
|
Loading…
Reference in New Issue