aboutsummaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-07-15 10:54:51 -0700
committerBen Pfaff <blp@nicira.com>2009-07-16 09:17:03 -0700
commita8b5f8b423e5d54ba8bb6e68cc5b9dc22215d302 (patch)
treea0210cb55a95b4e041dbcfbf7441c49e10bae22a /extras
parentaec7d2fba60768ce5f3c6694767c61520e9e40de (diff)
Add function get_null_fd(), to reduce code redundancy.
Diffstat (limited to 'extras')
-rw-r--r--extras/ezio/ezio-term.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/extras/ezio/ezio-term.c b/extras/ezio/ezio-term.c
index 93ec1c28..846ccfde 100644
--- a/extras/ezio/ezio-term.c
+++ b/extras/ezio/ezio-term.c
@@ -106,7 +106,7 @@ main(int argc, char *argv[])
argv += optind;
/* Make sure that the ezio3 terminfo entry is available. */
- dummy_fd = open("/dev/null", O_RDWR);
+ dummy_fd = get_null_fd();
if (dummy_fd >= 0) {
if (setupterm("ezio3", dummy_fd, &retval) == ERR) {
if (retval == 0) {
@@ -118,9 +118,6 @@ main(int argc, char *argv[])
}
}
del_curterm(cur_term);
- close(dummy_fd);
- } else {
- ovs_error(errno, "failed to open /dev/null");
}
/* Lock serial port. */