mirror of
https://github.com/bobbimanners/mdttool.git
synced 2025-01-02 21:29:19 +00:00
More MDTTool bug fixes / improvements
This commit is contained in:
parent
50d57e2fb0
commit
1fa22a2d12
12
mdttool
12
mdttool
@ -132,7 +132,7 @@ def print_part_tbl():
|
|||||||
# Write partition table in parttab to file f
|
# Write partition table in parttab to file f
|
||||||
# Writes 256 blocks (ie 128K)
|
# Writes 256 blocks (ie 128K)
|
||||||
def write_part_tbl(f):
|
def write_part_tbl(f):
|
||||||
magic = 0xccac
|
magic = 0xccca
|
||||||
if ((parttab['cyls'] == -1)
|
if ((parttab['cyls'] == -1)
|
||||||
or (parttab['heads'] == -1)
|
or (parttab['heads'] == -1)
|
||||||
or (parttab['sectors'] == -1)
|
or (parttab['sectors'] == -1)
|
||||||
@ -245,7 +245,7 @@ def main():
|
|||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(
|
opts, args = getopt.getopt(
|
||||||
sys.argv[1:],
|
sys.argv[1:],
|
||||||
'ho:axlCHSG',
|
'ho:axlC:H:S:G:',
|
||||||
['help', 'output=', 'assemble', 'explode', 'list',
|
['help', 'output=', 'assemble', 'explode', 'list',
|
||||||
'cylinders', 'heads', 'sectors', 'gs'])
|
'cylinders', 'heads', 'sectors', 'gs'])
|
||||||
except getopt.GetoptError as err:
|
except getopt.GetoptError as err:
|
||||||
@ -276,13 +276,13 @@ def main():
|
|||||||
elif o in ('-l', '--list'):
|
elif o in ('-l', '--list'):
|
||||||
printtab = True
|
printtab = True
|
||||||
elif o in ('-C', '--cylinders'):
|
elif o in ('-C', '--cylinders'):
|
||||||
cylinders = a
|
cylinders = int(a)
|
||||||
elif o in ('-H', '--heads'):
|
elif o in ('-H', '--heads'):
|
||||||
heads = a
|
heads = int(a)
|
||||||
elif o in ('-S', '--sectors'):
|
elif o in ('-S', '--sectors'):
|
||||||
sectors = a
|
sectors = int(a)
|
||||||
elif o in ('G', '--gs'):
|
elif o in ('G', '--gs'):
|
||||||
gsvers = a
|
gsvers = int(a)
|
||||||
else:
|
else:
|
||||||
assert False, 'Unhandled option'
|
assert False, 'Unhandled option'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user