summaryrefslogtreecommitdiff
path: root/usr/src/lib/libdevinfo/libdevinfo.h
diff options
context:
space:
mode:
authorllai1 <none@none>2006-08-25 17:24:25 -0700
committerllai1 <none@none>2006-08-25 17:24:25 -0700
commitfacf4a8d7b59fde89a8662b4f4c73a758e6c402c (patch)
tree4e0024c5508351006df1496ec4be6e7b564c3ce8 /usr/src/lib/libdevinfo/libdevinfo.h
parentadcafb0fe4c49c4d46c0b393dfba36d4e1b55c0e (diff)
downloadillumos-joyent-facf4a8d7b59fde89a8662b4f4c73a758e6c402c.tar.gz
PSARC/2003/246 Filesystem Driven Device Naming
5050715 logical device names not created during early boot 6292952 devfsadm mishandles optarg 6362924 devfsadm secondary link generation is not zones aware 6413127 Integrate the Devname Project 6464196 bfu should remove pt_chmod, obsoleted by /dev filesystem --HG-- rename : usr/src/cmd/pt_chmod/Makefile => deleted_files/usr/src/cmd/pt_chmod/Makefile rename : usr/src/cmd/pt_chmod/pt_chmod.c => deleted_files/usr/src/cmd/pt_chmod/pt_chmod.c
Diffstat (limited to 'usr/src/lib/libdevinfo/libdevinfo.h')
-rw-r--r--usr/src/lib/libdevinfo/libdevinfo.h45
1 files changed, 41 insertions, 4 deletions
diff --git a/usr/src/lib/libdevinfo/libdevinfo.h b/usr/src/lib/libdevinfo/libdevinfo.h
index 62fa27bcb2..0fac182582 100644
--- a/usr/src/lib/libdevinfo/libdevinfo.h
+++ b/usr/src/lib/libdevinfo/libdevinfo.h
@@ -28,7 +28,12 @@
#pragma ident "%Z%%M% %I% %E% SMI"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <errno.h>
+#include <libnvpair.h>
#include <sys/param.h>
#include <sys/sunddi.h>
#include <sys/sunmdi.h>
@@ -37,10 +42,6 @@
#include <sys/devinfo_impl.h>
#include <limits.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* flags for di_walk_node
*/
@@ -394,6 +395,42 @@ extern int di_dli_openr(char *);
extern int di_dli_openw(char *);
extern void di_dli_close(int);
+/*
+ * Private interface for parsing devname binding info
+ */
+extern void di_devname_print_mapinfo(nvlist_t *);
+extern int di_devname_get_mapinfo(char *, nvlist_t **);
+extern int di_devname_get_mapent(char *, char *, nvlist_t **);
+extern int di_devname_action_on_key(nvlist_t *, uint8_t, char *, void *);
+
+/*
+ * finddev - alternate readdir to discover only /dev persisted device names
+ */
+typedef struct __finddevhdl *finddevhdl_t;
+
+extern int device_exists(const char *);
+extern int finddev_readdir(const char *, finddevhdl_t *);
+extern void finddev_close(finddevhdl_t);
+extern const char *finddev_next(finddevhdl_t);
+
+/* For interfaces implementing search either by readdir or finddev */
+#define FLAG_USE_READDIR 0
+#define FLAG_USE_FINDDEV 1
+
+
+/*
+ * Private interfaces for non-global /dev profile
+ */
+typedef struct __di_prof *di_prof_t;
+
+extern int di_prof_init(const char *mountpt, di_prof_t *);
+extern void di_prof_fini(di_prof_t);
+extern int di_prof_commit(di_prof_t);
+extern int di_prof_add_dev(di_prof_t, const char *);
+extern int di_prof_add_exclude(di_prof_t, const char *);
+extern int di_prof_add_symlink(di_prof_t, const char *, const char *);
+extern int di_prof_add_map(di_prof_t, const char *, const char *);
+
#ifdef __cplusplus
}
#endif