hmi/console: fix Qroot listing

This commit is contained in:
Giacomo Tesio 2017-11-02 00:37:24 +01:00
parent 1639097200
commit dcbea5d48d
1 changed files with 4 additions and 3 deletions

View File

@ -179,13 +179,14 @@ static int
sendmessage(int fd, Fcall *rep) sendmessage(int fd, Fcall *rep)
{ {
int n; int n;
static uint8_t repdata[Maxiosize];
n = convS2M(rep, data, Maxiosize); n = convS2M(rep, repdata, Maxiosize);
if(n == 0) { if(n == 0) {
debug("sendmessage: convS2M error\n"); debug("sendmessage: convS2M error\n");
return 0; return 0;
} }
if(write(fd, data, n) != n) { if(write(fd, repdata, n) != n) {
debug("sendmessage: write\n"); debug("sendmessage: write\n");
return 0; return 0;
} }
@ -994,7 +995,7 @@ fsserve(int connection, char *owner)
if(owner == nil) if(owner == nil)
sysfatal("owner undefined"); sysfatal("owner undefined");
filesowner = owner; filesowner = strdup(owner);
fspid = getpid(); fspid = getpid();
req = malloc(sizeof(Fcall)+Maxfdata); req = malloc(sizeof(Fcall)+Maxfdata);