Plan B User's Manual


make ­ Makes a box.


#include <ulib.h>

void make(char* sel, char* l, Stat *i)
void maken(char* sel)


Make creates a new box named and constrained by sel. Usually, only sel has to be specified and the constraint carries just the type for the box being created. maken is supplied as a convenience and is equivalent to
make(sel, nil, nil) .

If the parameter l is supplied, it identifies a box whose constraint is like the one to be made. It is intended to allow the creation of a box with a constraint matching the one of a given box.

The Stat structure can be supplied to set initial information for the box created.

If both s and l carry constraints, they must

match as said in intro(1).


make("/b/mem/x", nil, &st);
make("/b/mem/x!text", nil, &st);
make("/b/proc/x!bin!%", "/bin/x", nil);

The first one creates /b/mem/x with default type, constraint and other information (as decided by default mem(4) values ). The second one, supplies an Stat structure to set up initial permissions. The third one requests the box to be of type text. The last one creates /b/proc/x such that its type would be

bin and its architecture would match that of a box named /bin/x.



See also

intro(2), and mk(1).

Plan B User's Manual. First edition.