chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09c2bab
)
Make run_directory.c stat the place it is going to try to run.
author
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 9 Nov 2005 17:53:32 +0000
(09:53 -0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 9 Nov 2005 17:53:32 +0000
(09:53 -0800)
This should remove a lot of error messages that people are seeing.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
extras/run_directory/run_directory.c
patch
|
blob
|
history
diff --git
a/extras/run_directory/run_directory.c
b/extras/run_directory/run_directory.c
index 5107f85aefa1771e2ab68232300bb671cde99564..69faecc15e4e31b7caeba7e8e629c24a608fdc14 100644
(file)
--- a/
extras/run_directory/run_directory.c
+++ b/
extras/run_directory/run_directory.c
@@
-53,9
+53,16
@@
static int exec_program(const char *filename, const char *subsystem)
int run_directory(const char *dir, const char *suffix, const char *subsystem)
{
struct name_entry *name_loop, *name_tmp;
+ struct stat buf;
LIST_HEAD(name_list);
dbg("looking at '%s'", dir);
+
+ if (stat(dir, &buf) != 0) {
+ dbg("directory '%s' not found", dir);
+ return 0;
+ }
+
add_matching_files(&name_list, dir, suffix);
list_for_each_entry_safe(name_loop, name_tmp, &name_list, node) {