imag/imag-store/src/verify.rs

31 lines
1.1 KiB
Rust
Raw Normal View History

//
// imag - the personal information management suite for the commandline
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; version
// 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
2016-07-16 22:45:51 +00:00
use libimagrt::runtime::Runtime;
2016-09-05 17:34:12 +00:00
use libimagutil::warn_exit::warn_exit;
2016-07-16 22:45:51 +00:00
pub fn verify(rt: &Runtime) {
if rt.store().verify() {
info!("Store seems to be fine");
} else {
2016-09-05 17:34:12 +00:00
warn_exit("Store seems to be broken somehow", 1);
2016-07-16 22:45:51 +00:00
}
}