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 /libparted/arch/gnu.c | |
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 'libparted/arch/gnu.c')
0 files changed, 0 insertions, 0 deletions