+ else if (str_starts_with(type, "snt")) {
+ smart_device_auto_ptr basedev( get_smart_device(name, "scsi") );
+ if (!basedev) {
+ set_err(EINVAL, "Type '%s': %s", type, get_errmsg());
+ return 0;
+ }
+
+ return get_snt_device(type, basedev.release()->to_scsi());
+ }
+
+ else if (str_starts_with(type, "intelliprop")) {
+ // Parse "intelliprop,N[+base...]"
+ unsigned phydrive = ~0; int n = -1; char c = 0;
+ sscanf(type, "intelliprop,%u%n%c", &phydrive, &n, &c);
+ if (!((n == (int)strlen(type) || c == '+') && phydrive <= 3)) {
+ set_err(EINVAL, "Option '-d intelliprop,N' requires N between 0 and 3");
+ return 0;
+ }
+ const char * basetype = (type[n] ? type + n + 1 : "");
+ // Recurse to allocate base device, default is standard ATA
+ if (!*basetype)
+ basetype = "ata";
+ smart_device_auto_ptr basedev( get_smart_device(name, basetype) );
+ if (!basedev) {
+ set_err(EINVAL, "Type '%s': %s", type, get_errmsg());
+ return 0;
+ }
+ // Result must be ATA
+ if (!basedev->is_ata()) {
+ set_err(EINVAL, "Type '%s': Device type '%s' is not ATA", type, basetype);
+ return 0;
+ }
+ return get_intelliprop_device(this, phydrive, basedev.release()->to_ata());
+ }
+