Skip to content

Commit

Permalink
dd: do not log missing uid file when creating new dump dir
Browse files Browse the repository at this point in the history
It is expected that the file can be missing so there is no need to log this
problem.
Adding DD_FAIL_QUIETLY_ENOENT prevents logging in case the file doesn't exist.

Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
  • Loading branch information
Matej Habrnal committed May 23, 2016
1 parent 6367ef0 commit 460cfda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/create_dump_dir.c
Expand Up @@ -103,7 +103,7 @@ struct dump_dir *create_dump_dir(const char *base_dir_name, const char *type, ui
* reporting from anaconda where we can't read /etc/{system,redhat}-release
* and os_release is taken from anaconda
*/
char *uid_str = dd_load_text_ext(dd, FILENAME_UID, DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
char *uid_str = dd_load_text_ext(dd, FILENAME_UID, DD_FAIL_QUIETLY_ENOENT | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
const uid_t crashed_uid = uid_str != NULL ? /*uid already saved*/-1 : uid;
dd_create_basic_files(dd, crashed_uid, NULL);

Expand Down

0 comments on commit 460cfda

Please sign in to comment.