[pseudo,v2] pseudo_client: Print PSEUDO_LOGFILE path in abort message on path mismatches

Submitted by Tomasz Dziendzielski on Nov. 27, 2020, 9:44 a.m. | Patch ID: 178846

Details

Message ID 20201127094455.18760-1-tomasz.dziendzielski@gmail.com
State New
Headers show

Commit Message

Tomasz Dziendzielski Nov. 27, 2020, 9:44 a.m.
The logfile path should be more visible so it's easier investigate the error.

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>

---
 pseudo_client.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.29.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145017): https://lists.openembedded.org/g/openembedded-core/message/145017
Mute This Topic: https://lists.openembedded.org/mt/78544492/3616849
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/pseudo_client.c b/pseudo_client.c
index 116d926..ea9d551 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -1965,7 +1965,9 @@  pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
 		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");
+				char *local_state_dir = pseudo_get_value("PSEUDO_LOCALSTATEDIR");
+				pseudo_diag("abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.\n"
+					"Check logfile: %s/%s\n", local_state_dir, PSEUDO_LOGFILE);
 				abort();
 			}
 			if (op == OP_STAT || op == OP_FSTAT) {