Don't touch the GUID record.
This commit is contained in:
parent
d406727685
commit
33712e9800
1 changed files with 10 additions and 6 deletions
|
|
@ -12,13 +12,9 @@ def machine_id_rec_value(b):
|
||||||
b = b + b'\0' * (0x94 - len(b))
|
b = b + b'\0' * (0x94 - len(b))
|
||||||
return pack('<HH', 0x102, len(b)) + b # 0x102 = Machine ID/GUID?
|
return pack('<HH', 0x102, len(b)) + b # 0x102 = Machine ID/GUID?
|
||||||
|
|
||||||
|
# This function is unused. It simply describes the Windows driver behavior.
|
||||||
# TODO: make this GUID unique!
|
# TODO: make this GUID unique!
|
||||||
def init_db(machine_guid='e7260876-58db-4d27-8c40-8d13110d6a71'):
|
def init_machine_guid(machine_guid='e7260876-58db-4d27-8c40-8d13110d6a71'):
|
||||||
stg = db.get_user_storage(name='StgWindsor')
|
|
||||||
if stg == None:
|
|
||||||
logging.info('Creating a new user storage object')
|
|
||||||
db.new_user_storate()
|
|
||||||
|
|
||||||
rc = db.get_storage_data()
|
rc = db.get_storage_data()
|
||||||
|
|
||||||
if rc == []:
|
if rc == []:
|
||||||
|
|
@ -35,3 +31,11 @@ def init_db(machine_guid='e7260876-58db-4d27-8c40-8d13110d6a71'):
|
||||||
b=b.decode('utf-16le')
|
b=b.decode('utf-16le')
|
||||||
raise Exception('Machine GUID does not match the DB flash ownership record (%s).' % b)
|
raise Exception('Machine GUID does not match the DB flash ownership record (%s).' % b)
|
||||||
|
|
||||||
|
def init_db():
|
||||||
|
stg = db.get_user_storage(name='StgWindsor')
|
||||||
|
if stg == None:
|
||||||
|
logging.info('Creating a new user storage object')
|
||||||
|
db.new_user_storate()
|
||||||
|
|
||||||
|
#init_machine_guid()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue