mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev: Use util_readlink() for consistent error handling
Avoid code duplication and inconsistent error handling by replacing readlink() with util_readlink(), which is used project-wide to standardize readlink() usage. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Polensky <japo@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
dd818ccc15
commit
8ad28f7856
@@ -10,6 +10,7 @@
|
||||
#include <libgen.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "lib/util_libc.h"
|
||||
#include "lib/util_path.h"
|
||||
|
||||
#include "attrib.h"
|
||||
@@ -133,7 +134,7 @@ static exit_code_t add_cb(const char *abs_path, const char *rel_path,
|
||||
unsigned int i, major, minor;
|
||||
struct devnode *devnode;
|
||||
|
||||
link = misc_readlink(abs_path);
|
||||
link = util_readlink(abs_path);
|
||||
if (!link)
|
||||
return EXIT_OK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user