Lines Matching defs:lun
189 struct lun *lun;
202 asprintf(&name, "%s,lun,%ju", target->t_name, tmp);
203 lun = lun_new(conf, name);
204 if (lun == NULL)
207 lun_set_scsiname(lun, name);
208 target->t_luns[tmp] = lun;
217 log_warnx("lun section in target \"%s\" is missing "
229 log_warnx("lun section in target \"%s\" is missing "
234 lun = lun_find(conf, ucl_object_tostring(name));
235 if (lun == NULL)
238 target->t_luns[tmp] = lun;
355 if (!strcmp(key, "lun")) {
362 log_warnx("\"lun\" section is not an object");
874 if (!strcmp(key, "lun")) {
888 struct lun *lun;
893 lun = lun_new(conf, name);
894 if (lun == NULL)
902 log_warnx("\"backend\" property of lun "
904 lun->l_name);
908 lun_set_backend(lun, ucl_object_tostring(obj));
913 log_warnx("\"blocksize\" property of lun "
914 "\"%s\" is not an integer", lun->l_name);
918 lun_set_blocksize(lun, ucl_object_toint(obj));
923 log_warnx("\"device-id\" property of lun "
924 "\"%s\" is not an integer", lun->l_name);
928 lun_set_device_id(lun, ucl_object_tostring(obj));
933 log_warnx("\"options\" property of lun "
934 "\"%s\" is not an object", lun->l_name);
940 option_new(&lun->l_options,
948 log_warnx("\"path\" property of lun "
949 "\"%s\" is not a string", lun->l_name);
953 lun_set_path(lun, ucl_object_tostring(obj));
958 log_warnx("\"serial\" property of lun "
959 "\"%s\" is not a string", lun->l_name);
963 lun_set_serial(lun, ucl_object_tostring(obj));
968 log_warnx("\"size\" property of lun "
969 "\"%s\" is not an integer", lun->l_name);
973 lun_set_size(lun, ucl_object_toint(obj));