diff options
author | Werner Koch <[email protected]> | 2009-10-13 19:17:24 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-10-13 19:17:24 +0000 |
commit | 536b6ab09fa3e17f955c8b55e8469f3265a1936f (patch) | |
tree | a06fba4fb448cc70de12a470d7dde7f22c3eaf8f /common/iobuf.c | |
parent | Replace C99 style vararg macro which was anyway not correct. (diff) | |
download | gnupg-536b6ab09fa3e17f955c8b55e8469f3265a1936f.tar.gz gnupg-536b6ab09fa3e17f955c8b55e8469f3265a1936f.zip |
Keep on hacking on g13. A simple --create and --mount does now work.
A hacked up encfs is required.
Diffstat (limited to 'common/iobuf.c')
-rw-r--r-- | common/iobuf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index e3ea0b4cb..60e50d677 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -1262,22 +1262,22 @@ iobuf_is_pipe_filename (const char *fname) /* Either open the file specified by the file descriptor FD or - if FD - is GNUPG_INVALID_FD - the file with name FNAME. As of now MODE is - assumed to be "rb" if FNAME is used. In contrast to iobuf_fdopen - the fiel descriptor FD will not be closed during an iobuf_close. */ + is -1, the file with name FNAME. As of now MODE is assumed to be + "rb" if FNAME is used. In contrast to iobuf_fdopen the file + descriptor FD will not be closed during an iobuf_close. */ iobuf_t -iobuf_open_fd_or_name (gnupg_fd_t fd, const char *fname, const char *mode) +iobuf_open_fd_or_name (int fd, const char *fname, const char *mode) { iobuf_t a; - if (fd == GNUPG_INVALID_FD) + if (fd == -1) a = iobuf_open (fname); else { - gnupg_fd_t fd2; + int fd2; fd2 = dup (fd); - if (fd2 == GNUPG_INVALID_FD) + if (fd2 == -1) a = NULL; else a = iobuf_fdopen (fd2, mode); |