This commit is contained in:
Baptiste Wicht 2014-03-11 22:28:38 +01:00
parent d1e190a0f4
commit 8c9ba4f38b
2 changed files with 18 additions and 3 deletions

View File

@ -1179,7 +1179,7 @@ std::pair<bool, uint32_t> fat32::fat32_file_system::find_cluster_number(const st
}
if(!found){
k_print_line(1);
k_print_line(99);
return std::make_pair(false, 0);
}
}

View File

@ -7,6 +7,7 @@
#include "logging.hpp"
#include "assert.hpp"
#include "console.hpp"
#include "vfs/vfs.hpp"
#include <flags.hpp>
@ -58,6 +59,8 @@ void logging::finalize(){
void logging::to_file(){
//Starting from there, the messages will be sent to the log file
file = true;
//TODO Append all early messages
}
void logging::log(const char* s){
@ -74,8 +77,20 @@ void logging::log(const char* s){
}
}
void logging::logf(const char* s, ...){
//TODO
void logging::logf(const char* format, ...){
thor_assert(!is_early(), "log(string) in only valid in normal mode");
thor_assert(is_file(), "log(string) in only valid file mode");
//TODO Display the string in the kernel terminal
va_list va;
va_start(va, format);
auto s = vsprintf(format, va);
va_end(va);
append_to_file(s.c_str(), s.size());
}
void logging::log(const std::string& s){