require all domains to have names
This commit is contained in:
1 parent
af69842fa0
commit
5d6bc3882c
5 files changed
+59
-7
No files matched your search
+11
-1
@@ -227,16 +227,22 @@ pub struct RemoteSshDomain {
|
||||
pty_system: Box<dyn PtySystem>,
|
||||
config: Arc<Config>,
|
||||
id: DomainId,
|
||||
name: String,
|
||||
}
|
||||
|
||||
impl RemoteSshDomain {
|
||||
pub fn with_pty_system(config: &Arc<Config>, pty_system: Box<dyn PtySystem>) -> Self {
|
||||
pub fn with_pty_system(
|
||||
name: &str,
|
||||
config: &Arc<Config>,
|
||||
pty_system: Box<dyn PtySystem>,
|
||||
) -> Self {
|
||||
let config = Arc::clone(config);
|
||||
let id = alloc_domain_id();
|
||||
Self {
|
||||
pty_system,
|
||||
config,
|
||||
id,
|
||||
name: name.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,6 +287,10 @@ impl Domain for RemoteSshDomain {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn domain_name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
fn attach(&self) -> Fallible<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user