[samba3] lib/util_file.c unused functions?
David Collier-Brown
davec-b at rogers.com
Thu Aug 17 15:09:23 GMT 2006
John E. Malmberg wrote:
> Because OpenVMS does some file operations different than UNIX, it
> appears that I need to replace some of routines in util_file.c with ones
> specific to OpenVMS.
>
> In looking at some of the routines that I would need to replace, I can
> not find that SAMBA V3 is currently even using them.
>
> These routines are:
>
> file_lock, file_unlock, startfilepwent, and endfilepwent.
start- and endfilepwnet are th callers of file_lock and _unlock,
but no-one seems to call the start- and end- functions!
Functions calling this function: startfilepwent
File Function Line
0 proto.h NTSTATUS 1258 void *startfilepwent(char *pfile, char *s_readbuf, int
Functions calling this function: endfilepwent
File Function Line
0 proto.h NTSTATUS 1260 void endfilepwent(void *vp, int *file_lock_depth);
They're all entries in proto.h, not calls!
Functions calling this function: file_lock
File Function Line
0 util_file.c startfilepwent 140 if (!file_lock(fileno(fp), (update ? F_WRLCK :
Functions calling this function: file_unlock
File Function Line
0 util_file.c endfilepwent 161 file_unlock(fileno(fp), file_lock_depth);
>
> And the routine do_file_lock appears to be only used by
> passdb/pdb_smbpasswd.c.
I see a few other calls, but only four in total:
Functions calling this function: do_file_lock
File Function Line
0 util_file.c file_lock 85 if (!do_file_lock(fd, secs, type)) {
1 util_file.c file_unlock 103 ret = do_file_lock(fd, 5, F_UNLCK);
2 pdb_smbpasswd.c pw_file_lock 78 if (!do_file_lock(fd, secs, type)) {
3 pdb_smbpasswd.c pw_file_unlock 103 ret = do_file_lock(fd, 5, F_UNLCK);
4 proto.h NTSTATUS 1255 BOOL do_file_lock(int fd, int waitsecs,
--dave (who used to use VMS at York) c-b
--
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net | -- Mark Twain
(416) 223-5943
More information about the samba-technical
mailing list