2 * Low-level libblkid probing API
4 * Copyright (C) 2008-2009 Karel Zak <kzak@redhat.com>
6 * This file may be redistributed under the terms of the
7 * GNU Lesser General Public License.
13 #include "libblkid-tiny.h"
15 static int blkid_probe_reset_buffers(struct blkid_struct_probe
*pr
);
17 struct blkid_struct_probe
*blkidtiny_new_probe(void)
19 struct blkid_struct_probe
*pr
;
21 pr
= calloc(1, sizeof(struct blkid_struct_probe
));
25 INIT_LIST_HEAD(&pr
->buffers
);
30 void blkidtiny_free_probe(struct blkid_struct_probe
*pr
)
35 blkid_probe_reset_buffers(pr
);
40 static int blkid_probe_reset_buffers(struct blkid_struct_probe
*pr
)
42 if (list_empty(&pr
->buffers
))
45 while (!list_empty(&pr
->buffers
)) {
46 struct blkid_bufinfo
*bf
= list_first_entry(&pr
->buffers
, struct blkid_bufinfo
, bufs
);