From ca953d831f8ba2d6685c1598792cbe1cefffe1f3 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 1 Feb 2021 17:54:53 +0100 Subject: [PATCH] cleanup: remove MT_ST_ prefix from SetDrvBufferOptions --- src/tape/drive/linux_mtio.rs | 30 +++++++++++++++--------------- src/tape/drive/linux_tape.rs | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/tape/drive/linux_mtio.rs b/src/tape/drive/linux_mtio.rs index a8158a4f..0621bb01 100644 --- a/src/tape/drive/linux_mtio.rs +++ b/src/tape/drive/linux_mtio.rs @@ -134,20 +134,20 @@ pub enum SetDrvBufferCmd { bitflags::bitflags!{ pub struct SetDrvBufferOptions: i32 { - const MT_ST_BUFFER_WRITES = 0x1; - const MT_ST_ASYNC_WRITES = 0x2; - const MT_ST_READ_AHEAD = 0x4; - const MT_ST_DEBUGGING = 0x8; - const MT_ST_TWO_FM = 0x10; - const MT_ST_FAST_MTEOM = 0x20; - const MT_ST_AUTO_LOCK = 0x40; - const MT_ST_DEF_WRITES = 0x80; - const MT_ST_CAN_BSR = 0x100; - const MT_ST_NO_BLKLIMS = 0x200; - const MT_ST_CAN_PARTITIONS = 0x400; - const MT_ST_SCSI2LOGICAL = 0x800; - const MT_ST_SYSV = 0x1000; - const MT_ST_NOWAIT = 0x2000; - const MT_ST_SILI = 0x4000; + const BUFFER_WRITES = 0x1; + const ASYNC_WRITES = 0x2; + const READ_AHEAD = 0x4; + const DEBUGGING = 0x8; + const TWO_FM = 0x10; + const FAST_MTEOM = 0x20; + const AUTO_LOCK = 0x40; + const DEF_WRITES = 0x80; + const CAN_BSR = 0x100; + const NO_BLKLIMS = 0x200; + const CAN_PARTITIONS = 0x400; + const SCSI2LOGICAL = 0x800; + const SYSV = 0x1000; + const NOWAIT = 0x2000; + const SILI = 0x4000; } } diff --git a/src/tape/drive/linux_tape.rs b/src/tape/drive/linux_tape.rs index 5b74be48..01497f3f 100644 --- a/src/tape/drive/linux_tape.rs +++ b/src/tape/drive/linux_tape.rs @@ -154,12 +154,12 @@ impl LinuxTapeHandle { let mut opts = SetDrvBufferOptions::empty(); // fixme: ? man st(4) claims we need to clear this for reliable multivolume - opts.set(SetDrvBufferOptions::MT_ST_BUFFER_WRITES, true); + opts.set(SetDrvBufferOptions::BUFFER_WRITES, true); // fixme: ?man st(4) claims we need to clear this for reliable multivolume - opts.set(SetDrvBufferOptions::MT_ST_ASYNC_WRITES, true); + opts.set(SetDrvBufferOptions::ASYNC_WRITES, true); - opts.set(SetDrvBufferOptions::MT_ST_READ_AHEAD, true); + opts.set(SetDrvBufferOptions::READ_AHEAD, true); self.set_drive_buffer_options(opts) }