+
+boolean_t
+PE_imgsrc_mount_supported()
+{
+ return TRUE;
+}
+
+boolean_t
+PE_get_default(
+ const char *property_name,
+ void *property_ptr,
+ unsigned int max_property)
+{
+ DTEntry dte;
+ void **property_data;
+ unsigned int property_size;
+
+ /*
+ * Look for the property using the PE DT support.
+ */
+ if (kSuccess == DTLookupEntry(NULL, "/defaults", &dte)) {
+
+ /*
+ * We have a /defaults node, look for the named property.
+ */
+ if (kSuccess != DTGetProperty(dte, property_name, (void **)&property_data, &property_size))
+ return FALSE;
+
+ /*
+ * This would be a fine place to do smart argument size management for 32/64
+ * translation, but for now we'll insist that callers know how big their
+ * default values are.
+ */
+ if (property_size > max_property)
+ return FALSE;
+
+ /*
+ * Copy back the precisely-sized result.
+ */
+ memcpy(property_ptr, property_data, property_size);
+ return TRUE;
+ }
+
+ /*
+ * Look for the property using I/O Kit's DT support.
+ */
+ return IODTGetDefault(property_name, property_ptr, max_property) ? FALSE : TRUE;
+}
+
+/* function: get_range_bounds
+ * Parse a range string like "1_3,5_20" and return 1,3 as lower and upper.
+ * Note: '_' is separator for bounds integer delimiter and
+ * ',' is considered as separator for range pair.
+ * returns TRUE when both range values are found
+ */
+boolean_t
+get_range_bounds(char *c, int64_t *lower, int64_t *upper)
+{
+ if (c == NULL || lower == NULL || upper == NULL) {
+ return FALSE;
+ }
+
+ if (NUM != getval(c, lower, israngesep, TRUE)) {
+ return FALSE;
+ }
+
+ while (*c != '\0') {
+ if (*c == '_') {
+ break;
+ }
+ c++;
+ }
+
+ if (*c == '_') {
+ c++;
+ if (NUM != getval(c, upper, israngesep, TRUE)) {
+ return FALSE;
+ }
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+}