if(!strcmp(lname,"-")) {
handle = fileno(stdout);
} else {
- handle = open(lname,O_WRONLY|O_CREAT|O_TRUNC,0644);
+ handle = sys_open(lname,O_WRONLY|O_CREAT|O_TRUNC,0644);
newhandle = True;
}
if (handle < 0) {
if (lowercase)
strlower(finfo->name);
- if (!directory_exist(finfo->name,NULL) &&
+ if (!dos_directory_exist(finfo->name,NULL) &&
dos_mkdir(finfo->name,0777) != 0) {
DEBUG(0,("failed to create directory %s\n",CNV_LANG(finfo->name)));
pstrcpy(cur_dir,saved_curdir);
f = stdin;
/* size of file is not known */
} else {
- f = fopen(lname,"r");
+ f = sys_fopen(lname,"r");
}
if (!f) {
"/bin/ls %s > %s",p,tmpname);
system(cmd);
- f = fopen(tmpname,"r");
+ f = sys_fopen(tmpname,"r");
if (!f) continue;
while (!feof(f)) {
pstring d;
if (next_token(NULL,buf,NULL,sizeof(buf)))
- dos_chdir(buf);
- DEBUG(2,("the local directory is now %s\n",GetWd(d)));
+ chdir(buf);
+ DEBUG(2,("the local directory is now %s\n",sys_getwd(d)));
}
/****************************************************************************
static BOOL process(char *base_directory)
{
cli = do_connect(desthost, service);
-
if (!cli) {
return(False);
}
sscanf(p, "%d", &fd);
close_it = False;
} else if ((p = getenv("PASSWD_FILE")) != NULL) {
- fd = open(p, O_RDONLY);
+ fd = sys_open(p, O_RDONLY, 0);
pstrcpy(spec, p);
if (fd < 0) {
fprintf(stderr, "Error opening PASSWD_FILE %s: %s\n",
static int do_host_query(char *query_host, int port)
{
cli = do_connect(query_host, "IPC$");
- if (!cli) return 1;
+ if (!cli)
+ return 1;
browse_host(True);
list_servers(workgroup);
{
int ret;
cli = do_connect(desthost, service);
+ if (!cli)
+ return 1;
recurse=True;