diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2014-01-11 20:21:43 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-01-11 20:21:43 -0500 |
commit | 9df52d1915b56d5d83cacf834b02d98dadf3bb2e (patch) | |
tree | 994e8b8db64f1f4a875bf875a7f8ce8a2d4057fb /src/udev | |
parent | 1e60f44be995edf571ece7a11dac2a7333d47096 (diff) |
src/udev/path-util.[ch]: remove duplicates
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/Makefile.am | 2 | ||||
-rw-r--r-- | src/udev/path-util.c | 57 | ||||
-rw-r--r-- | src/udev/path-util.h | 26 |
3 files changed, 0 insertions, 85 deletions
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index bf23ea63d4..d395620abb 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -58,7 +58,6 @@ libudev_core_la_SOURCES = \ dev-setup.c \ label.c \ mkdir.c \ - path-util.c \ smack-util.c if ENABLE_FIRMWARE @@ -70,7 +69,6 @@ noinst_HEADERS = \ dev-setup.h \ label.h \ mkdir.h \ - path-util.h \ smack-util.h include_HEADERS = \ diff --git a/src/udev/path-util.c b/src/udev/path-util.c deleted file mode 100644 index 17650be086..0000000000 --- a/src/udev/path-util.c +++ /dev/null @@ -1,57 +0,0 @@ -/*** - This file is part of eudev, forked from systemd. - - Copyright 2010-2012 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <stdlib.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> - -#include "util.h" -#include "path-util.h" - -bool paths_check_timestamp(char **paths, usec_t *paths_ts_usec, bool update) -{ - unsigned int i; - bool changed = false; - - if (paths == NULL) - goto out; - - for (i = 0; paths[i]; i++) { - struct stat stats; - - if (stat(paths[i], &stats) < 0) - continue; - - if (paths_ts_usec[i] == timespec_load(&stats.st_mtim)) - continue; - - /* first check */ - if (paths_ts_usec[i] != 0) { - log_debug("reload - timestamp of '%s' changed\n", paths[i]); - changed = true; - } - - /* update timestamp */ - if (update) - paths_ts_usec[i] = timespec_load(&stats.st_mtim); - } -out: - return changed; -} diff --git a/src/udev/path-util.h b/src/udev/path-util.h deleted file mode 100644 index ceaaded284..0000000000 --- a/src/udev/path-util.h +++ /dev/null @@ -1,26 +0,0 @@ -/*** - This file is part of eudev, forked from systemd. - - Copyright 2010-2012 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <stdbool.h> -#include <inttypes.h> - -typedef uint64_t usec_t; -typedef uint64_t nsec_t; - -bool paths_check_timestamp(char **paths, usec_t *paths_ts_usec, bool update); |