clientgen and cwd
Luke Kenneth Casson Leighton
lkcl at switchboard.net
Mon Nov 9 21:01:30 GMT 1998
On Tue, 10 Nov 1998, Andrew Tridgell wrote:
> Luke wrote:
> > OH YEHHHHHH! ok, next stage is to divide the functions out from client.c
> > into clientgen.c so o have do_getcwd and cli_getcwd. this makes client.c
> > a little smaller and clientgen.c gets a bit unwieldy instead. in
> > BRANCH_NTDOM this prompted me to split clientgen.c down into about four
> > modules: setup, print, ipc and file.
>
> do we want clientgen.c to know about the current working directory?
hm, nooo... i created a "struct client_info" which contained all the
global variables in client.c and a "struct client_tar_info" that contained
all the global variables in clitar.c.
then: /tmp/foo
s/tar_reset/smb_info.tar.tar_reset
s/tar_inc/smb_info.tar.tar_inc
...
...
then:
sed -e /tmp/foo client/clitar.c > client/clitar.c.mod
sed -e /tmp/foo client/client.c > client/client.c.mod
then the same with client.c for cwd, recurse variables etc etc to
smb_info.cwd.
then have a static struct smb_cli_info smb_info in client.c.
> SMB has no such concept and thus far clientgen is a SMB access
> library, not a general filesystem library. That makes it quite clean
> (at least in principle).
yep :)
More information about the samba-technical
mailing list