[PATCH] smbget : enable update and various cleanup
jelmer at samba.org
Mon Feb 25 20:54:45 GMT 2008
Am Montag, den 25.02.2008, 20:58 +0100 schrieb neologix at free.fr:
> Alright. Round 2 :-)
> You'll find 2 patches.
> The first one is cleanup: I made static some variables that were unnecessarily
> glocal, wrote a header, prototypes, corrected indentation, etc.
I don't see the use for an extra header. It's only included in smbget.c
and would only ever make sense to include there. There are also static
variables in there, which should never be in a header.
You also seem to've changed the formatting in some places to be
inconsistent with the rest of Samba. In particular the copyright header.
I'm also not convinced putting the various variables in a global struct
> The other one is more interesting: it introduces an "update" mode, where we
> download a file only if it is newer than its local copy or if there is no local
> copy. The reason I hacked this is because I use smbget to do a backup of all my
> samba shares, and it's much better if you download only the new files (resume
> option doesn't check modification dates, and refuses to overwrite an already
> existing file). The second thing is really a detail: when using guest mode, it
> now uses "guest" rather than empty username. The reason for that is that empty
> wouldn't work for my vista machine, but "guest" does. And it still works for my
> xp machine, so it shouldn't be a regression. Also, it's a little bit faster than
> before, because for a download without the resume option, we don't have to go
> through the whole block.
This change looks fine mostly and I think it's almost ready to go in.
Any chance you can send a version of this patch that doesn't depend on
the first one?
I'd rather not put the "guest" bit in though, as we define to "" in all
other Samba client utilities and I think we should be consistent.
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
More information about the samba-technical