diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-03 18:40:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-03 18:40:31 +0000 |
commit | 14500936c321d15995c963766aac67bf1f4e3824 (patch) | |
tree | d6334d89735aa240aa8950c6c37a70b35b0ea181 /source/smbd/quotas.c | |
parent | d252d331015b7606618ba1422bb669da003da293 (diff) | |
download | samba-14500936c321d15995c963766aac67bf1f4e3824.tar.gz samba-14500936c321d15995c963766aac67bf1f4e3824.tar.xz samba-14500936c321d15995c963766aac67bf1f4e3824.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.
Diffstat (limited to 'source/smbd/quotas.c')
-rw-r--r-- | source/smbd/quotas.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c index 7f1cd5ce793..b7a538e189e 100644 --- a/source/smbd/quotas.c +++ b/source/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 |