/** * \file * * * \brief KFile interface over debug. * * \author Francesco Sacchi */ #include "kfile_debug.h" #include #include static size_t kfiledebug_write(struct KFile *_fd, const void *buf, size_t size) { KFILEDEBUG_CAST(_fd); kprintf("%.*s", (int)size, (const char *)buf); return size; } void kfiledebug_init(KFileDebug *kd) { ASSERT(kd); memset(kd, 0, sizeof(*kd)); kfile_init(&kd->fd); kd->fd.write = kfiledebug_write; DB(kd->fd._type = KFT_KFILEDEBUG); }