Lines Matching defs:ret
141 int fd, ret = -1;
156 ret = blk_dev_size;
204 ret = 0;
207 return ret;
496 int ret;
500 ret = pread(bd->dev_fd, buf, bd->sector_size, offset);
501 if (ret < 0) {
528 int ret = 0;
542 ret = exfat_write_sector(bd, checksum_buf, sec_idx);
543 if (ret) {
550 return ret;
556 int ret;
565 ret = exfat_read(fd, (char *)ppbr, EXFAT_MAX_SECTOR_SIZE, 0);
566 if (ret < 0) {
568 ret = -1;
574 ret = -1;
582 return ret;
588 int ret, sec_idx, backup_sec_idx = 0;
603 ret = exfat_read_sector(bd, buf, sec_idx + backup_sec_idx);
604 if (ret < 0) {
606 ret = -1;
617 ret = exfat_write_checksum_sector(bd, checksum, is_backup);
622 return ret;
628 int ret;
638 ret = exfat_read(bd->dev_fd, (char *)ppbr, EXFAT_MAX_SECTOR_SIZE,
640 if (ret < 0) {
642 ret = -1;
648 ret = -1;
656 ret = exfat_write_sector(bd, (char *)ppbr, BOOT_SEC_IDX);
657 if (ret < 0) {
659 ret = -1;
664 ret = exfat_write_sector(bd, (char *)ppbr, BACKUP_BOOT_SEC_IDX);
665 if (ret < 0) {
667 ret = -1;
671 ret = exfat_update_boot_checksum(bd, 0);
672 if (ret < 0) {
677 ret = exfat_update_boot_checksum(bd, 1);
678 if (ret < 0)
685 return ret;