1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

include/includes.h:

lib/system.c: Can't assume every system has a statvfs varient.
              Return -1 for those that don't.
smbd/reply.c: Fixed printf warning.
Jeremy.
This commit is contained in:
Jeremy Allison
-
parent c22c40f0ca
commit 14c134e831
3 changed files with 10 additions and 3 deletions

View File

@ -376,13 +376,18 @@
/* /*
* Type for statvfs structure. * Type for statvfs structure.
* Unfortunately, due to the make proto structure
* we still need to define this as void * for platforms
* that don't have either statvfs or statvfs64. JRA.
*/ */
#ifndef SMB_STRUCT_STATVFS #ifndef SMB_STRUCT_STATVFS
# if defined(STAT_STATVFS64) # if defined(STAT_STATVFS64)
# define SMB_STRUCT_STATVFS struct statvfs64 # define SMB_STRUCT_STATVFS struct statvfs64
# else # elif defined(STAT_STATVFS)
# define SMB_STRUCT_STATVFS struct statvfs # define SMB_STRUCT_STATVFS struct statvfs
# else
# define SMB_STRUCT_STATVFS void *
# endif # endif
#endif #endif

View File

@ -186,8 +186,10 @@ int sys_statvfs( const char *path, SMB_STRUCT_STATVFS *fsd)
{ {
#if defined(STAT_STATVFS64) #if defined(STAT_STATVFS64)
return statvfs64(path, fsd); return statvfs64(path, fsd);
#else #elif defined(STAT_STATVFS)
return statvfs(path, fsd); return statvfs(path, fsd);
#else
return -1;
#endif #endif
} }

View File

@ -932,7 +932,7 @@ int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_siz
SSVAL(outbuf,smb_vwv2,512); SSVAL(outbuf,smb_vwv2,512);
SSVAL(outbuf,smb_vwv3,dfree); SSVAL(outbuf,smb_vwv3,dfree);
DEBUG(3,("dskattr dfree=%d\n", dfree)); DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree));
return(outsize); return(outsize);
} }