nread = 0;
#endif
- DEBUG( 3, ( "reply_readbraw: fnum=%d start=%.0f max=%lu "
+ DEBUG( 3, ( "reply_readbraw: %s start=%.0f max=%lu "
"min=%lu nread=%lu\n",
- fsp->fnum, (double)startpos,
+ fsp_fnum_dbg(fsp), (double)startpos,
(unsigned long)maxcount,
(unsigned long)mincount,
(unsigned long)nread ) );
SCVAL(p,0,0); /* pad byte. */
SSVAL(p,1,nread);
- DEBUG(3,("lockread fnum=%d num=%d nread=%d\n",
- fsp->fnum, (int)numtoread, (int)nread));
+ DEBUG(3,("lockread %s num=%d nread=%d\n",
+ fsp_fnum_dbg(fsp), (int)numtoread, (int)nread));
END_PROFILE(SMBlockread);
return;
SCVAL(smb_buf(req->outbuf),0,1);
SSVAL(smb_buf(req->outbuf),1,nread);
- DEBUG( 3, ( "read fnum=%d num=%d nread=%d\n",
- fsp->fnum, (int)numtoread, (int)nread ) );
+ DEBUG(3, ("read %s num=%d nread=%d\n",
+ fsp_fnum_dbg(fsp), (int)numtoread, (int)nread));
strict_unlock:
SMB_VFS_STRICT_UNLOCK(conn, fsp, &lock);
strerror(errno)));
exit_server_cleanly("send_file_readX: fake_sendfile failed");
}
- DEBUG( 3, ( "send_file_readX: fake_sendfile fnum=%d max=%d nread=%d\n",
- fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+ DEBUG(3, ("send_file_readX: fake_sendfile %s max=%d nread=%d\n",
+ fsp_fnum_dbg(fsp), (int)smb_maxcnt, (int)nread));
/* No outbuf here means successful sendfile. */
goto strict_unlock;
}
goto normal_read;
}
- DEBUG( 3, ( "send_file_readX: sendfile fnum=%d max=%d nread=%d\n",
- fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+ DEBUG(3, ("send_file_readX: sendfile %s max=%d nread=%d\n",
+ fsp_fnum_dbg(fsp), (int)smb_maxcnt, (int)nread));
/* Deal with possible short send. */
if (nread != smb_maxcnt + sizeof(headerbuf)) {
setup_readX_header(req, (char *)req->outbuf, nread);
- DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n",
- fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+ DEBUG(3, ("send_file_readX %s max=%d nread=%d\n",
+ fsp_fnum_dbg(fsp), (int)smb_maxcnt, (int)nread));
return;
strict_unlock:
nwritten = write_file(req,fsp,data,startpos,numtowrite);
}
- DEBUG(3,("reply_writebraw: initial write fnum=%d start=%.0f num=%d "
+ DEBUG(3, ("reply_writebraw: initial write %s start=%.0f num=%d "
"wrote=%d sync=%d\n",
- fsp->fnum, (double)startpos, (int)numtowrite,
+ fsp_fnum_dbg(fsp), (double)startpos, (int)numtowrite,
(int)nwritten, (int)write_through));
if (nwritten < (ssize_t)numtowrite) {
goto strict_unlock;
}
- DEBUG(3,("reply_writebraw: secondart write fnum=%d start=%.0f num=%d "
+ DEBUG(3,("reply_writebraw: secondart write %s start=%.0f num=%d "
"wrote=%d\n",
- fsp->fnum, (double)startpos, (int)numtowrite,
+ fsp_fnum_dbg(fsp), (double)startpos, (int)numtowrite,
(int)total_written));
if (!fsp->print_file) {
SSVAL(req->outbuf,smb_vwv0,nwritten);
- DEBUG(3,("writeunlock fnum=%d num=%d wrote=%d\n",
- fsp->fnum, (int)numtowrite, (int)nwritten));
+ DEBUG(3, ("writeunlock %s num=%d wrote=%d\n",
+ fsp_fnum_dbg(fsp), (int)numtowrite, (int)nwritten));
strict_unlock:
if (numtowrite && !fsp->print_file) {
SSVAL(req->outbuf,smb_err,ERRdiskfull);
}
- DEBUG(3,("write fnum=%d num=%d wrote=%d\n", fsp->fnum, (int)numtowrite, (int)nwritten));
+ DEBUG(3, ("write %s num=%d wrote=%d\n", fsp_fnum_dbg(fsp), (int)numtowrite, (int)nwritten));
strict_unlock:
if (!fsp->print_file) {
SSVAL(req->outbuf,smb_vwv2,nwritten);
SSVAL(req->outbuf,smb_vwv4,nwritten>>16);
- DEBUG(3,("writeX fnum=%d num=%d wrote=%d\n",
- fsp->fnum, (int)numtowrite, (int)nwritten));
+ DEBUG(3,("writeX %s num=%d wrote=%d\n",
+ fsp_fnum_dbg(fsp), (int)numtowrite, (int)nwritten));
status = sync_file(conn, fsp, write_through);
if (!NT_STATUS_IS_OK(status)) {
reply_outbuf(req, 2, 0);
SIVAL(req->outbuf,smb_vwv0,res);
- DEBUG(3,("lseek fnum=%d ofs=%.0f newpos = %.0f mode=%d\n",
- fsp->fnum, (double)startpos, (double)res, mode));
+ DEBUG(3,("lseek %s ofs=%.0f newpos = %.0f mode=%d\n",
+ fsp_fnum_dbg(fsp), (double)startpos, (double)res, mode));
END_PROFILE(SMBlseek);
return;
/*
* Special case - close NT SMB directory handle.
*/
- DEBUG(3,("close directory fnum=%d\n", fsp->fnum));
+ DEBUG(3,("close directory %s\n", fsp_fnum_dbg(fsp)));
status = close_file(req, fsp, NORMAL_CLOSE);
} else {
time_t t;
* Close ordinary file.
*/
- DEBUG(3,("close fd=%d fnum=%d (numopen=%d)\n",
- fsp->fh->fd, fsp->fnum,
+ DEBUG(3,("close fd=%d %s (numopen=%d)\n",
+ fsp->fh->fd, fsp_fnum_dbg(fsp),
conn->num_files_open));
/*
close_status = close_file(req, fsp, NORMAL_CLOSE);
}
- DEBUG(3,("writeclose fnum=%d num=%d wrote=%d (numopen=%d)\n",
- fsp->fnum, (int)numtowrite, (int)nwritten,
+ DEBUG(3,("writeclose %s num=%d wrote=%d (numopen=%d)\n",
+ fsp_fnum_dbg(fsp), (int)numtowrite, (int)nwritten,
conn->num_files_open));
if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
count = (uint64_t)IVAL(req->vwv+1, 0);
offset = (uint64_t)IVAL(req->vwv+3, 0);
- DEBUG(3,("lock fd=%d fnum=%d offset=%.0f count=%.0f\n",
- fsp->fh->fd, fsp->fnum, (double)offset, (double)count));
+ DEBUG(3,("lock fd=%d %s offset=%.0f count=%.0f\n",
+ fsp->fh->fd, fsp_fnum_dbg(fsp), (double)offset, (double)count));
br_lck = do_lock(req->sconn->msg_ctx,
fsp,
return;
}
- DEBUG( 3, ( "unlock fd=%d fnum=%d offset=%.0f count=%.0f\n",
- fsp->fh->fd, fsp->fnum, (double)offset, (double)count ) );
+ DEBUG( 3, ( "unlock fd=%d %s offset=%.0f count=%.0f\n",
+ fsp->fh->fd, fsp_fnum_dbg(fsp), (double)offset, (double)count ) );
reply_outbuf(req, 0, 0);
reply_outbuf(req, 1, 0);
SSVAL(req->outbuf,smb_vwv0,fsp->fnum);
- DEBUG(3,("openprint fd=%d fnum=%d\n",
- fsp->fh->fd, fsp->fnum));
+ DEBUG(3,("openprint fd=%d %s\n",
+ fsp->fh->fd, fsp_fnum_dbg(fsp)));
END_PROFILE(SMBsplopen);
return;
return;
}
- DEBUG(3,("printclose fd=%d fnum=%d\n",
- fsp->fh->fd,fsp->fnum));
+ DEBUG(3,("printclose fd=%d %s\n",
+ fsp->fh->fd, fsp_fnum_dbg(fsp)));
status = close_file(req, fsp, NORMAL_CLOSE);
return;
}
- DEBUG( 3, ( "printwrite fnum=%d num=%d\n", fsp->fnum, numtowrite ) );
+ DEBUG(3, ("printwrite %s num=%d\n", fsp_fnum_dbg(fsp), numtowrite));
END_PROFILE(SMBsplwr);
return;
if (fsp->name_hash != orig_name_hash) {
continue;
}
- DEBUG(10, ("rename_open_files: renaming file fnum %d "
- "(file_id %s) from %s -> %s\n", fsp->fnum,
+ DEBUG(10, ("rename_open_files: renaming file %s "
+ "(file_id %s) from %s -> %s\n", fsp_fnum_dbg(fsp),
file_id_string_tos(&fsp->file_id), fsp_str_dbg(fsp),
smb_fname_str_dbg(smb_fname_dst)));
return status;
}
- DEBUG(3, ("smbd_do_locking: fnum=%d type=%d num_locks=%d num_ulocks=%d\n",
- fsp->fnum, (unsigned int)type, num_locks, num_ulocks));
+ DEBUG(3, ("smbd_do_locking: %s type=%d num_locks=%d num_ulocks=%d\n",
+ fsp_fnum_dbg(fsp), (unsigned int)type, num_locks, num_ulocks));
return NT_STATUS_OK;
}
bool result;
DEBUG(5,("reply_lockingX: oplock break reply (%u) from client "
- "for fnum = %d\n", (unsigned int)oplocklevel,
- fsp->fnum ));
+ "for %s\n", (unsigned int)oplocklevel,
+ fsp_fnum_dbg(fsp)));
/*
* Make sure we have granted an exclusive or batch oplock on
message here - just ignore it. JRA. */
DEBUG(5,("reply_lockingX: Error : oplock break from "
- "client for fnum = %d (oplock=%d) and no "
+ "client for %s (oplock=%d) and no "
"oplock granted on this file (%s).\n",
- fsp->fnum, fsp->oplock_type,
+ fsp_fnum_dbg(fsp), fsp->oplock_type,
fsp_str_dbg(fsp)));
/* if this is a pure oplock break request then don't
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx offset */
- DEBUG(3, ("lockingX fnum=%d type=%d num_locks=%d num_ulocks=%d\n",
- fsp->fnum, (unsigned int)locktype, num_locks, num_ulocks));
+ DEBUG(3, ("lockingX %s type=%d num_locks=%d num_ulocks=%d\n",
+ fsp_fnum_dbg(fsp), (unsigned int)locktype, num_locks, num_ulocks));
END_PROFILE(SMBlockingX);
}
goto out;
}
- DEBUG( 3, ( "reply_setattrE fnum=%d actime=%u modtime=%u "
+ DEBUG( 3, ( "reply_setattrE %s actime=%u modtime=%u "
" createtime=%u\n",
- fsp->fnum,
+ fsp_fnum_dbg(fsp),
(unsigned int)ft.atime.tv_sec,
(unsigned int)ft.mtime.tv_sec,
(unsigned int)ft.create_time.tv_sec
}
SSVAL(req->outbuf,smb_vwv10, mode);
- DEBUG( 3, ( "reply_getattrE fnum=%d\n", fsp->fnum));
+ DEBUG( 3, ( "reply_getattrE %s\n", fsp_fnum_dbg(fsp)));
END_PROFILE(SMBgetattrE);
return;