summaryrefslogtreecommitdiff
path: root/source3/smbd/quotas.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-03 18:40:31 +0000
committerJeremy Allison <jra@samba.org>1998-09-03 18:40:31 +0000
commit7bb86c1b132bce31a006ea9768a54db7a45fe1a5 (patch)
tree1802e8e2741345e91187fc4b149016af75990971 /source3/smbd/quotas.c
parent4acd373e5bbd615141ceb5fb3c4a588a5b4581d7 (diff)
downloadsamba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.tar.gz
samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.tar.bz2
samba-7bb86c1b132bce31a006ea9768a54db7a45fe1a5.zip
Ok - this is the 64 bit widening check in. It changes the configure
to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
Diffstat (limited to 'source3/smbd/quotas.c')
-rw-r--r--source3/smbd/quotas.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 7f1cd5ce79..b7a538e189 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -54,12 +54,12 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
SMB_STRUCT_STAT S;
FILE *fp;
struct mntent *mnt;
- int devno;
+ SMB_DEV_T devno;
int found;
/* find the block device file */
- if ( stat(path, &S) == -1 ) {
+ if ( sys_stat(path, &S) == -1 ) {
return(False) ;
}
@@ -69,7 +69,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
found = False ;
while ((mnt = getmntent(fp))) {
- if ( stat(mnt->mnt_dir,&S) == -1 )
+ if ( sys_stat(mnt->mnt_dir,&S) == -1 )
continue ;
if (S.st_dev == devno) {
found = True ;
@@ -136,15 +136,15 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
struct mntent *mnt;
FILE *fd;
SMB_STRUCT_STAT sbuf;
- dev_t devno ;
- static dev_t devno_cached = 0 ;
+ SMB_DEV_T devno ;
+ static SMB_DEV_T devno_cached = 0 ;
static pstring name;
struct q_request request ;
struct qf_header header ;
static int quota_default = 0 ;
int found ;
- if ( stat(path,&sbuf) == -1 )
+ if ( sys_stat(path,&sbuf) == -1 )
return(False) ;
devno = sbuf.st_dev ;
@@ -160,7 +160,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
while ((mnt = getmntent(fd)) != NULL) {
- if ( stat(mnt->mnt_dir,&sbuf) == -1 )
+ if ( sys_stat(mnt->mnt_dir,&sbuf) == -1 )
continue ;
if (sbuf.st_dev == devno) {
@@ -256,11 +256,11 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
#endif
FILE *fd;
SMB_STRUCT_STAT sbuf;
- dev_t devno ;
- static dev_t devno_cached = 0 ;
+ SMB_DEV_T devno ;
+ static SMB_DEV_T devno_cached = 0 ;
int found ;
- if ( stat(path,&sbuf) == -1 )
+ if ( sys_stat(path,&sbuf) == -1 )
return(False) ;
devno = sbuf.st_dev ;
@@ -273,7 +273,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
found = False ;
while (getmntent(fd, &mnt) == 0) {
- if ( stat(mnt.mnt_mountp,&sbuf) == -1 )
+ if ( sys_stat(mnt.mnt_mountp,&sbuf) == -1 )
continue ;
DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n",
mnt.mnt_mountp,sbuf.st_dev));
@@ -292,7 +292,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
found = False ;
while ((mnt = getmntent(fd)) != NULL) {
- if ( stat(mnt->mnt_dir,&sbuf) == -1 )
+ if ( sys_stat(mnt->mnt_dir,&sbuf) == -1 )
continue ;
DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n",
mnt->mnt_dir,sbuf.st_dev));
@@ -436,12 +436,12 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
SMB_STRUCT_STAT S;
FILE *fp;
struct mntent *mnt;
- int devno;
+ SMB_DEV_T devno;
int found;
/* find the block device file */
- if ( stat(path, &S) == -1 ) {
+ if ( sys_stat(path, &S) == -1 ) {
return(False) ;
}
@@ -451,7 +451,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
found = False ;
while ((mnt = getmntent(fp))) {
- if ( stat(mnt->mnt_dir,&S) == -1 )
+ if ( sys_stat(mnt->mnt_dir,&S) == -1 )
continue ;
if (S.st_dev == devno) {
found = True ;
@@ -575,7 +575,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
char dev_disk[256];
SMB_STRUCT_STAT S;
/* find the block device file */
- if ((stat(path, &S)<0) ||
+ if ((sys_stat(path, &S)<0) ||
(devnm(S_IFBLK, S.st_dev, dev_disk, 256, 0)<0)) return (False);
#endif