diff options
author | Tim Prouty <tprouty@samba.org> | 2009-08-28 22:53:05 +0000 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-09-24 10:59:33 -0700 |
commit | 86b1a4cb868ee646326bff8b5c3ba807fb0556be (patch) | |
tree | 9dd85997d9a44c1a3da3e2a4787a929ac5a884a6 /source3/modules | |
parent | 32ee9767088fcd395e1f1a22d781d33b076aa78b (diff) | |
download | samba-86b1a4cb868ee646326bff8b5c3ba807fb0556be.tar.gz samba-86b1a4cb868ee646326bff8b5c3ba807fb0556be.tar.bz2 samba-86b1a4cb868ee646326bff8b5c3ba807fb0556be.zip |
s3: Add more helpful debugging to some of the streams code
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/onefs_streams.c | 23 | ||||
-rw-r--r-- | source3/modules/onefs_system.c | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/source3/modules/onefs_streams.c b/source3/modules/onefs_streams.c index da2666130c..fa65b51996 100644 --- a/source3/modules/onefs_streams.c +++ b/source3/modules/onefs_streams.c @@ -71,6 +71,13 @@ NTSTATUS onefs_stream_prep_smb_fname(TALLOC_CTX *ctx, stream_name, &smb_fname_in->st, smb_fname_out); TALLOC_FREE(stream_name); + + if (!NT_STATUS_IS_OK(status)) { + DEBUG(5, ("Failed to prep stream name for %s: %s\n", + *smb_fname_out ? + smb_fname_str_dbg(*smb_fname_out) : "NULL", + nt_errstr(status))); + } return status; } @@ -96,6 +103,9 @@ static int get_stream_dir_fd(connection_struct *conn, const char *base, int dir_fd; int saved_errno; + DEBUG(10, ("Getting stream directory fd: %s (%d)\n", base, + base_fdp ? *base_fdp : -1)); + /* If a valid base_fdp was given, use it. */ if (base_fdp && *base_fdp >= 0) { base_fd = *base_fdp; @@ -115,6 +125,8 @@ static int get_stream_dir_fd(connection_struct *conn, const char *base, 0, NULL); if (base_fd < 0) { + DEBUG(5, ("Failed getting base fd: %s\n", + strerror(errno))); return -1; } } @@ -147,6 +159,11 @@ static int get_stream_dir_fd(connection_struct *conn, const char *base, *base_fdp = base_fd; } + if (dir_fd < 0) { + DEBUG(5, ("Failed getting stream directory fd: %s\n", + strerror(errno))); + } + return dir_fd; } @@ -173,6 +190,9 @@ int onefs_rename(vfs_handle_struct *handle, /* For now don't allow renames from or to the default stream. */ if (is_ntfs_default_stream_smb_fname(smb_fname_src) || is_ntfs_default_stream_smb_fname(smb_fname_dst)) { + DEBUG(3, ("Unable to rename to/from a default stream: %s -> " + "%s\n", smb_fname_str_dbg(smb_fname_src), + smb_fname_str_dbg(smb_fname_dst))); errno = ENOSYS; goto done; } @@ -311,6 +331,9 @@ static int stat_stream(struct connection_struct *conn, const char *base, /* Stat the stream. */ ret = onefs_sys_fstat_at(dir_fd, stream, sbuf, flags); if (ret != -1) { + DEBUG(10, ("stat of stream '%s' failed: %s\n", stream, + strerror(errno))); + } else { /* Now stat the base file and merge the results. */ ret = onefs_sys_fstat(base_fd, &base_sbuf); if (ret != -1) { diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c index e3edc81608..33bec2658b 100644 --- a/source3/modules/onefs_system.c +++ b/source3/modules/onefs_system.c @@ -178,7 +178,7 @@ int onefs_sys_create_file(connection_struct *conn, open_access_mask)); } - DEBUG(10,("onefs_sys_create_file: base_fd = %d, fname = %s" + DEBUG(10,("onefs_sys_create_file: base_fd = %d, fname = %s " "open_access_mask = 0x%x, flags = 0x%x, mode = 0%o, " "desired_oplock = %s, id = 0x%x, secinfo = 0x%x, sd = %p, " "dos_attributes = 0x%x, path = %s, " |