Deleted Added
full compact
32a33
> #include <sys/queue.h>
39a41
> #include "mkimg.h"
42,43d43
< #define MAX(a, b) ((a < b) ? b : a)
<
60d59
< static u_int nparts = 0;
86c85
< scheme_add_part(u_int idx, const char *type, off_t offset, off_t size)
---
> scheme_check_part(struct part *p __unused)
89,106c88,90
< warnx("part: index=%u, type=`%s', offset=%ju, size=%ju", idx,
< type, (uintmax_t)offset, (uintmax_t)size);
< switch (scheme) {
< case SCHEME_APM:
< break;
< case SCHEME_BSD:
< break;
< case SCHEME_EBR:
< break;
< case SCHEME_GPT:
< break;
< case SCHEME_MBR:
< break;
< case SCHEME_PC98:
< break;
< case SCHEME_VTOC8:
< break;
< }
---
> warnx("part: index=%u, type=`%s', offset=%ju, size=%ju", p->index,
> p->type, (uintmax_t)p->offset, (uintmax_t)p->size);
>
149d132
< nparts = parts; /* Save nparts for later. */
161c144
< off = 2 + (MAX(128, parts) + 3) / 4;
---
> off = 2 + (parts + 3) / 4;
167c150
< off = 16;
---
> off = 2;
197c180
< lim = off + secsz * (1 + (MAX(128, nparts) + 3) / 4);
---
> lim = off + secsz * (1 + (nparts + 3) / 4);