option_descriptors[option].title = "maxdocumentlength";
option_descriptors[option].desc = "maxdocumentlength";
option_descriptors[option].cap = SANE_CAP_SOFT_DETECT;
- option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE;
- option_descriptors[option].constraint.string_list = NULL;
+ option_descriptors[option].constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ SANE_String_Const* constraint_max_document_length = malloc(sizeof(char*) * 2);
+ constraint_max_document_length[0] = "#NoPrimaryControl#";
+ constraint_max_document_length[1] = NULL;
+ option_descriptors[option].constraint.string_list = constraint_max_document_length;
break;
case 22:
option_descriptors[option].name = "scansource";