From 58d76cb1602114e5fca23f010dd01f440fbf9da6 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 30 Mar 2022 17:42:23 -0700 Subject: [PATCH] test/zdtm/static/inotify_system.c: s/inot/infd/ Codespell thinks that "inot" is a misspelled "into". Rename to infd ("inotify fd") to make it happy. Signed-off-by: Kir Kolyshkin --- test/zdtm/static/inotify_system.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/zdtm/static/inotify_system.c b/test/zdtm/static/inotify_system.c index 487062cab..769825bc1 100644 --- a/test/zdtm/static/inotify_system.c +++ b/test/zdtm/static/inotify_system.c @@ -63,7 +63,7 @@ const char *inot_dir = "./inotify.nodel"; #include typedef struct { - int inot; + int infd; int file; int link; int dir; @@ -165,8 +165,8 @@ desc init_env(const char *dir, char *file_path, char *link_path) pr_perror("mkdir(%s)", dir); return in_desc; } - in_desc.inot = inotify_init(); - if (in_desc.inot < 0) { + in_desc.infd = inotify_init(); + if (in_desc.infd < 0) { pr_perror("inotify_init() failed"); rmdir(dir); return in_desc; @@ -184,12 +184,12 @@ desc init_env(const char *dir, char *file_path, char *link_path) return in_desc; } - in_desc.dir = addWatcher(in_desc.inot, dir); + in_desc.dir = addWatcher(in_desc.infd, dir); if (createFiles(file_path, filename, link_path)) { return in_desc; } - in_desc.link = addWatcher(in_desc.inot, link_path); - in_desc.file = addWatcher(in_desc.inot, file_path); + in_desc.link = addWatcher(in_desc.infd, link_path); + in_desc.file = addWatcher(in_desc.infd, file_path); return in_desc; } @@ -299,9 +299,9 @@ int read_set(int inot_fd, char *event_set) void common_close(desc *descr) { - if (descr->inot > 0) { - close(descr->inot); - descr->inot = -1; + if (descr->infd > 0) { + close(descr->infd); + descr->infd = -1; descr->file = -1; descr->dir = -1; descr->link = -1; @@ -316,7 +316,7 @@ int get_event_set(char *event_set, int wait) desc common_desc; common_desc = init_env(inot_dir, file_path, link_path); - if ((common_desc.inot < 0) || (common_desc.file < 0) || (common_desc.dir < 0) || (common_desc.link < 0)) { + if ((common_desc.infd < 0) || (common_desc.file < 0) || (common_desc.dir < 0) || (common_desc.link < 0)) { common_close(&common_desc); return -1; } @@ -327,7 +327,7 @@ int get_event_set(char *event_set, int wait) if (wait) { do_wait(); } - len = read_set(common_desc.inot, event_set); + len = read_set(common_desc.infd, event_set); common_close(&common_desc); #ifdef NODEL if (!(fDelete(file_path) == 0 && fDelete(link_path) == 0 && fRemDir(inot_dir) == 0))