mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
Change to vfs API. POSIX states fsync should return an int, not a void.
Jeremy.
This commit is contained in:
parent
7325059a09
commit
6c442d68af
@ -3265,7 +3265,7 @@ ssize_t vfswrap_read(int fd, char *data, size_t n);
|
||||
ssize_t vfswrap_write(int fd, char *data, size_t n);
|
||||
SMB_OFF_T vfswrap_lseek(int filedes, SMB_OFF_T offset, int whence);
|
||||
int vfswrap_rename(char *old, char *new);
|
||||
void vfswrap_fsync(int fd);
|
||||
int vfswrap_fsync(int fd);
|
||||
int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf);
|
||||
int vfswrap_fstat(int fd, SMB_STRUCT_STAT *sbuf);
|
||||
int vfswrap_lstat(char *path,
|
||||
|
@ -129,7 +129,7 @@ struct vfs_ops {
|
||||
ssize_t (*write)(int fd, char *data, size_t n);
|
||||
SMB_OFF_T (*lseek)(int filedes, SMB_OFF_T offset, int whence);
|
||||
int (*rename)(char *old, char *new);
|
||||
void (*fsync)(int fd);
|
||||
int (*fsync)(int fd);
|
||||
int (*stat)(char *fname, SMB_STRUCT_STAT *sbuf);
|
||||
int (*fstat)(int fd, SMB_STRUCT_STAT *sbuf);
|
||||
int (*lstat)(char *path, SMB_STRUCT_STAT *sbuf);
|
||||
|
@ -851,7 +851,6 @@ static BOOL api_net_sam_logon(prs_struct *data, prs_struct *rdata)
|
||||
|
||||
static BOOL api_net_trust_dom_list(prs_struct *data, prs_struct *rdata)
|
||||
{
|
||||
uint16 vuid = current_user.vuid;
|
||||
NET_Q_TRUST_DOM_LIST q_t;
|
||||
|
||||
char *trusted_domain = "test_domain";
|
||||
@ -886,7 +885,6 @@ static BOOL api_net_trust_dom_list(prs_struct *data, prs_struct *rdata)
|
||||
|
||||
static BOOL api_net_logon_ctrl2(prs_struct *data, prs_struct *rdata)
|
||||
{
|
||||
uint16 vuid = current_user.vuid;
|
||||
NET_Q_LOGON_CTRL2 q_l;
|
||||
|
||||
/* lkclXXXX - guess what - absolutely no idea what these are! */
|
||||
|
@ -651,10 +651,8 @@ sync a file
|
||||
|
||||
void sys_fsync_file(connection_struct *conn, files_struct *fsp)
|
||||
{
|
||||
#ifdef HAVE_FSYNC
|
||||
if(lp_strict_sync(SNUM(conn)) && fsp->fd_ptr != NULL) {
|
||||
flush_write_cache(fsp, SYNC_FLUSH);
|
||||
conn->vfs_ops.fsync(fsp->fd_ptr->fd);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -204,9 +204,13 @@ int vfswrap_rename(char *old, char *new)
|
||||
return result;
|
||||
}
|
||||
|
||||
void vfswrap_fsync(int fd)
|
||||
int vfswrap_fsync(int fd)
|
||||
{
|
||||
fsync(fd);
|
||||
#ifdef HAVE_FSYNC
|
||||
return fsync(fd);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf)
|
||||
|
Loading…
Reference in New Issue
Block a user