tape: rename 'mam' api to 'cartridge-memory'
This commit is contained in:
parent
2012825913
commit
ee01737e87
|
@ -786,8 +786,8 @@ fn barcode_label_media_worker(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Read Medium auxiliary memory attributes (Cartridge Memory)
|
/// Read Cartridge Memory (Medium auxiliary memory attributes)
|
||||||
pub fn mam_attributes(drive: String) -> Result<Vec<MamAttribute>, Error> {
|
pub fn cartridge_memory(drive: String) -> Result<Vec<MamAttribute>, Error> {
|
||||||
|
|
||||||
let (config, _digest) = config::drive::config()?;
|
let (config, _digest) = config::drive::config()?;
|
||||||
|
|
||||||
|
@ -830,9 +830,9 @@ pub const SUBDIRS: SubdirMap = &sorted!([
|
||||||
.put(&API_METHOD_LOAD_SLOT)
|
.put(&API_METHOD_LOAD_SLOT)
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"mam-attributes",
|
"cartridge-memory",
|
||||||
&Router::new()
|
&Router::new()
|
||||||
.put(&API_METHOD_MAM_ATTRIBUTES)
|
.put(&API_METHOD_CARTRIDGE_MEMORY)
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"read-label",
|
"read-label",
|
||||||
|
|
|
@ -526,8 +526,8 @@ fn debug_scan(param: Value) -> Result<(), Error> {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// Read Medium auxiliary memory attributes (Cartridge Memory)
|
/// Read Cartridge Memory (Medium auxiliary memory attributes)
|
||||||
fn mam_attributes(
|
fn cartridge_memory(
|
||||||
mut param: Value,
|
mut param: Value,
|
||||||
rpcenv: &mut dyn RpcEnvironment,
|
rpcenv: &mut dyn RpcEnvironment,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
|
@ -537,7 +537,7 @@ fn mam_attributes(
|
||||||
param["drive"] = lookup_drive_name(¶m, &config)?.into();
|
param["drive"] = lookup_drive_name(¶m, &config)?.into();
|
||||||
|
|
||||||
let output_format = get_output_format(¶m);
|
let output_format = get_output_format(¶m);
|
||||||
let info = &api2::tape::drive::API_METHOD_MAM_ATTRIBUTES;
|
let info = &api2::tape::drive::API_METHOD_CARTRIDGE_MEMORY;
|
||||||
|
|
||||||
let mut data = match info.handler {
|
let mut data = match info.handler {
|
||||||
ApiHandler::Sync(handler) => (handler)(param, info, rpcenv)?,
|
ApiHandler::Sync(handler) => (handler)(param, info, rpcenv)?,
|
||||||
|
@ -636,8 +636,8 @@ fn main() {
|
||||||
.completion_cb("drive", complete_drive_name)
|
.completion_cb("drive", complete_drive_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"mam",
|
"cartridge-memory",
|
||||||
CliCommand::new(&API_METHOD_MAM_ATTRIBUTES)
|
CliCommand::new(&API_METHOD_CARTRIDGE_MEMORY)
|
||||||
.completion_cb("drive", complete_drive_name)
|
.completion_cb("drive", complete_drive_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
|
|
Loading…
Reference in New Issue