fix unsafe bb_perror_msg(filename) calls
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 27 Sep 2012 13:35:10 +0000 (15:35 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 27 Sep 2012 13:35:10 +0000 (15:35 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/stat.c
e2fsprogs/old_e2fsprogs/lsattr.c

index 3fb212f0f2a318f49e00d1454cf0ea5ce95f453e..e38c8f6b032079c6ea072b44b7ed81228799ddbb 100644 (file)
@@ -442,7 +442,7 @@ static bool do_statfs(const char *filename, const char *format)
                     : getfilecon(filename, &scontext)
                    ) < 0
                ) {
-                       bb_perror_msg(filename);
+                       bb_simple_perror_msg(filename);
                        return 0;
                }
        }
@@ -555,7 +555,7 @@ static bool do_stat(const char *filename, const char *format)
                     : getfilecon(filename, &scontext)
                    ) < 0
                ) {
-                       bb_perror_msg(filename);
+                       bb_simple_perror_msg(filename);
                        return 0;
                }
        }
index 9e0e4cb602f97144138b7225e170e750811ae258..9eab68b5b27a9b0f7abfede4a6123ef3ff7a7e62 100644 (file)
@@ -93,7 +93,7 @@ static int lsattr_dir_proc(const char *dir_name, struct dirent *de,
        path = concat_path_file(dir_name, de->d_name);
 
        if (lstat(path, &st) == -1)
-               bb_perror_msg(path);
+               bb_simple_perror_msg(path);
        else {
                if (de->d_name[0] != '.' || (flags & OPT_ALL)) {
                        list_attributes(path);