Page MenuHomeFreeBSD

D48936.diff
No OneTemporary

D48936.diff

diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c
--- a/usr.sbin/ctld/uclparse.c
+++ b/usr.sbin/ctld/uclparse.c
@@ -635,6 +635,10 @@
goto fail;
}
+ if (strcmp(key, "foreign") == 0) {
+ portal_group_set_foreign();
+ }
+
if (strcmp(key, "listen") == 0) {
if (obj->type == UCL_STRING) {
if (!portal_group_add_listen(
@@ -677,6 +681,18 @@
}
}
+ if (strcmp(key, "offload") == 0) {
+ if (obj->type != UCL_STRING) {
+ log_warnx("\"offload\" property of "
+ "portal-group \"%s\" is not a string",
+ name);
+ return (false);
+ }
+
+ if (!portal_group_set_offload(ucl_object_tostring(obj)))
+ return (false);
+ }
+
if (strcmp(key, "redirect") == 0) {
if (obj->type != UCL_STRING) {
log_warnx("\"listen\" property of "
@@ -706,6 +722,17 @@
}
}
+ if (strcmp(key, "tag") == 0) {
+ if (obj->type != UCL_INT) {
+ log_warnx("\"tag\" property of portal group "
+ "\"%s\" is not an integer",
+ name);
+ return (false);
+ }
+
+ portal_group_set_tag(ucl_object_toint(obj));
+ }
+
if (strcmp(key, "dscp") == 0) {
if (!uclparse_dscp("portal", name, obj))
goto fail;
@@ -947,6 +974,28 @@
goto fail;
}
+ if (strcmp(key, "device-type") == 0) {
+ if (obj->type != UCL_STRING) {
+ log_warnx("\"device-type\" property of lun "
+ "\"%s\" is not an integer", name);
+ return (false);
+ }
+
+ if (!lun_set_device_type(ucl_object_tostring(obj)))
+ return (false);
+ }
+
+ if (strcmp(key, "ctl-lun") == 0) {
+ if (obj->type != UCL_INT) {
+ log_warnx("\"ctl-lun\" property of lun "
+ "\"%s\" is not an integer", name);
+ return (false);
+ }
+
+ if (!lun_set_ctl_lun(ucl_object_toint(obj)))
+ return (false);
+ }
+
if (strcmp(key, "options") == 0) {
if (obj->type != UCL_OBJECT) {
log_warnx("\"options\" property of lun "

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 21, 9:08 PM (1 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16746467
Default Alt Text
D48936.diff (1 KB)

Event Timeline