}
static int catia_rename(vfs_handle_struct *handle, connection_struct *conn,
- const char *old, const char *new)
+ const char *oldname, const char *newname)
{
pstring oname, nname;
- pstrcpy(oname, old);
+ pstrcpy(oname, oldname);
to_unix(oname);
- pstrcpy(nname, new);
+ pstrcpy(nname, newname);
to_unix(nname);
DEBUG(10, ("converted old name: %s\n", oname));
return NT_STATUS_OK;
}
- vfs->currentdir = SMB_VFS_OPENDIR(vfs->conn, argv[1]);
+ vfs->currentdir = SMB_VFS_OPENDIR(vfs->conn, argv[1], NULL, 0);
if (vfs->currentdir == NULL) {
printf("opendir error=%d (%s)\n", errno, strerror(errno));
return NT_STATUS_UNSUCCESSFUL;
static NTSTATUS cmd_readdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
- struct dirent *dent;
+ SMB_STRUCT_DIRENT *dent;
if (vfs->currentdir == NULL) {
printf("readdir: error=-1 (no open directory)\n");
{
if (!cli_rename(c, oldname, newname)) {
printf("ERROR: rename %s %s failed (%s)\n",
- old, new, cli_errstr(c));
+ oldname, newname, cli_errstr(c));
exit(1);
}
}
uint8 eclass, uint32 ecode, NTSTATUS nterr)
{
if (cli_is_dos_error(c)) {
- uint8 class;
+ uint8 cclass;
uint32 num;
/* Check DOS error */
- cli_dos_error(c, &class, &num);
+ cli_dos_error(c, &cclass, &num);
- if (eclass != class || ecode != num) {
+ if (eclass != cclass || ecode != num) {
printf("unexpected error code class=%d code=%d\n",
- (int)class, (int)num);
+ (int)cclass, (int)num);
printf(" expected %d/%d %s (line=%d)\n",
(int)eclass, (int)ecode, nt_errstr(nterr), line);
return False;
static BOOL run_maxfidtest(int dummy)
{
struct cli_state *cli;
- const char *template = "\\maxfid.%d.%d";
+ const char *ftemplate = "\\maxfid.%d.%d";
fstring fname;
int fnums[0x11000], i;
int retries=4;
cli_sockopt(cli, sockops);
for (i=0; i<0x11000; i++) {
- slprintf(fname,sizeof(fname)-1,template, i,(int)getpid());
+ slprintf(fname,sizeof(fname)-1,ftemplate, i,(int)getpid());
if ((fnums[i] = cli_open(cli, fname,
O_RDWR|O_CREAT|O_TRUNC, DENY_NONE)) ==
-1) {
printf("cleaning up\n");
for (;i>=0;i--) {
- slprintf(fname,sizeof(fname)-1,template, i,(int)getpid());
+ slprintf(fname,sizeof(fname)-1,ftemplate, i,(int)getpid());
cli_close(cli, fnums[i]);
if (!cli_unlink(cli, fname)) {
printf("unlink of %s failed (%s)\n",
int i;
int linecount = 1;
dbg_Token old = dbg_null,
- new = dbg_null,
+ newtok= dbg_null,
state = dbg_null;
while( fgets( bufr, DBG_BSIZE, stdin ) )
{
for( i = 0; bufr[i]; i++ )
{
- old = new;
- new = dbg_char2token( &state, bufr[i] );
- switch( new )
+ old = newtok;
+ newtok = dbg_char2token( &state, bufr[i] );
+ switch( newtok )
{
case dbg_header:
if( linecount > 1 )
case dbg_ignore:
break;
default:
- if( old != new )
- (void)printf( "\n[%05d]%12s: ", linecount, dbg_token2string(new) );
+ if( old != newtok )
+ (void)printf( "\n[%05d]%12s: ", linecount, dbg_token2string(newtok) );
(void)putchar( bufr[i] );
}
}
* Functions...
*/
-static dbg_Token modechange( dbg_Token new, dbg_Token mode )
+static dbg_Token modechange( dbg_Token newmode, dbg_Token mode )
/* ------------------------------------------------------------------------ **
* Handle a switch between header and message printing.
*
* ------------------------------------------------------------------------ **
*/
{
- switch( new )
+ switch( newmode )
{
case dbg_null:
case dbg_ignore:
return( mode );
} /* modechange */
-static void newblock( dbg_Token old, dbg_Token new )
+static void newblock( dbg_Token old, dbg_Token newtok )
/* ------------------------------------------------------------------------ **
* Handle the transition between tokens.
*
break;
}
- switch( new )
+ switch( newtok )
{
case dbg_timestamp:
(void)printf( "<B>[" );
int len;
char bufr[DBG_BSIZE];
dbg_Token old = dbg_null,
- new = dbg_null,
+ newtok = dbg_null,
state = dbg_null,
mode = dbg_null;
{
for( i = 0; i < len; i++ )
{
- old = new;
- new = dbg_char2token( &state, bufr[i] );
- if( new != old )
+ old = newtok;
+ newtok = dbg_char2token( &state, bufr[i] );
+ if( newtok != old )
{
- mode = modechange( new, mode );
- newblock( old, new );
+ mode = modechange( newtok, mode );
+ newblock( old, newtok );
}
- charprint( new, bufr[i] );
+ charprint( newtok, bufr[i] );
}
}
(void)modechange( dbg_eof, mode );