summaryrefslogtreecommitdiffstats
path: root/lib/libzfs/include/libzfs.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 11:56:53 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 13:42:00 -0700
commitd603ed6c278f9c25b17ba8e75e9bce6e5d715ac0 (patch)
tree61dc04f07ed9772dd97faefd879412e2a6578be0 /lib/libzfs/include/libzfs.h
parentf1fb119f6bb0c3185ec88912e4488fdd9ec08ab2 (diff)
Add linux user disk support
This topic branch contains all the changes needed to integrate the user side zfs tools with Linux style devices. Primarily this includes fixing up the Solaris libefi library to be Linux friendly, and integrating with the libblkid library which is provided by e2fsprogs. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'lib/libzfs/include/libzfs.h')
-rw-r--r--lib/libzfs/include/libzfs.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/libzfs/include/libzfs.h b/lib/libzfs/include/libzfs.h
index 197e2eefc..dcbd283ac 100644
--- a/lib/libzfs/include/libzfs.h
+++ b/lib/libzfs/include/libzfs.h
@@ -49,6 +49,26 @@ extern "C" {
#define ZPOOL_MAXPROPLEN MAXPATHLEN
/*
+ * Default device paths
+ */
+
+#if defined(__sun__) || defined(__sun)
+#define DISK_ROOT "/dev/dsk"
+#define RDISK_ROOT "/dev/rdsk"
+#define UDISK_ROOT RDISK_ROOT
+#define FIRST_SLICE "s0"
+#define BACKUP_SLICE "s2"
+#endif
+
+#ifdef __linux__
+#define DISK_ROOT "/dev"
+#define RDISK_ROOT DISK_ROOT
+#define UDISK_ROOT "/dev/disk"
+#define FIRST_SLICE "1"
+#define BACKUP_SLICE ""
+#endif
+
+/*
* libzfs errors
*/
enum {
@@ -248,6 +268,7 @@ extern nvlist_t *zpool_find_vdev(zpool_handle_t *, const char *, boolean_t *,
boolean_t *, boolean_t *);
extern nvlist_t *zpool_find_vdev_by_physpath(zpool_handle_t *, const char *,
boolean_t *, boolean_t *, boolean_t *);
+extern int zpool_label_disk_wait(char *, int);
extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, char *);
/*
@@ -661,9 +682,6 @@ extern int zpool_in_use(libzfs_handle_t *, int, pool_state_t *, char **,
extern int zpool_read_label(int, nvlist_t **);
extern int zpool_clear_label(int);
-/* is this zvol valid for use as a dump device? */
-extern int zvol_check_dump_config(char *);
-
/*
* Management interfaces for SMB ACL files
*/