diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-01 20:11:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-01 20:11:54 +0000 |
commit | 18556274139cc5a00593471bd745354d98a35303 (patch) | |
tree | b10b897359416e4c67bcaff75a5f21eefe20c996 /source3/client | |
parent | 6f53e2097d60d4b67f0859065cfa0fe01d63e28f (diff) | |
download | samba-18556274139cc5a00593471bd745354d98a35303.tar.gz samba-18556274139cc5a00593471bd745354d98a35303.tar.xz samba-18556274139cc5a00593471bd745354d98a35303.zip |
More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.
Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.
Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.
Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.
Jeremy.
(This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 14 | ||||
-rw-r--r-- | source3/client/clitar.c | 6 | ||||
-rw-r--r-- | source3/client/smbmnt.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 855d4cc2de..0b98d1f670 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1528,7 +1528,7 @@ static void do_mget(file_info *finfo) strlower(finfo->name); if (!directory_exist(finfo->name,NULL) && - sys_mkdir(finfo->name,0777) != 0) + dos_mkdir(finfo->name,0777) != 0) { DEBUG(0,("failed to create directory %s\n",CNV_LANG(finfo->name))); pstrcpy(cur_dir,saved_curdir); @@ -1536,7 +1536,7 @@ static void do_mget(file_info *finfo) return; } - if (sys_chdir(finfo->name) != 0) + if (dos_chdir(finfo->name) != 0) { DEBUG(0,("failed to chdir to directory %s\n",CNV_LANG(finfo->name))); pstrcpy(cur_dir,saved_curdir); @@ -1998,7 +1998,7 @@ static void cmd_put(char *dum_in, char *dum_out) dos_clean_name(rname); { - struct stat st; + SMB_STRUCT_STAT st; /* allow '-' to represent stdin jdblair, 24.jun.98 */ if (!file_exist(lname,&st) && @@ -2060,7 +2060,7 @@ static void cmd_mput(char *dum_in, char *dum_out) while (next_token(NULL,p,NULL,sizeof(buf))) { - struct stat st; + SMB_STRUCT_STAT st; pstring cmd; pstring tmpname; FILE *f; @@ -2816,10 +2816,10 @@ static void cmd_newer(char *dum_in, char *dum_out) { fstring buf; BOOL ok; - struct stat sbuf; + SMB_STRUCT_STAT sbuf; ok = next_token(NULL,buf,NULL,sizeof(buf)); - if (ok && (sys_stat(buf,&sbuf) == 0)) + if (ok && (dos_stat(buf,&sbuf) == 0)) { newer_than = sbuf.st_mtime; DEBUG(1,("Getting files newer than %s", @@ -2923,7 +2923,7 @@ static void cmd_lcd(char *dum_in, char *dum_out) pstring d; if (next_token(NULL,buf,NULL,sizeof(buf))) - sys_chdir(buf); + dos_chdir(buf); DEBUG(2,("the local directory is now %s\n",GetWd(d))); } diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 47903d20be..6642154683 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -440,7 +440,7 @@ Write two zero blocks at end of file ****************************************************************************/ static void dotareof(int f) { - struct stat stbuf; + SMB_STRUCT_STAT stbuf; /* Two zero blocks at end of file, write out full buffer */ (void) dozerobuf(f, TBLOCK); @@ -2462,10 +2462,10 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind) DEBUG(0,("Option N must be followed by valid file name\n")); return 0; } else { - struct stat stbuf; + SMB_STRUCT_STAT stbuf; extern time_t newer_than; - if (sys_stat(argv[Optind], &stbuf) == 0) { + if (dos_stat(argv[Optind], &stbuf) == 0) { newer_than = stbuf.st_mtime; DEBUG(1,("Getting files newer than %s", asctime(LocalTime(&newer_than)))); diff --git a/source3/client/smbmnt.c b/source3/client/smbmnt.c index 9f8eea1cac..9fb0dba99d 100644 --- a/source3/client/smbmnt.c +++ b/source3/client/smbmnt.c @@ -138,7 +138,7 @@ fullpath(const char *p) /* Check whether user is allowed to mount on the specified mount point */ static int -mount_ok(struct stat *st) +mount_ok(SMB_STRUCT_STAT *st) { if (!S_ISDIR(st->st_mode)) { @@ -165,7 +165,7 @@ main(int argc, char *argv[]) int fd, um; unsigned int flags; struct smb_mount_data data; - struct stat st; + SMB_STRUCT_STAT st; struct mntent ment; progname = argv[0]; |