Hi,

On Wed, 27 Jul 2005, lepton wrote:

> +    while(1){
> +     ret = read(s->fd, buf, nb_sectors * 512);
> +     if (ret != nb_sectors * 512) {
> +             if(ret==-1 && errno==EINTR)
> +                     continue;
> +             else
> +                     return -1;
> +     }
> +     return 0;
> +    }

Why not

do {
        ret = read(s->fd, buf, nb_sectors * 512);
} while(ret==-1 && errno=EINTR);

if (ret != nb_sectors * 512)
        return -1;
return 0;

Ciao,
Dscho



_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to