libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

commit efa781f21e2d0e620c98625201471f612acff318
parent dbe076a6ac464a6481caeec6909efcf7e38fcc15
Author: Kris Maglione <jg@suckless.org>
Date:   Fri,  9 Mar 2007 23:26:54 -0500

Return the full pathname of a failed walk.

Diffstat:
client.c | 5+++--
ixpc.c | 5++---
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/client.c b/client.c @@ -94,14 +94,15 @@ ixp_client_create(IXPClient *c, uint dirfid, char *name, int ixp_client_walk(IXPClient *c, uint newfid, char *filepath) { uint i; - char *wname[IXP_MAX_WELEM]; + char *wname[IXP_MAX_WELEM], *fp; c->ifcall.type = TWALK; c->ifcall.fid = c->root_fid; c->ifcall.newfid = newfid; if(filepath) { // c->ifcall.name = filepath; // tcreate overlaps with twalk !!! - c->ifcall.nwname = ixp_tokenize(wname, IXP_MAX_WELEM, filepath, '/'); // was "c->ifcall.name" + fp = ixp_estrdup(filepath); + c->ifcall.nwname = ixp_tokenize(wname, IXP_MAX_WELEM, fp, '/'); // was "c->ifcall.name" for(i = 0; i < c->ifcall.nwname; i++) c->ifcall.wname[i] = wname[i]; } diff --git a/ixpc.c b/ixpc.c @@ -281,12 +281,11 @@ main(int argc, char *argv[]) { else if(!strncmp(cmd, "write", 6)) ret = xwrite(file, P9OWRITE); else if(!strncmp(cmd, "xwrite", 7)) { - if(i < argc) - ixp_strlcat(buffer, argv[i++], 1023); while(i < argc) { - ixp_strlcat(buffer, " ", 1024); if(ixp_strlcat(buffer, argv[i++], 1024) > 1023) break; + if(i < argc) + ixp_strlcat(buffer, " ", 1024); } ret = xawrite(file, P9OWRITE); }else {