Skip to content

Commit

Permalink
Update for new devicemapper consts interface.
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Sep 14, 2017
1 parent be4cc40 commit 7b3756d
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 32 deletions.
15 changes: 0 additions & 15 deletions src/engine/consts.rs

This file was deleted.

3 changes: 1 addition & 2 deletions src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

pub use self::consts::IEC;
pub use devicemapper::{IEC, SECTOR_SIZE};

pub use self::engine::Dev;
pub use self::engine::Engine;
Expand All @@ -28,7 +28,6 @@ mod macros;
// strat_engine is public so that integration tests can access its internals.
pub mod strat_engine;

mod consts;
#[allow(module_inception)]
pub mod engine;
mod errors;
Expand Down
3 changes: 1 addition & 2 deletions src/engine/sim_engine/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ use std::vec::Vec;

use uuid::Uuid;

use devicemapper::Sectors;
use devicemapper::{IEC, Sectors};

use super::super::consts::IEC;
use super::super::engine::{Filesystem, HasName, HasUuid, Pool};
use super::super::errors::{EngineError, EngineResult, ErrorEnum};
use super::super::structures::Table;
Expand Down
3 changes: 1 addition & 2 deletions src/engine/strat_engine/blockdevmgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ use chrono::{DateTime, Duration, Utc};
use rand::{thread_rng, sample};
use uuid::Uuid;

use devicemapper::{Bytes, Device, Sectors, Segment};
use devicemapper::{Bytes, Device, IEC, Sectors, Segment};

use super::super::consts::IEC;
use super::super::errors::{EngineError, EngineResult, ErrorEnum};
use super::super::types::{DevUuid, PoolUuid};

Expand Down
4 changes: 1 addition & 3 deletions src/engine/strat_engine/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ use std::path::Path;

use nix::sys::stat::{S_IFBLK, S_IFMT};

use devicemapper::consts::SECTOR_SIZE;
use devicemapper::{Bytes, Device, Sectors};
use devicemapper::{Bytes, Device, IEC, SECTOR_SIZE, Sectors};

use super::super::consts::IEC;
use super::super::errors::{EngineResult, EngineError, ErrorEnum};

ioctl!(read blkgetsize64 with 0x12, 114; u64);
Expand Down
4 changes: 2 additions & 2 deletions src/engine/strat_engine/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use std::path::{Path, PathBuf};
use std::process::Command;

use devicemapper::{Bytes, DmDevice, DM, Sectors, ThinDev, ThinDevId, ThinStatus, ThinPoolDev};
use devicemapper::consts::{IEC, SECTOR_SIZE};
use devicemapper::{Bytes, DmDevice, DM, IEC, SECTOR_SIZE, Sectors, ThinDev, ThinDevId, ThinStatus,
ThinPoolDev};

use nix::sys::statvfs::statvfs;
use nix::sys::statvfs::vfs::Statvfs;
Expand Down
4 changes: 1 addition & 3 deletions src/engine/strat_engine/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ use chrono::{DateTime, Utc};
use crc::crc32;
use uuid::Uuid;

use devicemapper::{Bytes, Sectors};
use devicemapper::consts::SECTOR_SIZE;
use devicemapper::{Bytes, IEC, SECTOR_SIZE, Sectors};

use super::super::consts::IEC;
use super::super::errors::{EngineResult, EngineError, ErrorEnum};
use super::super::types::{DevUuid, PoolUuid};

Expand Down
5 changes: 2 additions & 3 deletions src/engine/strat_engine/thinpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ use std::process::Command;
use uuid::Uuid;

use devicemapper as dm;
use devicemapper::{DM, DataBlocks, DmDevice, DmError, LinearDev, MetaBlocks, Sectors, Segment,
ThinDev, ThinDevId, ThinPoolDev, ThinPoolWorkingStatus};
use devicemapper::{DM, DataBlocks, DmDevice, DmError, IEC, LinearDev, MetaBlocks, Sectors,
Segment, ThinDev, ThinDevId, ThinPoolDev, ThinPoolWorkingStatus};
use devicemapper::ErrorEnum::CheckFailed;

use super::super::consts::IEC;
use super::super::engine::{Filesystem, HasName};
use super::super::errors::{EngineError, EngineResult, ErrorEnum};
use super::super::structures::Table;
Expand Down

0 comments on commit 7b3756d

Please sign in to comment.