just use bb_xfopen()
This commit is contained in:
parent
bb12d6f728
commit
705fad2964
@ -169,10 +169,7 @@ extern int lsmod_main(int argc, char **argv)
|
|||||||
FILE *file;
|
FILE *file;
|
||||||
char line[4096];
|
char line[4096];
|
||||||
|
|
||||||
file = fopen("/proc/modules", "r");
|
file = bb_xfopen("/proc/modules", "r");
|
||||||
|
|
||||||
if (!file)
|
|
||||||
bb_error_msg_and_die("Opening /proc/modules");
|
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), file)) {
|
while (fgets(line, sizeof(line), file)) {
|
||||||
char *tok;
|
char *tok;
|
||||||
|
Loading…
Reference in New Issue
Block a user