summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/mdevd.html12
-rw-r--r--src/mdevd/mdevd.c5
2 files changed, 12 insertions, 5 deletions
diff --git a/doc/mdevd.html b/doc/mdevd.html
index b5b8a36..3b21565 100644
--- a/doc/mdevd.html
+++ b/doc/mdevd.html
@@ -90,13 +90,17 @@ is seriously verbose debugging. </li>
device nodes, and it will not spawn commands. Instead, it will print to stdout
the commands it would have spawned. </li>
<li> <tt>-f</tt>&nbsp;<em>conffile</em>&nbsp;: read the configuration
-file from <em>conffile</em>. Default is <tt>/etc/mdev.conf</tt>. </li>
+file from <em>conffile</em>. Default is <tt>/etc/mdev.conf</tt>.
+<em>conffile</em> must be an absolute path. </li>
<li> <tt>-s</tt>&nbsp;<em>slashsys</em>&nbsp;: assume the sysfs
-pseudo-filesystem is mounted on <em>slashsys</em>. Default is <tt>/sys</tt>. </li>
+pseudo-filesystem is mounted on <em>slashsys</em>. Default is <tt>/sys</tt>.
+<em>slashsys</em> must be an absolute path. </li>
<li> <tt>-d</tt>&nbsp;<em>slashdev</em>&nbsp;: assume the device nodes
-are to be found in <em>slashdev</em>. Default is <tt>/dev</tt>. </li>
+are to be found in <em>slashdev</em>. Default is <tt>/dev</tt>.
+<em>slashdev</em> must be an absolute path. </li>
<li> <tt>-F</tt>&nbsp;<em>fwbase</em>&nbsp;: assume the firmware files, if any,
-are to be found in <em>fwbase</em>. Default is <tt>/lib/firmware</tt>. </li>
+are to be found in <em>fwbase</em>. Default is <tt>/lib/firmware</tt>.
+<em>fwbase</em> must be an absolute path. </li>
</ul>
<h2> Configuration file </h2>
diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c
index 3df038a..296f290 100644
--- a/src/mdevd/mdevd.c
+++ b/src/mdevd/mdevd.c
@@ -918,7 +918,10 @@ int main (int argc, char const *const *argv)
}
}
argc -= l.ind ; argv += l.ind ;
- if (configfile[0] != '/') strerr_dief1x(100, "conffile must be an absolute path") ;
+ if (configfile[0] != '/') strerr_dief2x(100, configfile, " is not an absolute path") ;
+ if (slashsys[0] != '/') strerr_dief2x(100, slashsys, " is not an absolute path") ;
+ if (slashdev[0] != '/') strerr_dief2x(100, slashdev, " is not an absolute path") ;
+ if (fwbase[0] != '/') strerr_dief2x(100, fwbase, " is not an absolute path") ;
if (chdir(slashdev) < 0) strerr_diefu2sys(111, "chdir to ", slashdev) ;
}