summaryrefslogtreecommitdiff
path: root/cmd/info
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/info')
-rw-r--r--cmd/info/info.ha9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/info/info.ha b/cmd/info/info.ha
index 75ab499..8c0110a 100644
--- a/cmd/info/info.ha
+++ b/cmd/info/info.ha
@@ -1,19 +1,20 @@
use fmt;
use io;
+use os;
use gpt;
use cmd;
fn booltonum(a: bool) str = if (a) { return "1"; } else { return "0"; };
-export fn info(vol: str, args: []str) void = {
- const name = vol;
- const vol = cmd::opengpt(vol);
+export fn info(args: []str) void = {
+ const fd = cmd::openfile();
+ const vol = cmd::opengpt(fd);
defer gpt::finish(vol);
const header = vol.primary.header;
- fmt::printfln("# GPT header info {}", name)!;
+ fmt::printfln("# GPT header info {}", os::args[1])!;
fmt::printfln("revision({})", header.revision)!;
fmt::printfln("header_size({})", header.header_size)!;
fmt::printfln("header_crc32({})", header.header_crc32)!;