blob: 677437654713e381c5e67014949cf1a578da1ef9 (
plain) (
tree)
|
|
void test_cmdline(multiboot_info_t *mbd, fs_t *iofs) {
BEGIN_TEST("test-cmdline");
fs_handle_t *f = fs_open(iofs, "/cmdline", FM_READ);
ASSERT(f != 0);
char buf[256];
size_t l = file_read(f, 0, 255, buf);
ASSERT(l > 0);
buf[l] = 0;
unref_file(f);
dbg_printf("Command line as in /cmdline file: '%s'.\n", buf);
ASSERT(strcmp(buf, (char*)mbd->cmdline) == 0);
TEST_OK;
}
#undef TEST_PLACEHOLDER_AFTER_DEVFS
#define TEST_PLACEHOLDER_AFTER_DEVFS { test_cmdline(mbd, iofs); }
/* vim: set ts=4 sw=4 tw=0 noet :*/
|