+#if (TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
+static void *
+_fsi_get_edt_fs(si_mod_t *si, const char *name, int which)
+{
+ void *data;
+ struct edt_fstab *fstab;
+ size_t i, size;
+ si_item_t *item;
+ si_list_t *all;
+ uint64_t va, vb;
+
+ if ((which != SEL_ALL) && (name == NULL)) return NULL;
+
+ all = NULL;
+ item = NULL;
+ fstab = NULL;
+ i = 0;
+ size = 0;
+
+ // obtain fstab information from the EDT provided through this sysctl
+ if (sysctlbyname(APFS_FSTAB_SYSCTL, NULL, &size, NULL, 0) || !size)
+ {
+ return all;
+ }
+
+ fstab = malloc(size);
+ if (!fstab)
+ {
+ return all;
+ }
+
+ if (sysctlbyname(APFS_FSTAB_SYSCTL, fstab, &size, NULL, 0))
+ {
+ free(fstab);
+ return all;
+ }
+ size = size / sizeof(struct edt_fstab);
+
+ _fsi_get_validation(si, VALIDATION_FSTAB, _PATH_FSTAB, NULL, &va, &vb);
+
+ forever
+ {
+ if (i >= size)
+ {
+ free(fstab);
+ break;
+ }
+
+ data = fstab + i;
+ i++;
+
+ item = _fsi_parse_edt_fs(si, name, which, data, va, vb);
+
+ if (item == NULL) continue;
+
+ if (which == SEL_ALL)
+ {
+ all = si_list_add(all, item);
+ si_item_release(item);
+ continue;
+ }
+
+ return item;
+ }
+
+ return all;
+}
+#endif
+