From 536b6ab09fa3e17f955c8b55e8469f3265a1936f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 13 Oct 2009 19:17:24 +0000 Subject: Keep on hacking on g13. A simple --create and --mount does now work. A hacked up encfs is required. --- common/iobuf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'common/iobuf.c') 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); -- cgit v1.2.3