func: static void v9fs_rename(void *opaque) int32_t fid ; size_t offset = 7 ; int32_t newdirfid ; V9fsFidState * fidp ; V9fsPDU * pdu = opaque ; err = pdu_unmarshal ( pdu , offset , "dds" , & fid , & newdirfid , & name ); if ( err < 0 )  fidp = get_fid ( pdu , fid ); static V9fsFidState *get_fid(V9fsPDU *pdu, int32_t fid) int err ; V9fsFidState * f ; V9fsState * s = pdu -> s ; for (f = s->fid_list; f; f = f->next) if ( f -> fid == fid )  f -> ref ++; err = v9fs_reopen_fid ( pdu , f ); if ( err < 0 )  return NULL ; return f ; return NULL ; if ( fidp == NULL )  if ( ! ( pdu -> s -> ctx . export_flags & V9FS_PATHNAME_FSCONTEXT ) )  err = v9fs_complete_rename ( pdu , fidp , newdirfid , & name ); static int v9fs_complete_rename(V9fsPDU *pdu, V9fsFidState int32_t newdirfid, V9fsString *name) char * end ; char * old_name , * new_name ; if ( newdirfid != - 1 )  old_name = fidp -> path . data; end = strrchr ( old_name , '/' ); if ( end )  end ++; end = old_name; new_name = g_malloc0 ( end - old_name + name -> size + 1 ); strncat ( new_name , old_name , end - old_name ); strncat ( new_name + ( end - old_name ) , name -> data , name -> size ); v9fs_co_name_to_path ( pdu , NULL , new_name , & new_path ); g_free ( new_name ); 