tape: rename 'mam' api to 'cartridge-memory'

This commit is contained in:
Dietmar Maurer 2020-12-22 09:27:34 +01:00
parent 2012825913
commit ee01737e87
2 changed files with 9 additions and 9 deletions

View File

@ -786,8 +786,8 @@ fn barcode_label_media_worker(
},
},
)]
/// Read Medium auxiliary memory attributes (Cartridge Memory)
pub fn mam_attributes(drive: String) -> Result<Vec<MamAttribute>, Error> {
/// Read Cartridge Memory (Medium auxiliary memory attributes)
pub fn cartridge_memory(drive: String) -> Result<Vec<MamAttribute>, Error> {
let (config, _digest) = config::drive::config()?;
@ -830,9 +830,9 @@ pub const SUBDIRS: SubdirMap = &sorted!([
.put(&API_METHOD_LOAD_SLOT)
),
(
"mam-attributes",
"cartridge-memory",
&Router::new()
.put(&API_METHOD_MAM_ATTRIBUTES)
.put(&API_METHOD_CARTRIDGE_MEMORY)
),
(
"read-label",

View File

@ -526,8 +526,8 @@ fn debug_scan(param: Value) -> Result<(), Error> {
},
},
)]
/// Read Medium auxiliary memory attributes (Cartridge Memory)
fn mam_attributes(
/// Read Cartridge Memory (Medium auxiliary memory attributes)
fn cartridge_memory(
mut param: Value,
rpcenv: &mut dyn RpcEnvironment,
) -> Result<(), Error> {
@ -537,7 +537,7 @@ fn mam_attributes(
param["drive"] = lookup_drive_name(&param, &config)?.into();
let output_format = get_output_format(&param);
let info = &api2::tape::drive::API_METHOD_MAM_ATTRIBUTES;
let info = &api2::tape::drive::API_METHOD_CARTRIDGE_MEMORY;
let mut data = match info.handler {
ApiHandler::Sync(handler) => (handler)(param, info, rpcenv)?,
@ -636,8 +636,8 @@ fn main() {
.completion_cb("drive", complete_drive_name)
)
.insert(
"mam",
CliCommand::new(&API_METHOD_MAM_ATTRIBUTES)
"cartridge-memory",
CliCommand::new(&API_METHOD_CARTRIDGE_MEMORY)
.completion_cb("drive", complete_drive_name)
)
.insert(