~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to nbd/client.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
778
778
    ssize_t ret;
779
779
 
780
780
    ret = read_sync(ioc, buf, sizeof(buf));
781
 
    if (ret < 0) {
 
781
    if (ret <= 0) {
782
782
        return ret;
783
783
    }
784
784
 
812
812
        LOG("invalid magic (got 0x%" PRIx32 ")", magic);
813
813
        return -EINVAL;
814
814
    }
815
 
    return 0;
 
815
    return sizeof(buf);
816
816
}
817
817