本文整理了Java中org.jvnet.solaris.libzfs.jna.zfs_prop_t
类的一些代码示例,展示了zfs_prop_t
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。zfs_prop_t
类的具体详情如下:
包路径:org.jvnet.solaris.libzfs.jna.zfs_prop_t
类名称:zfs_prop_t
[英]Dataset properties are identified by these constants and must be added to the end of this list to ensure that external consumers are not affected by the change. If you make any changes to this list, be sure to update the property table in usr/src/common/zfs/zfs_prop.c.
[中]数据集属性由这些常量标识,必须添加到此列表的末尾,以确保外部使用者不受更改的影响。如果对此列表进行任何更改,请确保更新usr/src/common/zfs/zfs_prop中的属性表。C
代码示例来源:origin: org.kohsuke/libzfs
public Map<zfs_prop_t,String> getZfsProperty(Collection<zfs_prop_t> props) {
Memory propbuf = new Memory(libzfs.ZFS_MAXPROPLEN);
char[] buf = null;
IntByReference ibr = null;
Hashtable<zfs_prop_t, String> map = new Hashtable<zfs_prop_t, String>();
for (zfs_prop_t prop : props) {
int ret = LIBZFS.zfs_prop_get(handle, new NativeLong(prop.ordinal()),
propbuf, libzfs.ZFS_MAXPROPLEN, ibr, buf,
new NativeLong(0), true);
if(ret==0)
map.put(prop, propbuf.getString(0));
}
return map;
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
public Map<zfs_prop_t,String> getZfsProperty(Collection<zfs_prop_t> props) {
Memory propbuf = new Memory(libzfs.ZFS_MAXPROPLEN);
char[] buf = null;
IntByReference ibr = null;
Hashtable<zfs_prop_t, String> map = new Hashtable<zfs_prop_t, String>();
for (zfs_prop_t prop : props) {
int ret = LIBZFS.zfs_prop_get(handle, new NativeLong(prop.ordinal()),
propbuf, libzfs.ZFS_MAXPROPLEN, ibr, buf,
new NativeLong(0), true);
if(ret==0)
map.put(prop, propbuf.getString(0));
}
return map;
}
代码示例来源:origin: org.kohsuke/libzfs
public String getZfsProperty(zfs_prop_t prop) {
Memory propbuf = new Memory(libzfs.ZFS_MAXPROPLEN);
char[] buf = null;
IntByReference ibr = null;
int ret = LIBZFS.zfs_prop_get(handle, new NativeLong(prop.ordinal()),
propbuf, libzfs.ZFS_MAXPROPLEN, ibr, buf,
new NativeLong(0), true);
return ((ret != 0) ? null : propbuf.getString(0));
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
public String getZfsProperty(zfs_prop_t prop) {
Memory propbuf = new Memory(libzfs.ZFS_MAXPROPLEN);
char[] buf = null;
IntByReference ibr = null;
int ret = LIBZFS.zfs_prop_get(handle, new NativeLong(prop.ordinal()),
propbuf, libzfs.ZFS_MAXPROPLEN, ibr, buf,
new NativeLong(0), true);
return ((ret != 0) ? null : propbuf.getString(0));
}
内容来源于网络,如有侵权,请联系作者删除!