Add more logging

This commit is contained in:
Michal Moskal
2017-07-26 10:43:43 +01:00
parent 9a3eec7d4d
commit 52ef98e249
4 changed files with 9 additions and 3 deletions

View File

@ -93,7 +93,7 @@ void startclient() {
void handleread(int off, int len) {
uint8_t buf[512];
// LOG("read @%d len=%d", off, len);
LOG("read @%d len=%d", off, len);
reply.error = 0; // htonl(EPERM);
writeAll(sock, &reply, sizeof(struct nbd_reply));
for (int i = 0; i < len; ++i) {
@ -104,7 +104,7 @@ void handleread(int off, int len) {
void handlewrite(int off, int len) {
uint8_t buf[512];
// LOG("write @%d len=%d", off, len);
LOG("write @%d len=%d", off, len);
for (int i = 0; i < len; ++i) {
readAll(sock, buf, 512);
write_block(off + i, buf);