mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
fix from uClinux-dist for proper exit status if reading /proc/modules failed
This commit is contained in:
parent
b306cb767f
commit
75c6b7962d
@ -190,13 +190,13 @@ int lsmod_main(int argc, char **argv)
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
return 0; /* Success */
|
||||
return EXIT_SUCCESS;
|
||||
#else
|
||||
if (bb_xprint_file_by_name("/proc/modules") < 0) {
|
||||
return 0;
|
||||
}
|
||||
if (bb_xprint_file_by_name("/proc/modules") == 0)
|
||||
return EXIT_SUCCESS;
|
||||
#endif /* CONFIG_FEATURE_2_6_MODULES */
|
||||
return 1;
|
||||
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
|
||||
|
Loading…
Reference in New Issue
Block a user