aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-13 12:45:04 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-04-13 12:45:04 +0000
commitc2cb0f32b44a9918364af39c24b5643388c553f6 (patch)
tree378b5a002da81f8622913cc6a9aeac873e307ec9 /modutils
parent4f3d2deaa499af34c22a7f9be121131b0a5894b5 (diff)
downloadbusybox-w32-c2cb0f32b44a9918364af39c24b5643388c553f6.tar.gz
busybox-w32-c2cb0f32b44a9918364af39c24b5643388c553f6.tar.bz2
busybox-w32-c2cb0f32b44a9918364af39c24b5643388c553f6.zip
- patch from Denis Vlasenko to add and use bb_xopen3()
Diffstat (limited to 'modutils')
-rw-r--r--modutils/insmod.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 2eebf560f..f38daa257 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -55,20 +55,7 @@
55 * Restructured (and partly rewritten) by: 55 * Restructured (and partly rewritten) by:
56 * Björn Ekwall <bj0rn@blox.se> February 1999 56 * Björn Ekwall <bj0rn@blox.se> February 1999
57 * 57 *
58 * This program is free software; you can redistribute it and/or modify 58 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
59 * it under the terms of the GNU General Public License as published by
60 * the Free Software Foundation; either version 2 of the License, or
61 * (at your option) any later version.
62 *
63 * This program is distributed in the hope that it will be useful,
64 * but WITHOUT ANY WARRANTY; without even the implied warranty of
65 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
66 * General Public License for more details.
67 *
68 * You should have received a copy of the GNU General Public License
69 * along with this program; if not, write to the Free Software
70 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
71 *
72 */ 59 */
73 60
74#include <stdlib.h> 61#include <stdlib.h>
@@ -4297,9 +4284,7 @@ int insmod_ng_main( int argc, char **argv)
4297 strcat(options, " "); 4284 strcat(options, " ");
4298 } 4285 }
4299 4286
4300 if ((fd = open(filename, O_RDONLY, 0)) < 0) { 4287 fd = bb_xopen3(filename, O_RDONLY, 0);
4301 bb_perror_msg_and_die("cannot open module `%s'", filename);
4302 }
4303 4288
4304 fstat(fd, &st); 4289 fstat(fd, &st);
4305 len = st.st_size; 4290 len = st.st_size;