diff options
| author | forsyth <forsyth@vitanuova.com> | 2011-12-15 16:40:16 +0000 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2011-12-15 16:40:16 +0000 |
| commit | 28942ead413418b56c5be78e8c4c400881fba72e (patch) | |
| tree | cd646dce007974acc02e535a2c9ff800ada2b684 /liblogfs/srv.c | |
| parent | 1eacf117f57c983da30e88f232fab9db7b1e300d (diff) | |
20111215-1640
Diffstat (limited to 'liblogfs/srv.c')
| -rw-r--r-- | liblogfs/srv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/liblogfs/srv.c b/liblogfs/srv.c index efb590d3..610ca9a1 100644 --- a/liblogfs/srv.c +++ b/liblogfs/srv.c @@ -1,4 +1,4 @@ -#include "lib9.h" +#include "logfsos.h" #include "logfs.h" #include "fcall.h" #include "local.h" @@ -260,23 +260,23 @@ logfsflattenentry(LogfsIdentityStore *is, uchar *buf, u32int limit, Entry *e) PBIT32(p, e->u.file.length); p += BIT32SZ; PBIT32(p, 0); p += BIT32SZ; } - /* name */ PBIT16(p, namelen); p += BIT16SZ; memcpy(p, e->name, namelen); p+= namelen; + /* name */ PBIT16(p, namelen); p += BIT16SZ; memmove(p, e->name, namelen); p+= namelen; /* uid */ PBIT16(p, unamelen + unamebad); p += BIT16SZ; if(unamebad) *p++ = '('; - memcpy(p, uname, unamelen + unamebad); p+= unamelen; + memmove(p, uname, unamelen + unamebad); p+= unamelen; if(unamebad) *p++ = ')'; /* gid */ PBIT16(p, gnamelen + gnamebad); p += BIT16SZ; if(gnamebad) *p++ = '('; - memcpy(p, gname, gnamelen); p+= gnamelen; + memmove(p, gname, gnamelen); p+= gnamelen; if(gnamebad) *p++ = ')'; /* muid */ PBIT16(p, munamelen + munamebad); p += BIT16SZ; if(munamebad) *p++ = '('; - memcpy(p, muname, munamelen); p+= munamelen; + memmove(p, muname, munamelen); p+= munamelen; if(munamebad) *p = ')'; //print("len %ud p - buf %ld\n", len, p - buf); @@ -296,7 +296,7 @@ logfsserverstat(LogfsServer *server, u32int fid, uchar *buf, u32int bufsize, ush return Eio; *nstat = logfsflattenentry(server->is, buf, bufsize, f->entry); if(*nstat == 0) - return Emsgsize; + return Eshortstat; return nil; } |
