+void resizemaps(dump_ino_t oldmax, dump_ino_t newmax)
+{
+ char *map;
+
+ if (usedinomap) {
+ map = calloc((unsigned)1, (unsigned)howmany(newmax, NBBY));
+ if (map == NULL)
+ errx(1, "no memory for active inode map");
+ memcpy(map, usedinomap, howmany(oldmax, NBBY));
+ free(usedinomap);
+ usedinomap = map;
+ }
+ if (dumpmap) {
+ map = calloc((unsigned)1, (unsigned)howmany(newmax, NBBY));
+ if (map == NULL)
+ errx(1, "no memory for file dump list");
+ memcpy(map, dumpmap, howmany(oldmax, NBBY));
+ free(dumpmap);
+ dumpmap = map;
+ }
+}
+
+void
+GetPathFile(char *source, char *path, char *fname)
+{
+ char *p, *s;
+
+ *path = 0;
+ *fname = 0;
+ p = s = source;
+ while (*s) {
+ if (*s == '/') {
+ p = s + 1;
+ }
+ s++;
+ }
+ if (p == source) {
+ *path = 0;
+ } else {
+ strncpy(path, source, p - source);
+ path[p - source] = 0;
+ }
+ strcpy(fname, p);
+}
+