mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Hoist by my own petard with warnings (forgot to set strict warnings
in Makefile before compiling & checking in :-).
Jeremy.
(This used to be commit 05fb3c82a5
)
This commit is contained in:
parent
474110e3e0
commit
0e091a5207
@ -166,7 +166,7 @@ Error was %s.\n", strerror(errno) ));
|
||||
inode = (SMB_DEV_T)os.os_ino;
|
||||
|
||||
DEBUG(5,("receive_local_message: kernel oplock break request received for \
|
||||
dev = %x, inode = %0.f\n", (unsigned int)dev, (double)inode ));
|
||||
dev = %x, inode = %.0f\n", (unsigned int)dev, (double)inode ));
|
||||
|
||||
/*
|
||||
* Create a kernel oplock break message.
|
||||
@ -243,12 +243,12 @@ BOOL set_file_oplock(files_struct *fsp)
|
||||
if(fcntl(fsp->fd_ptr->fd, F_OPLKREG, oplock_pipe_write) < 0) {
|
||||
if(errno != EAGAIN) {
|
||||
DEBUG(0,("set_file_oplock: Unable to get kernel oplock on file %s, dev = %x, \
|
||||
inode = %0.f. Error was %s\n",
|
||||
inode = %.0f. Error was %s\n",
|
||||
fsp->fsp_name, (unsigned int)fsp->fd_ptr->dev, (double)fsp->fd_ptr->inode,
|
||||
strerror(errno) ));
|
||||
} else {
|
||||
DEBUG(5,("set_file_oplock: Refused oplock on file %s, dev = %x, \
|
||||
inode = %0.f. Another process had the file open.\n",
|
||||
inode = %.0f. Another process had the file open.\n",
|
||||
fsp->fsp_name, (unsigned int)fsp->fd_ptr->dev, (double)fsp->fd_ptr->inode ));
|
||||
}
|
||||
return False;
|
||||
@ -1026,7 +1026,7 @@ void check_kernel_oplocks(void)
|
||||
int pfd[2];
|
||||
pstring tmpname;
|
||||
|
||||
slprintf( tmpname, sizeof(tmpname)-1, "/tmp/ot.%d.XXXXXX", getpid());
|
||||
slprintf( tmpname, sizeof(tmpname)-1, "/tmp/ot.%d.XXXXXX", (unsigned int)getpid());
|
||||
mktemp(tmpname);
|
||||
|
||||
if(pipe(pfd) != 0) {
|
||||
@ -1048,7 +1048,7 @@ void check_kernel_oplocks(void)
|
||||
|
||||
if(fcntl(fd, F_OPLKREG, pfd[1]) == -1) {
|
||||
DEBUG(0,("check_kernel_oplocks: Kernel oplocks are not available on this machine. \
|
||||
Disabling kernel oplock supprt.\n" ));
|
||||
Disabling kernel oplock support.\n" ));
|
||||
close(pfd[0]);
|
||||
close(pfd[1]);
|
||||
close(fd);
|
||||
@ -1057,7 +1057,7 @@ Disabling kernel oplock supprt.\n" ));
|
||||
|
||||
if(fcntl(fd, F_OPLKACK, OP_REVOKE) < 0 ) {
|
||||
DEBUG(0,("check_kernel_oplocks: Error when removing kernel oplock. Error was %s. \
|
||||
Disabling kernel oplock supprt.\n" ));
|
||||
Disabling kernel oplock support.\n", strerror(errno) ));
|
||||
close(pfd[0]);
|
||||
close(pfd[1]);
|
||||
close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user