1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

More janitorial duties, fixing the BIG_UINT changes for large offsets.

(This used to be commit 1af39523cc)
This commit is contained in:
Richard Sharpe 2003-03-03 23:00:22 +00:00
parent 28074d957a
commit e3fdd289f5
2 changed files with 7 additions and 6 deletions

View File

@ -959,9 +959,10 @@ static int skip_file(int skipsize)
static int get_file(file_info2 finfo)
{
int fnum = -1, pos = 0, dsize = 0, rsize = 0, bpos = 0;
int fnum = -1, pos = 0, dsize = 0, bpos = 0;
SMB_BIG_UINT rsize = 0;
DEBUG(5, ("get_file: file: %s, size %i\n", finfo.name, (int)finfo.size));
DEBUG(5, ("get_file: file: %s, size %.0f\n", finfo.name, (double)finfo.size));
if (ensurepath(finfo.name) &&
(fnum=cli_open(cli, finfo.name, O_RDWR|O_CREAT|O_TRUNC, DENY_NONE)) == -1) {
@ -1052,7 +1053,7 @@ static int get_file(file_info2 finfo)
ntarf++;
DEBUG(0, ("restore tar file %s of size %d bytes\n", finfo.name, (int)finfo.size));
DEBUG(0, ("restore tar file %s of size %.0f bytes\n", finfo.name, (double)finfo.size));
return(True);
}
@ -1082,7 +1083,7 @@ static int get_dir(file_info2 finfo)
*/
static char * get_longfilename(file_info2 finfo)
{
int namesize = finfo.size + strlen(cur_dir) + 2;
int namesize = strlen(finfo.name) + strlen(cur_dir) + 2;
char *longname = malloc(namesize);
int offset = 0, left = finfo.size;
BOOL first = True;
@ -1093,7 +1094,7 @@ static char * get_longfilename(file_info2 finfo)
if (longname == NULL) {
DEBUG(0, ("could not allocate buffer of size %d for longname\n",
(int)(finfo.size + strlen(cur_dir) + 2)));
namesize));
return(NULL);
}

View File

@ -805,7 +805,7 @@ BOOL cli_unlock64(struct cli_state *cli, int fnum, SMB_BIG_UINT offset, SMB_BIG_
****************************************************************************/
BOOL cli_getattrE(struct cli_state *cli, int fd,
uint16 *attr, size_t *size,
uint16 *attr, SMB_BIG_UINT *size,
time_t *c_time, time_t *a_time, time_t *m_time)
{
memset(cli->outbuf,'\0',smb_size);