<div dir="ltr">There is no 2/2 patch - I formatted the patch wrong...</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 8, 2018 at 10:11 AM, Rashmica Gupta <span dir="ltr"><<a href="mailto:rashmica.g@gmail.com" target="_blank">rashmica.g@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If CONFIG_SCOM_DEBUGFS is not set in the running kernel then<br>
the scom controllers are not exposed and so using getscom<br>
won't work. Add check for /sys/kernel/debug/powerpc/scom to<br>
give a more useful error message.<br>
<br>
Signed-off-by: Rashmica Gupta <<a href="mailto:rashmica.g@gmail.com">rashmica.g@gmail.com</a>><br>
---<br>
 libpdbg/host.c | 7 +++++++<br>
 1 file changed, 7 insertions(+)<br>
<br>
diff --git a/libpdbg/host.c b/libpdbg/host.c<br>
index f43b355..cf71e5c 100644<br>
--- a/libpdbg/host.c<br>
+++ b/libpdbg/host.c<br>
@@ -95,6 +95,13 @@ static int host_pib_probe(struct pdbg_target *target)<br>
        if (chip_id == -1)<br>
                goto out;<br>
<br>
+       /* This check should probably be done earlier */<br>
+       if (access(XSCOM_BASE_PATH, F_OK) == -1)<br>
+       {<br>
+               fprintf(stderr, "Can not access %s. ", XSCOM_BASE_PATH);<br>
+               fprintf(stderr, "Is CONFIG_SCOM_DEBUGFS set?\n");<br>
+       }<br>
+<br>
        if (asprintf(&access_fn, "%s/%08d/access", XSCOM_BASE_PATH, chip_id) < 0)<br>
                goto out;<br>
<span class="HOEnZb"><font color="#888888"> <br>
-- <br>
2.14.3<br>
<br>
</font></span></blockquote></div><br></div>