diff options
author | Arvin Schnell <aschnell@suse.com> | 2021-08-17 11:05:38 +0000 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2021-08-25 15:29:38 -0700 |
commit | 36d16c57d4ff6cf9903bfe65671c7f90879e004f (patch) | |
tree | 477d19d2c463c6011ed357758a86064d59d4c2c5 /tests/Makefile.am | |
parent | 72faef8673b5b1d00059608f0729e93cb21a7664 (diff) | |
download | parted-36d16c57d4ff6cf9903bfe65671c7f90879e004f.tar.gz |
parted: Add --json cmdline switch to output JSON
This outputs the disk's details as a JSON object. eg. a disk image with
a single partition from 1M to 100M:
{
"disk": {
"path": "/root/disk1.img",
"size": "2097152s",
"model": "",
"transport": "file",
"logical-sector-size": 512,
"physical-sector-size": 512,
"label": "gpt",
"max-partitions": 128,
"partitions": [
{
"number": 0,
"start": "34s",
"end": "2047s",
"size": "2014s",
"type": "free"
},{
"number": 1,
"start": "2048s",
"end": "200703s",
"size": "198656s",
"type": "primary",
"name": "root"
},{
"number": 0,
"start": "200704s",
"end": "2097118s",
"size": "1896415s",
"type": "free"
}
]
}
}
Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 9c4a79d..f9340aa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -40,6 +40,8 @@ TESTS = \ t0400-loop-clobber-infloop.sh \ t0500-dup-clobber.sh \ t0501-duplicate.sh \ + t0800-json-gpt.sh \ + t0801-json-msdos.sh \ t1100-busy-label.sh \ t1101-busy-partition.sh \ t1102-loop-label.sh \ |