comparison utility/fsGen.py @ 100:d8f21e4a75e3

Added a simple program that is just an infinite loop The heap now starts at 8MB I now try to set the context to the loaded program when it is called in the shell script
author Jonathan Pevarnek <pevarnj@gmail.com>
date Thu, 19 May 2011 09:40:10 -0400
parents 2a0aa3efc228
children
comparison
equal deleted inserted replaced
99:2a0aa3efc228 100:d8f21e4a75e3
115 t = rand_block() 115 t = rand_block()
116 fb.append(t) 116 fb.append(t)
117 blocks[t] = y 117 blocks[t] = y
118 118
119 i = make_inode(l, fb) 119 i = make_inode(l, fb)
120 foo, bar, fn = fn.rpartition('/')
120 d += (fn + (" " * (28 - len(fn)))) + word(i) 121 d += (fn + (" " * (28 - len(fn)))) + word(i)
121 122
122 db = rand_block() 123 db = rand_block()
123 blocks[db] = pad_block(d) 124 blocks[db] = pad_block(d)
124 ri = make_inode(len(d), [db,]) 125 ri = make_inode(len(d), [db,])
134 if k not in blocks: 135 if k not in blocks:
135 sys.stdout.write(pad_block()) 136 sys.stdout.write(pad_block())
136 else: 137 else:
137 assert (len(blocks[k]) == BLOCK_SIZE) 138 assert (len(blocks[k]) == BLOCK_SIZE)
138 sys.stdout.write(blocks[k]) 139 sys.stdout.write(blocks[k])
140
141 # vim: set noexpandtab: