Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
34c83516
Commit
34c83516
authored
Dec 07, 1999
by
Niels Möller
Browse files
* src/io.c (io_read_file): New function.
Rev: src/io.c:1.82 Rev: src/io.h:1.51
parent
14047d99
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/io.c
View file @
34c83516
...
...
@@ -1252,3 +1252,15 @@ io_write_file(struct io_backend *backend,
return
io_write
(
make_io_fd
(
backend
,
fd
,
e
),
block_size
,
c
);
}
struct
io_fd
*
io_read_file
(
struct
io_backend
*
backend
,
const
char
*
fname
,
struct
exception_handler
*
e
)
{
int
fd
=
open
(
fname
,
O_RDONLY
);
if
(
fd
<
0
)
return
NULL
;
return
make_io_fd
(
backend
,
fd
,
e
);
}
src/io.h
View file @
34c83516
...
...
@@ -371,4 +371,9 @@ struct io_fd *io_write_file(struct io_backend *backend,
struct
close_callback
*
c
,
struct
exception_handler
*
e
);
struct
io_fd
*
io_read_file
(
struct
io_backend
*
backend
,
const
char
*
fname
,
struct
exception_handler
*
e
);
#endif
/* LSH_IO_H_INCLUDED */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment