diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-04 20:53:58 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-04 20:53:58 +0000 |
commit | 83900f2b682c62f2b5620b29ecb710274990ac51 (patch) | |
tree | d990ea194e1ecdb3ca78fb93f3af09274e97634d /source3/locking/locking_slow.c | |
parent | 33bf29fd24c1dc076055303a0f135c9a47fb9877 (diff) | |
download | samba-83900f2b682c62f2b5620b29ecb710274990ac51.tar.gz samba-83900f2b682c62f2b5620b29ecb710274990ac51.tar.bz2 samba-83900f2b682c62f2b5620b29ecb710274990ac51.zip |
Modified dev_t and ino_t code to be 64 bit clean (including changes
to oplock break message passing). I think that smbd/nmbd are now
inode and offset size independent (at least for 32 bit and 64 bit
systems).
Now to expose all this new functionality to NT clients.....
Jeremy.
(This used to be commit 5910d07bbf45a34d3c901461f74704c029a79474)
Diffstat (limited to 'source3/locking/locking_slow.c')
-rw-r--r-- | source3/locking/locking_slow.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source3/locking/locking_slow.c b/source3/locking/locking_slow.c index c9b8d2a687..fd95fd45ec 100644 --- a/source3/locking/locking_slow.c +++ b/source3/locking/locking_slow.c @@ -90,7 +90,11 @@ static BOOL share_name(connection_struct *conn, len = strlen(name); name += len; - slprintf(name, sizeof(pstring) - len - 1, "/share.%u.%u",dev,inode); +#ifdef LARGE_SMB_INO_T + slprintf(name, sizeof(pstring) - len - 1, "/share.%u.%.0f",(unsigned int)dev,(double)inode); +#else /* LARGE_SMB_INO_T */ + slprintf(name, sizeof(pstring) - len - 1, "/share.%u.%lu",(unsigned int)dev,(unsigned long)inode); +#endif /* LARGE_SMB_INO_T */ return(True); } @@ -966,8 +970,16 @@ static int slow_share_forall(void (*fn)(share_mode_entry *, char *)) BOOL new_file; pstring fname; - if (sscanf(s,"share.%u.%u",&dev,&inode)!=2) continue; - +#ifdef LARGE_SMB_INO_T + double inode_ascii; + if (sscanf(s,"share.%u.%lf",&dev,&inode_ascii)!=2) continue; + inode = (SMB_INO_T)inode_ascii; +#else /* LARGE_SMB_INO_T */ + unsigned long inode_long; + if (sscanf(s,"share.%u.%lu",&dev,&inode_long)!=2) continue; + inode = (SMB_INO_T)inode_long; +#endif /* LARGE_SMB_INO_T */ + pstrcpy(lname,lp_lockdir()); trim_string(lname,NULL,"/"); pstrcat(lname,"/"); |