18 msg (
"creating /0/0/0/0 through /%d/%d/%d/%d...",
19 at - 1, bt - 1, ct - 1, dt - 1);
21 for (a = 0; a < at; a++)
24 for (b = 0; b < bt; b++)
27 for (c = 0; c < ct; c++)
30 for (d = 0; d < dt; d++)
31 do_touch (
"/%d/%d/%d/%d", a, b, c, d);
37 snprintf (
try,
sizeof try,
"/%d/%d/%d/%d", 0, bt - 1, 0, dt - 1);
38 CHECK ((fd =
open (
try)) > 1,
"open \"%s\"",
try);
39 msg (
"close \"%s\"",
try);
#define PRINTF_FORMAT(FMT, FIRST)
int vsnprintf(char *buffer, size_t buf_size, const char *format, va_list args)
Like vprintf(), except that output is stored into BUFFER, which must have space for BUF_SIZE characte...
int snprintf(char *buffer, size_t buf_size, const char *format,...)
Like printf(), except that output is stored into BUFFER, which must have space for BUF_SIZE character...
bool create(const char *file, unsigned initial_size)
int open(const char *file)
bool mkdir(const char *dir)
void msg(const char *format,...)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
static void do_mkdir(const char *format,...) PRINTF_FORMAT(1
Library function for creating a tree of directories.
static void static void void make_tree(int at, int bt, int ct, int dt)
tests/filesys/extended/mk-tree.h
static void static void do_touch(const char *format,...) PRINTF_FORMAT(1
#define va_start(LIST, ARG)
__builtin_va_list va_list
GCC has <stdarg.h> functionality as built-ins, so all we need is to use it.