mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-11 13:22:33 +00:00
parent
e5f27b44b5
commit
976f67eee6
@ -16,6 +16,7 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/stdint.h>
|
||||
#include <base/output.h>
|
||||
|
||||
namespace Block {
|
||||
|
||||
@ -41,6 +42,23 @@ struct Block::Operation
|
||||
return type == Type::READ || type == Type::WRITE
|
||||
|| type == Type::SYNC || type == Type::TRIM;
|
||||
}
|
||||
|
||||
static char const *type_name(Type type)
|
||||
{
|
||||
switch (type) {
|
||||
case Type::INVALID: return "INVALID";
|
||||
case Type::READ: return "READ";
|
||||
case Type::WRITE: return "WRITE";
|
||||
case Type::SYNC: return "SYNC";
|
||||
case Type::TRIM: return "TRIM";
|
||||
}
|
||||
return "INVALID";
|
||||
}
|
||||
|
||||
void print(Genode::Output &out) const
|
||||
{
|
||||
Genode::print(out, type_name(type), " block=", block_number, " count=", count);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user