Add more logging
This commit is contained in:
parent
9a3eec7d4d
commit
52ef98e249
@ -38,7 +38,7 @@
|
|||||||
// Keep Eclipse happy
|
// Keep Eclipse happy
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
#undef dev_vdbg
|
#undef dev_vdbg
|
||||||
#undef dev_dbg
|
#undef dev_dbg
|
||||||
#define dev_vdbg(d, args...) printk(args)
|
#define dev_vdbg(d, args...) printk(args)
|
||||||
|
@ -733,6 +733,9 @@ static int do_read(struct fsg_common *common)
|
|||||||
|
|
||||||
/* Carry out the file reads */
|
/* Carry out the file reads */
|
||||||
amount_left = common->data_size_from_cmnd;
|
amount_left = common->data_size_from_cmnd;
|
||||||
|
|
||||||
|
LDBG(curlun, "Uread off=%d cnt=%d\n", (int)lba, amount_left);
|
||||||
|
|
||||||
if (unlikely(amount_left == 0))
|
if (unlikely(amount_left == 0))
|
||||||
return -EIO; /* No default reply */
|
return -EIO; /* No default reply */
|
||||||
|
|
||||||
@ -881,6 +884,8 @@ static int do_write(struct fsg_common *common)
|
|||||||
amount_left_to_req = common->data_size_from_cmnd;
|
amount_left_to_req = common->data_size_from_cmnd;
|
||||||
amount_left_to_write = common->data_size_from_cmnd;
|
amount_left_to_write = common->data_size_from_cmnd;
|
||||||
|
|
||||||
|
LDBG(curlun, "Uwrite off=%d cnt=%d\n", (int)lba, amount_left_to_req);
|
||||||
|
|
||||||
while (amount_left_to_write > 0) {
|
while (amount_left_to_write > 0) {
|
||||||
|
|
||||||
/* Queue a request for more data from the host */
|
/* Queue a request for more data from the host */
|
||||||
|
@ -6,4 +6,5 @@ ev3duder up bin/nbd.ko ../prjs/ko/nbd.ko
|
|||||||
ev3duder up ins ../prjs/ko/ins
|
ev3duder up ins ../prjs/ko/ins
|
||||||
ev3duder exec 'rm ../prjs/ko/uf2d'
|
ev3duder exec 'rm ../prjs/ko/uf2d'
|
||||||
ev3duder up bin/uf2d ../prjs/ko/uf2d
|
ev3duder up bin/uf2d ../prjs/ko/uf2d
|
||||||
|
#ev3duder exec 'echo . /mnt/ramdisk/prjs/ko/ins > /mnt/ramdisk/rc.local'
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void startclient() {
|
|||||||
|
|
||||||
void handleread(int off, int len) {
|
void handleread(int off, int len) {
|
||||||
uint8_t buf[512];
|
uint8_t buf[512];
|
||||||
// LOG("read @%d len=%d", off, len);
|
LOG("read @%d len=%d", off, len);
|
||||||
reply.error = 0; // htonl(EPERM);
|
reply.error = 0; // htonl(EPERM);
|
||||||
writeAll(sock, &reply, sizeof(struct nbd_reply));
|
writeAll(sock, &reply, sizeof(struct nbd_reply));
|
||||||
for (int i = 0; i < len; ++i) {
|
for (int i = 0; i < len; ++i) {
|
||||||
@ -104,7 +104,7 @@ void handleread(int off, int len) {
|
|||||||
|
|
||||||
void handlewrite(int off, int len) {
|
void handlewrite(int off, int len) {
|
||||||
uint8_t buf[512];
|
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) {
|
for (int i = 0; i < len; ++i) {
|
||||||
readAll(sock, buf, 512);
|
readAll(sock, buf, 512);
|
||||||
write_block(off + i, buf);
|
write_block(off + i, buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user