s3:vfs_default: use fsp_fnum_dbg() for fsp->fnum logging.
authorMichael Adam <obnox@samba.org>
Thu, 14 Jun 2012 10:37:21 +0000 (12:37 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 15 Jun 2012 01:28:14 +0000 (03:28 +0200)
Note: it is actually wrong to access the fsp->fnum at all here,
since the fnum is part of the smb layer that should not be used
in the vfs layer. But this is subject be separated more cleanly
in later commits. This change only unifies the logging of fsp->fnum.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/modules/vfs_default.c

index a39e10a12922b5cb32e76504a407f8b94b96ccf5..b387cce109fdcbe640f427f82de8e51cae0c8c85 100644 (file)
@@ -819,7 +819,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
                 * I think I'll make this be the inode+dev. JRA.
                 */
 
-               DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on FID[0x%04X]\n",fsp->fnum));
+               DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on %s\n",
+                         fsp_fnum_dbg(fsp)));
 
                *out_len = (max_out_len >= 64) ? 64 : max_out_len;
                /* Hmmm, will this cause problems if less data asked for? */
@@ -839,14 +840,16 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
        case FSCTL_GET_REPARSE_POINT:
        {
                /* Fail it with STATUS_NOT_A_REPARSE_POINT */
-               DEBUG(10, ("FSCTL_GET_REPARSE_POINT: called on FID[0x%04X] Status: NOT_IMPLEMENTED\n", fsp->fnum));
+               DEBUG(10, ("FSCTL_GET_REPARSE_POINT: called on %s. "
+                          "Status: NOT_IMPLEMENTED\n", fsp_fnum_dbg(fsp)));
                return NT_STATUS_NOT_A_REPARSE_POINT;
        }
 
        case FSCTL_SET_REPARSE_POINT:
        {
                /* Fail it with STATUS_NOT_A_REPARSE_POINT */
-               DEBUG(10, ("FSCTL_SET_REPARSE_POINT: called on FID[0x%04X] Status: NOT_IMPLEMENTED\n", fsp->fnum));
+               DEBUG(10, ("FSCTL_SET_REPARSE_POINT: called on %s. "
+                          "Status: NOT_IMPLEMENTED\n", fsp_fnum_dbg(fsp)));
                return NT_STATUS_NOT_A_REPARSE_POINT;
        }
 
@@ -967,7 +970,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
                uid_t uid;
                size_t sid_len;
 
-               DEBUG(10,("FSCTL_FIND_FILES_BY_SID: called on FID[0x%04X]\n", fsp->fnum));
+               DEBUG(10, ("FSCTL_FIND_FILES_BY_SID: called on %s\n",
+                          fsp_fnum_dbg(fsp)));
 
                if (in_len < 8) {
                        /* NT_STATUS_BUFFER_TOO_SMALL maybe? */
@@ -1079,8 +1083,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
 
        case FSCTL_IS_VOLUME_DIRTY:
        {
-               DEBUG(10,("FSCTL_IS_VOLUME_DIRTY: called on FID[0x%04X] "
-                         "(but not implemented)\n", fsp->fnum));
+               DEBUG(10,("FSCTL_IS_VOLUME_DIRTY: called on %s "
+                         "(but not implemented)\n", fsp_fnum_dbg(fsp)));
                /*
                 * http://msdn.microsoft.com/en-us/library/cc232128%28PROT.10%29.aspx
                 * says we have to respond with NT_STATUS_INVALID_PARAMETER