forked from OpenSDV/Linux_Kernel_map4vehicle
+to_dg
This commit is contained in:
parent
4821414846
commit
4b9cb2d807
|
@ -407,7 +407,7 @@ def syscalls():
|
|||
# srcxray.py "write_dot(remove_loops(read_dot2('reduced.dot')), 'no-loops.dot')"
|
||||
|
||||
def cleanup(a):
|
||||
dg = read_dot2(a)
|
||||
g = to_dg(a)
|
||||
print(dg.number_of_edges())
|
||||
dg.remove_nodes_from(black_list)
|
||||
print(dg.number_of_edges())
|
||||
|
@ -649,6 +649,13 @@ def read_dot2(dot):
|
|||
return dg
|
||||
|
||||
|
||||
def to_dg(a):
|
||||
if isinstance(a, nx.DiGraph):
|
||||
return a
|
||||
if os.path.isfile(a):
|
||||
return read_dot2(a)
|
||||
|
||||
|
||||
def cflow_linux():
|
||||
dirs = ('init kernel kernel/time '
|
||||
'fs fs/ext4 block '
|
||||
|
|
Loading…
Reference in New Issue