From cdaf21f4158da9477ae14595a177974377360cdd Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 10 Sep 2017 00:17:24 -0500 Subject: [PATCH] Cleanup walk table --- src/ox/fs/oxfstool.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ox/fs/oxfstool.cpp b/src/ox/fs/oxfstool.cpp index ffe523831..a9c28db8f 100644 --- a/src/ox/fs/oxfstool.cpp +++ b/src/ox/fs/oxfstool.cpp @@ -5,6 +5,8 @@ * 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/. */ + +#include #include #include #include @@ -342,11 +344,18 @@ int walk(int argc, char **args) { if (fsBuff) { auto fs = createFileSystem(fsBuff, fsSize); if (fs) { + cout << setw(9) << "Type |"; + cout << setw(10) << "Start |"; + cout << setw(10) << "End |"; + cout << setw(8) << "Size"; + cout << endl; + cout << "-------------------------------------"; + cout << endl; fs->walk([](const char *type, uint64_t start, uint64_t end) { - cout << type; - cout << "\tstart: " << start; - cout << "\tend: " << end; - cout << "\tsize: " << (end - start); + cout << setw(7) << type << " |"; + cout << setw(8) << start << " |"; + cout << setw(8) << end << " |"; + cout << setw(8) << (end - start); cout << endl; return 0; });