summaryrefslogtreecommitdiff
path: root/src/extsh.cpp
blob: 87df7d3b2aa92624b428ad869f1993c7193a6c7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "fs/extfs.hpp"

#include <iostream>
#include <string>

int main(int argc, char const * argv[])
  {
  auto const & path = [&]{ return std::string{argc > 1 ? argv[1] : "vdisk.img"}; }();
  auto const & disk = fs::extfs{path};

  if(disk.open())
    {
    std::clog << "[EXT2] Successfully opened ext*fs at: '" << path << "'\n";
    }
  else
    {
    std::clog << "[EXT2] Failed to open ext*fs at: '" << path << "'\n";
    }
  }