|
22 | 22 | import com.webcodepro.applecommander.storage.Disk; |
23 | 23 | import com.webcodepro.applecommander.storage.physical.ImageOrder; |
24 | 24 |
|
| 25 | +import io.github.applecommander.acx.converter.IntegerTypeConverter; |
25 | 26 | import picocli.CommandLine.ArgGroup; |
26 | 27 | import picocli.CommandLine.Option; |
27 | 28 |
|
@@ -62,9 +63,11 @@ else if (blockCoordinate != null) { |
62 | 63 | } |
63 | 64 |
|
64 | 65 | public static class SectorCoordinateSelection { |
65 | | - @Option(names = { "-t", "--track" }, required = true, description = "Track number.") |
| 66 | + @Option(names = { "-t", "--track" }, required = true, description = "Track number.", |
| 67 | + converter = IntegerTypeConverter.class) |
66 | 68 | private Integer track; |
67 | | - @Option(names = { "-s", "--sector" }, required = true, description = "Sector number.") |
| 69 | + @Option(names = { "-s", "--sector" }, required = true, description = "Sector number.", |
| 70 | + converter = IntegerTypeConverter.class) |
68 | 71 | private Integer sector; |
69 | 72 |
|
70 | 73 | public boolean isBootSector() { |
@@ -97,7 +100,7 @@ public void write(Disk disk, byte[] data) { |
97 | 100 | } |
98 | 101 | } |
99 | 102 | public static class BlockCoordinateSelection { |
100 | | - @Option(names = { "-b", "--block" }, description = "Block number.") |
| 103 | + @Option(names = { "-b", "--block" }, description = "Block number.", converter = IntegerTypeConverter.class) |
101 | 104 | private Integer block; |
102 | 105 |
|
103 | 106 | public boolean isBootBlock() { |
|
0 commit comments