`OpteAdm` duplicates a significant amount of code from `OpteHdl`
Opened this issue · 0 comments
FelixMcFelix commented
Currently, ioctls are implemented identically between both OpteAdm
(bin/opteadm/src/lib.rs) and OpteHdl
(lib/opte-ioctl/src/lib.rs), and each has several ioctls that the other does not. All of this functionality should be implemented once on OpteHdl
. OpteAdm
could instead be used instead to contain any equivalent methods for CLI-specific types, if needed:
pub struct OpteAdm(OpteHdl);
impl Deref for OpteAdm {
type Target = OpteHdl;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl OpteAdm {
// ... CLI-specific convenience/conversion methods ...
}