summaryrefslogtreecommitdiff
path: root/rootdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'rootdev.h')
-rw-r--r--rootdev.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/rootdev.h b/rootdev.h
index 05c3da1..74a48da 100644
--- a/rootdev.h
+++ b/rootdev.h
@@ -79,12 +79,14 @@ void rootdev_get_device_slave(char *slave, size_t size, dev_t *dev,
* @path is populated for all return codes.
* Returns 0 on success and non-zero on error:
* -1 on unexpected errors (@path may be invalid)
+ * 1 on no existing @path
+ * 2 @path exists but the dev_t value is mismatched.
*
* Nb, this function does NOT search /dev for a match. It performs a normal
- * string concatenation.
- * We can't check if the device actually exists as vendors may create an
- * SELinux context we don't know about for it (in which case, this function
- * would always fail).
+ * string concatenation and probes for the existence. If udev has moved,
+ * or otherwise renamed, the device, a positive value is returned.
+ * The caller may then use the dev_t and @path to create the node with
+ * mknod(2).
*/
int rootdev_get_path(char *path, size_t size, const char *device, dev_t dev,
const char *dev_path);