*
* Copyright 2004 Tony J. White
*
- * May be distributed under the conditions of the
- * GNU Library General Public License
+ * Licensed under GPLv2, see file LICENSE in this tarball for details.
*/
#include "libbb.h"
tmp_dev = find_socket_dev();
sprintf(path, "/proc/net/%s", proto);
- f = fopen(path, "r");
+ f = fopen_for_read(path);
if (!f)
return ilist;
long long uint64_inode;
dev_t dev;
- file = fopen(fname, "r");
+ file = fopen_for_read(fname);
if (!file)
return plist;
while (fgets(line, MAX_LINE, file)) {
free(proto);
} else { /* FILE */
if (!file_to_dev_inode(*pp, &dev, &inode))
- bb_perror_msg_and_die("can't open %s", *pp);
+ bb_perror_msg_and_die("can't open '%s'", *pp);
ilist = add_inode(ilist, dev, inode);
}
pp++;