summaryrefslogtreecommitdiff
path: root/src/extsh.cpp
blob: 477f6c8e8f0bd852038d274691f6c3af90ff7f2f (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)
    {
    std::clog << "[EXT2] Successfully opened ext*fs at: '" << path << "'\n";
    }
  else
    {
    std::clog << "[EXT2] Failed to open ext*fs at: '" << path << "'\n";
    }
  }