44#
55
66from qiling .os .uefi .const import EFI_SUCCESS , EFI_NOT_FOUND , EFI_UNSUPPORTED , EFI_BUFFER_TOO_SMALL , EFI_INVALID_PARAMETER
7- from qiling .os .uefi .context import UefiContext
87from qiling .os .uefi .utils import read_int64 , write_int64
98from qiling .os .uefi .UefiSpec import EFI_LOCATE_SEARCH_TYPE
109
11- def LocateHandles (context : UefiContext , params ):
10+ def LocateHandles (context , params ):
1211 SearchType = params ["SearchType" ]
1312 Protocol = params ["Protocol" ]
1413
@@ -25,7 +24,7 @@ def LocateHandles(context: UefiContext, params):
2524
2625 return len (handles ) * context .ql .pointersize , handles
2726
28- def InstallProtocolInterface (context : UefiContext , params ):
27+ def InstallProtocolInterface (context , params ):
2928 handle = read_int64 (context .ql , params ["Handle" ])
3029
3130 if handle == 0 :
@@ -41,7 +40,7 @@ def InstallProtocolInterface(context: UefiContext, params):
4140
4241 return EFI_SUCCESS
4342
44- def ReinstallProtocolInterface (context : UefiContext , params ):
43+ def ReinstallProtocolInterface (context , params ):
4544 handle = params ["Handle" ]
4645
4746 if handle not in context .protocols :
@@ -57,7 +56,7 @@ def ReinstallProtocolInterface(context: UefiContext, params):
5756
5857 return EFI_SUCCESS
5958
60- def UninstallProtocolInterface (context : UefiContext , params ):
59+ def UninstallProtocolInterface (context , params ):
6160 handle = params ["Handle" ]
6261
6362 if handle not in context .protocols :
@@ -73,7 +72,7 @@ def UninstallProtocolInterface(context: UefiContext, params):
7372
7473 return EFI_SUCCESS
7574
76- def HandleProtocol (context : UefiContext , params ):
75+ def HandleProtocol (context , params ):
7776 handle = params ["Handle" ]
7877 protocol = params ["Protocol" ]
7978 interface = params ['Interface' ]
@@ -88,7 +87,7 @@ def HandleProtocol(context: UefiContext, params):
8887
8988 return EFI_UNSUPPORTED
9089
91- def LocateHandle (context : UefiContext , params ):
90+ def LocateHandle (context , params ):
9291 buffer_size , handles = LocateHandles (context , params )
9392
9493 if len (handles ) == 0 :
@@ -109,7 +108,7 @@ def LocateHandle(context: UefiContext, params):
109108
110109 return ret
111110
112- def LocateProtocol (context : UefiContext , params ):
111+ def LocateProtocol (context , params ):
113112 protocol = params ['Protocol' ]
114113
115114 for handle , guid_dic in context .protocols .items ():
@@ -123,7 +122,7 @@ def LocateProtocol(context: UefiContext, params):
123122
124123 return EFI_NOT_FOUND
125124
126- def InstallConfigurationTable (context : UefiContext , params ):
125+ def InstallConfigurationTable (context , params ):
127126 guid = params ["Guid" ]
128127 table = params ["Table" ]
129128
0 commit comments