mirror of
git://projects.qi-hardware.com/iris.git
synced 2025-04-21 12:27:27 +03:00
almost working
This commit is contained in:
@@ -133,11 +133,6 @@ static void list_files (Directory root):
|
||||
for unsigned i = 0; i < num_files; ++i:
|
||||
String n = root.get_name (i)
|
||||
n.get_chars (0, files[i].name)
|
||||
kdebug ("file: ")
|
||||
for unsigned j = 0; j < 16; ++j:
|
||||
if files[i].name[j] != 0:
|
||||
kdebug_char (files[i].name[j])
|
||||
kdebug_char ('\n')
|
||||
Kernel::free_cap (n)
|
||||
Kernel::set_recv_arg (Kernel::Cap (slot, i))
|
||||
files[i].string = root.get_file_ro (i)
|
||||
@@ -326,6 +321,13 @@ static void run (file *f, bool priv):
|
||||
Kernel::free_cap (parent)
|
||||
Kernel::free_cap (caps)
|
||||
|
||||
static void kdebug_name (char const *t, file *f):
|
||||
kdebug (t)
|
||||
for unsigned j = 0; j < 16; ++j:
|
||||
if f->name[j] != 0:
|
||||
kdebug_char (f->name[j])
|
||||
kdebug ("...")
|
||||
|
||||
Kernel::Num start ():
|
||||
// Wait for the debugging device to be active, in case there is one.
|
||||
Kernel::schedule ()
|
||||
@@ -339,7 +341,10 @@ Kernel::Num start ():
|
||||
slot = caps.use ()
|
||||
mapping = alloc_space (max_pages)
|
||||
for unsigned i = 0; i < num_files; ++i:
|
||||
kdebug_name ("loading ", &files[index[i]])
|
||||
run (&files[index[i]], files[index[i]].name[0] == '#')
|
||||
kdebug ("running\n")
|
||||
Kernel::schedule ()
|
||||
root.unlock_ro ()
|
||||
Kernel::free_slot (slot)
|
||||
Kernel::my_memory.destroy (caps)
|
||||
|
||||
Reference in New Issue
Block a user