blob: aa32db7f14232733d4b893f4ac4489dc7b048721 [file] [log] [blame]
#include <u.h>
#define NOPLAN9DEFINES
#include <libc.h>
long
p9write(int f, void *av, long n)
{
char *a;
long m, t;
a = av;
t = 0;
while(t < n){
m = write(f, a+t, n-t);
if(m <= 0){
if(t == 0)
return m;
break;
}
t += m;
}
return t;
}