diff options
-rw-r--r-- | enums/res.in | 1 | ||||
-rw-r--r-- | pseudo.c | 9 | ||||
-rw-r--r-- | pseudo_client.c | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/enums/res.in b/enums/res.in index 435338f..b0096b4 100644 --- a/enums/res.in +++ b/enums/res.in @@ -2,3 +2,4 @@ res: RESULT succeed fail error +abort @@ -695,17 +695,15 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon msg->path); pdb_did_unlink_file(path_by_ino, &by_ino, by_ino.deleting); } else { - int flags = 0; - if (msg->nlink > 1) { - flags = PDBGF_FILE | PDBGF_VERBOSE; - } - pseudo_debug(flags, "path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n", + pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n", msg->nlink, msg->nlink == 1 ? "" : "s", (unsigned long long) msg_header.ino, path_by_ino ? path_by_ino : "no path", msg->path); found_ino = 0; + msg->result = RESULT_ABORT; + goto op_exit; } } } else { @@ -1025,6 +1023,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon break; } +op_exit: /* in the case of an exact match, we just used the pointer * rather than allocating space. */ diff --git a/pseudo_client.c b/pseudo_client.c index 401f141..bcaf2dd 100644 --- a/pseudo_client.c +++ b/pseudo_client.c @@ -1923,6 +1923,10 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path #endif if (result) { pseudo_debug(PDBGF_OP, "(%d) %s", getpid(), pseudo_res_name(result->result)); + if (result->result == RESULT_ABORT) { + pseudo_diag("abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.\n"); + abort(); + } if (op == OP_STAT || op == OP_FSTAT) { pseudo_debug(PDBGF_OP, " mode 0%o uid %d:%d", (int) result->mode, |