zdev: use libutil provided path functions

Closes: #20

Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
Rafael Fonseca
2017-11-23 19:32:48 +01:00
committed by Michael Holzheu
parent df133846b5
commit d542138868
21 changed files with 84 additions and 122 deletions
+3 -1
View File
@@ -13,6 +13,8 @@
#include <stdlib.h>
#include <string.h>
#include "lib/util_path.h"
#include "attrib.h"
#include "ccw.h"
#include "device.h"
@@ -391,7 +393,7 @@ exit_code_t udev_remove_rule(const char *type, const char *id)
exit_code_t rc = EXIT_OK;
path = path_get_udev_rule(type, id);
if (file_exists(path))
if (util_path_is_reg_file(path))
rc = remove_file(path);
free(path);