Commit dd3bbf8
committed
Handle older systemd-repart without partno output in JSON
Older systemd-repart versions (ex. the one in c9s) do not
include the partno field in the JSON output. Make the field
optional and fall back to the array index when absent
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>1 parent 2fe4924 commit dd3bbf8
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
| |||
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
| 344 | + | |
342 | 345 | | |
343 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
| |||
0 commit comments