ethr-wake: can use ether_hostton on uclibc >= 0.9.30
[oweals/busybox.git] / procps / fuser.c
index ca7c7e267fae3c52d6ddf641252c1fddd1d438a1..dc3d01bdaa918aaa219eddf8c8d3c2f4e754cf1c 100644 (file)
@@ -4,8 +4,7 @@
  *
  * 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"
@@ -109,7 +108,7 @@ static inode_list *scan_proc_net(const char *proto,
        tmp_dev = find_socket_dev();
 
        sprintf(path, "/proc/net/%s", proto);
-       f = fopen(path, "r");
+       f = fopen_for_read(path);
        if (!f)
                return ilist;
 
@@ -158,7 +157,7 @@ static pid_list *scan_pid_maps(const char *fname, pid_t pid,
        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)) {
@@ -326,7 +325,7 @@ Find processes which use FILEs or PORTs
                        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++;