func: static void v9fs_walk(void *opaque) int name_idx ; V9fsPath dpath , path ; uint16_t nwnames ; size_t offset = 7 ; int32_t fid , newfid ; V9fsString * wnames = NULL ; V9fsFidState * fidp ; V9fsPDU * pdu = opaque ; V9fsState * s = pdu -> s ; err = pdu_unmarshal ( pdu , offset , "ddw" , & fid , & newfid , & nwnames ); if ( err < 0 )  offset += err; if ( nwnames && nwnames <= P9_MAXWELEM )  wnames = g_malloc0 ( sizeof ( wnames [ 0 ] ) * nwnames ); for (i = 0; i < nwnames; i++) err = pdu_unmarshal ( pdu , offset , "s" , & wnames [ i ] ); if ( err < 0 )  offset += err; if ( nwnames > P9_MAXWELEM )  fidp = get_fid ( pdu , fid ); if ( fidp == NULL )  for (name_idx = 0; name_idx < nwnames; name_idx++) err = v9fs_co_name_to_path ( pdu , & dpath , wnames [ name_idx ] . data , & path ); if ( err < 0 )  err = v9fs_co_lstat ( pdu , & path , & stbuf ); if ( err < 0 )  if ( fid == newfid )  newfidp = alloc_fid ( s , newfid ); static V9fsFidState *alloc_fid(V9fsState *s, int32_t fid) V9fsFidState * f ; for (f = s->fid_list; f; f = f->next) if ( f -> fid == fid )  return NULL ; f = g_malloc0 ( sizeof ( V9fsFidState ) ); f -> fid = fid; f -> fid_type = P9_FID_NONE; f -> ref = 1; f -> flags |= FID_REFERENCED; f -> next = s -> fid_list; return f ; if ( newfidp == NULL )  newfidp -> uid = fidp -> uid; v9fs_path_copy ( & newfidp -> path , & path ); void v9fs_path_copy(V9fsPath *lhs, V9fsPath *rhs) lhs -> data = g_malloc ( rhs -> size ); memcpy ( lhs -> data , rhs -> data , rhs -> size ); lhs -> size = rhs -> size; 