215 PFILE_RENAME_INFO
rename = (PFILE_RENAME_INFO)
args->buf;
222 src_name = &
state->file.name;
224 if (
rename->FileNameLength == 0) {
242 &
state->parent, src_name,
243 &dst_dir, &dst_name);
245 dprintf(1,
"nfs41_rename() failed with error %s.\n",
258 if (dst_path.len == 0) {
259 eprintf(
"WideCharToMultiByte failed to convert destination " 260 "filename %S.\n",
rename->FileName);
268 &dst_path, &dst_dir, &
dst,
NULL, &dst_session);
279 eprintf(
"nfs41_symlink_target() for %s failed with %d\n",
286 &dst_path, &dst_dir,
NULL,
NULL, &dst_session);
290 last_component(dst_path.path, dst_path.path + dst_path.len, &dst_name);
294 if (!
rename->ReplaceIfExists) {
302 dprintf(1,
"nfs41_lookup('%s') failed to find destination " 303 "directory with %d\n", dst_path.path,
status);
320 eprintf(
"handle_nfs41_rename: %s is opened\n", dst_path.path);
330 &
state->parent, src_name,
331 &dst_dir, &dst_name);
333 dprintf(1,
"nfs41_rename() failed with error %s.\n",
#define ERROR_INVALID_PARAMETER
#define ERROR_FILE_EXISTS
int nfs_to_windows_error(int status, int default_error)
int nfs41_symlink_target(IN nfs41_session *session, IN nfs41_path_fh *file, OUT nfs41_abs_path *target)
#define WideCharToMultiByte
struct __nfs41_superblock * superblock
int nfs41_lookup(IN nfs41_root *root, IN nfs41_session *session, IN OUT nfs41_abs_path *path_inout, OUT OPTIONAL nfs41_path_fh *parent_out, OUT OPTIONAL nfs41_path_fh *target_out, OUT OPTIONAL nfs41_file_info *info_out, OUT nfs41_session **session_out)
void eprintf(LPCSTR format,...)
int nfs41_rename(IN nfs41_session *session, IN nfs41_path_fh *src_dir, IN const nfs41_component *src_name, IN nfs41_path_fh *dst_dir, IN const nfs41_component *dst_name)
bool_t last_component(IN const char *path, IN const char *path_end, OUT nfs41_component *component)
#define NFS41_MAX_PATH_LEN
void abs_path_copy(OUT nfs41_abs_path *dst, IN const nfs41_abs_path *src)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
_Check_return_ int __cdecl rename(_In_z_ const char *_OldFilename, _In_z_ const char *_NewFilename)
#define ERROR_ACCESS_DENIED
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
static void open_state_rename(OUT nfs41_open_state *state, IN const nfs41_abs_path *path)
void path_fh_init(OUT nfs41_path_fh *file, IN nfs41_abs_path *path)
#define ERROR_FILE_NOT_FOUND
int nfs41_delegation_return(IN nfs41_session *session, IN nfs41_path_fh *file, IN enum open_delegation_type4 access, IN bool_t truncate)
static int is_dst_name_opened(nfs41_abs_path *dst_path, nfs41_session *dst_session)
const char * nfs_error_string(int status)
static __inline nfs41_session * nfs41_root_session(IN nfs41_root *root)
int create_silly_rename(IN nfs41_abs_path *path, IN const nfs41_fh *fh, OUT nfs41_component *silly)
void fh_copy(OUT nfs41_fh *dst, IN const nfs41_fh *src)
GLint GLint GLsizei GLsizei GLsizei depth
#define ERROR_TOO_MANY_LINKS
#define NFS41_MAX_SYMLINK_DEPTH
#define ERROR_NOT_SAME_DEVICE
char path[NFS41_MAX_PATH_LEN]
static SERVICE_STATUS status
VOID WINAPI ReleaseSRWLockShared(PSRWLOCK Lock)