Signed-off-by: Karel Zak <kzak@redhat.com>
extern int __blkid_probe_reset_filter(blkid_probe pr, int chain);
extern int __blkid_probe_filter_types(blkid_probe pr, int chain, int flag, char *names[]);
+extern void *blkid_probe_get_binary_data(blkid_probe pr, struct blkid_chain *chn);
extern int blkid_probe_set_value(blkid_probe pr, const char *name,
unsigned char *data, size_t len);
return pr->cur_chain;
}
+void *blkid_probe_get_binary_data(blkid_probe pr, struct blkid_chain *chn)
+{
+ int rc;
+
+ if (!pr && !chn)
+ return NULL;
+
+ pr->cur_chain = chn;
+ chn->binary = TRUE;
+
+ rc = chn->driver->probe(pr, chn);
+
+ chn->binary = FALSE;
+ pr->cur_chain = NULL;
+
+ if (rc < 0)
+ return NULL;
+
+ DBG(DEBUG_LOWPROBE,
+ printf("returning %s binary data\n", chn->driver->name));
+ return chn->data;
+}
+
+
/**
* blkid_reset_probe:
* @pr: probe