diff options
| author | Andreas Schneider <mail@cynapses.org> | 2009-04-05 10:15:57 +0000 |
|---|---|---|
| committer | Andreas Schneider <mail@cynapses.org> | 2009-04-05 10:15:57 +0000 |
| commit | 01e789184a27429775838ac7a211cf55b52b2e4f (patch) | |
| tree | 1640d8d132f8f0edfc1548385b0e0219e46ea59c /libssh | |
| parent | 58fd38cd90684658ec7f774160cf833bc29aa1ed (diff) | |
| download | libssh-01e789184a27429775838ac7a211cf55b52b2e4f.tar.gz libssh-01e789184a27429775838ac7a211cf55b52b2e4f.tar.xz libssh-01e789184a27429775838ac7a211cf55b52b2e4f.zip | |
Don't shadow a global variable declaration on unistd.h.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@398 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
| -rw-r--r-- | libssh/sftp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c index 54446eef..c00d1672 100644 --- a/libssh/sftp.c +++ b/libssh/sftp.c @@ -987,7 +987,7 @@ int sftp_closedir(SFTP_DIR *dir){ } /* Open a file on the server. */ -SFTP_FILE *sftp_open(SFTP_SESSION *sftp, const char *file, int access, mode_t mode){ +SFTP_FILE *sftp_open(SFTP_SESSION *sftp, const char *file, int flags, mode_t mode){ SFTP_FILE *handle; SFTP_MESSAGE *msg=NULL; STATUS_MESSAGE *status; @@ -1001,17 +1001,17 @@ SFTP_FILE *sftp_open(SFTP_SESSION *sftp, const char *file, int access, mode_t mo attr.permissions = mode; attr.flags = SSH_FILEXFER_ATTR_PERMISSIONS; - if(access == O_RDONLY) + if(flags == O_RDONLY) flags|=SSH_FXF_READ; // if any of the other flag is set, READ should not be set initialy - if(access & O_WRONLY) + if(flags & O_WRONLY) flags |= SSH_FXF_WRITE; - if(access & O_RDWR) + if(flags & O_RDWR) flags|=(SSH_FXF_WRITE | SSH_FXF_READ); - if(access & O_CREAT) + if(flags & O_CREAT) flags |=SSH_FXF_CREAT; - if(access & O_TRUNC) + if(flags & O_TRUNC) flags |=SSH_FXF_TRUNC; - if(access & O_EXCL) + if(flags & O_EXCL) flags |= SSH_FXF_EXCL; buffer_add_u32(buffer,id); filename=string_from_char(file); |
