+static void
+dump_alloc_data(struct pci_dev *dev, int len)
+{
+ struct dump_data *dd = pci_malloc(dev->access, sizeof(struct dump_data) + len - 1);
+ dd->allocated = len;
+ dd->len = 0;
+ memset(dd->data, 0xff, len);
+ dev->aux = dd;
+}
+
+static int
+dump_validate(char *s, char *fmt)
+{
+ while (*fmt)
+ {
+ if (*fmt == '#' ? !isxdigit(*s) : *fmt != *s)
+ return 0;
+ fmt++, s++;
+ }
+ return 1;
+}
+