]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util-lib: move inotify-related definitions to fs-util.[ch] 1691/head
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2015 13:58:05 +0000 (14:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2015 13:58:05 +0000 (14:58 +0100)
src/basic/fs-util.h
src/basic/util.h
src/core/cgroup.c
src/core/path.c
src/journal/sd-journal.c
src/libsystemd/sd-network/sd-network.c

index 0e1906ba3f17effd5062df391f039f2130babe39..b94873e65be5442820378cd5edc9508bd3ed243b 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <sys/types.h>
 #include <fcntl.h>
+#include <sys/inotify.h>
+#include <sys/types.h>
 #include <unistd.h>
+#include <limits.h>
 
 #include "time-util.h"
 
@@ -58,3 +60,15 @@ int mknod_atomic(const char *path, mode_t mode, dev_t dev);
 int mkfifo_atomic(const char *path, mode_t mode);
 
 int get_files_in_directory(const char *path, char ***list);
+
+#define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1)
+
+#define FOREACH_INOTIFY_EVENT(e, buffer, sz) \
+        for ((e) = &buffer.ev;                                \
+             (uint8_t*) (e) < (uint8_t*) (buffer.raw) + (sz); \
+             (e) = (struct inotify_event*) ((uint8_t*) (e) + sizeof(struct inotify_event) + (e)->len))
+
+union inotify_event_buffer {
+        struct inotify_event ev;
+        uint8_t raw[INOTIFY_EVENT_MAX];
+};
index 2c2cb36190b81ebc0a8c5b766238c1970311b363..a8fba372d1b21e29a16601c414e1f0d20f3dab9b 100644 (file)
@@ -181,16 +181,4 @@ uint64_t physical_memory(void);
 
 int update_reboot_param_file(const char *param);
 
-#define INOTIFY_EVENT_MAX (sizeof(struct inotify_event) + NAME_MAX + 1)
-
-#define FOREACH_INOTIFY_EVENT(e, buffer, sz) \
-        for ((e) = &buffer.ev;                                \
-             (uint8_t*) (e) < (uint8_t*) (buffer.raw) + (sz); \
-             (e) = (struct inotify_event*) ((uint8_t*) (e) + sizeof(struct inotify_event) + (e)->len))
-
-union inotify_event_buffer {
-        struct inotify_event ev;
-        uint8_t raw[INOTIFY_EVENT_MAX];
-};
-
 int version(void);
index 70f6d4af0f74cd168c413dff13722160f71552e7..bed01fde211cee56161eb9e0053571d1ba3ff463 100644 (file)
@@ -27,6 +27,7 @@
 #include "cgroup.h"
 #include "fd-util.h"
 #include "fileio.h"
+#include "fs-util.h"
 #include "parse-util.h"
 #include "path-util.h"
 #include "process-util.h"
index 9c5309a58a6f72c5dc04a98c800f25272403e4dd..35e1753583841cf3c4da47a2392ee2f55d95d3e5 100644 (file)
@@ -28,6 +28,7 @@
 #include "bus-util.h"
 #include "dbus-path.h"
 #include "fd-util.h"
+#include "fs-util.h"
 #include "glob-util.h"
 #include "macro.h"
 #include "mkdir.h"
index 6eda5162c7350d379372a1619f0d4438bf2d7cab..043087485b724e3e89dc93b11cdc8470ed230520 100644 (file)
@@ -37,6 +37,7 @@
 #include "fd-util.h"
 #include "fileio.h"
 #include "formats-util.h"
+#include "fs-util.h"
 #include "hashmap.h"
 #include "hostname-util.h"
 #include "io-util.h"
index 2eaa2626f770d05addd550c7893873a6cebaa4cf..efbceba83d114c18aa3ba7dae0d7f2b988858576 100644 (file)
 #include "sd-network.h"
 
 #include "alloc-util.h"
+#include "fd-util.h"
 #include "fileio.h"
+#include "fs-util.h"
 #include "macro.h"
+#include "parse-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
-#include "fd-util.h"
-#include "parse-util.h"
 
 _public_ int sd_network_get_operational_state(char **state) {
         _cleanup_free_ char *s = NULL;