comparison src/fs.c @ 27:1a64b5645cdd

fix
author mir3636
date Thu, 17 Jan 2019 19:55:30 +0900
parents 36bd61f5c847
children 96a5833d0d82
comparison
equal deleted inserted replaced
26:a146855e16eb 27:1a64b5645cdd
457 { 457 {
458 uint tot, m; 458 uint tot, m;
459 struct buf *bp; 459 struct buf *bp;
460 460
461 if (ip->type == T_DEV) { 461 if (ip->type == T_DEV) {
462 if (ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) { 462 if (ip->major < 0 || ip->major >= NDEV || !cbc_devsw[ip->major].read) {
463 goto next(-1); 463 goto next(-1);
464 } 464 }
465 465
466 goto cbc_devsw[ip->major].read(ip, dst, n); 466 goto cbc_devsw[ip->major].read(ip, dst, n, next);
467 } 467 }
468 468
469 if (off > ip->size || off + n < off) { 469 if (off > ip->size || off + n < off) {
470 goto next(-1); 470 goto next(-1);
471 } 471 }