summaryrefslogtreecommitdiff
path: root/parted/jsonwrt.c
Commit message (Collapse)AuthorAgeFilesLines
* parted: Fix config.h include in jsonwrt.cBrian C. Lane2022-03-251-1/+1
|
* parted: Add --json cmdline switch to output JSONArvin Schnell2021-08-251-0/+225
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>