aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/iobuf.c17
-rw-r--r--common/iobuf.h2
2 files changed, 0 insertions, 19 deletions
diff --git a/common/iobuf.c b/common/iobuf.c
index 66f669ba8..9d3ce9897 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -1301,23 +1301,6 @@ iobuf_is_pipe_filename (const char *fname)
}
-/* Either open the file specified by the file descriptor FD or - if FD
- 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_t a;
-
- if (fd == GNUPG_INVALID_FD)
- a = iobuf_open (fname);
- else
- a = iobuf_fdopen_nc (FD2INT(fd), mode);
- return a;
-}
-
-
/****************
* Create a head iobuf for reading from a file
* returns: NULL if an error occures and sets errno
diff --git a/common/iobuf.h b/common/iobuf.h
index 18e1be14c..5cfccb8f0 100644
--- a/common/iobuf.h
+++ b/common/iobuf.h
@@ -118,8 +118,6 @@ int iobuf_is_pipe_filename (const char *fname);
iobuf_t iobuf_alloc (int use, size_t bufsize);
iobuf_t iobuf_temp (void);
iobuf_t iobuf_temp_with_content (const char *buffer, size_t length);
-iobuf_t iobuf_open_fd_or_name (gnupg_fd_t fd, const char *fname,
- const char *mode);
iobuf_t iobuf_open (const char *fname);
iobuf_t iobuf_fdopen (int fd, const char *mode);
iobuf_t iobuf_fdopen_nc (int fd, const char *mode);