-/* $OpenBSD: disklabel.c,v 1.249 2023/05/13 18:13:42 krw Exp $ */
+/* $OpenBSD: disklabel.c,v 1.250 2023/06/19 13:45:19 krw Exp $ */
/*
* Copyright (c) 1987, 1993
i = asprintf(&partname, "/dev/%s%c", dkname, 'a');
if (i == -1)
- err(4, NULL);
+ err(1, NULL);
i = asprintf(&partduid,
"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx.a",
lab.d_uid[0], lab.d_uid[1], lab.d_uid[2], lab.d_uid[3],
lab.d_uid[4], lab.d_uid[5], lab.d_uid[6], lab.d_uid[7]);
if (i == -1)
- err(4, NULL);
+ err(1, NULL);
setfsent();
for (i = 0; i < MAXPARTITIONS; i++) {
partname[strlen(dkname) + 5] = 'a' + i;
lp->d_version = 1;
if (!(omountpoints = calloc(MAXPARTITIONS, sizeof(char *))))
- errx(4, "out of memory");
+ err(1, NULL);
mpcopy(omountpoints, mountpoints);
for (part = 0; part < MAXPARTITIONS; part++) {
-/* $OpenBSD: editor.c,v 1.409 2023/06/18 20:41:52 krw Exp $ */
+/* $OpenBSD: editor.c,v 1.410 2023/06/19 13:45:19 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <millert@openbsd.org>
if (!(omountpoints = calloc(MAXPARTITIONS, sizeof(char *))) ||
!(origmountpoints = calloc(MAXPARTITIONS, sizeof(char *))) ||
!(tmpmountpoints = calloc(MAXPARTITIONS, sizeof(char *))))
- errx(4, "out of memory");
+ err(1, NULL);
/* How big is the OpenBSD portion of the disk? */
find_bounds(&newlab);
goto again;
alloc = reallocarray(NULL, lastalloc, sizeof(struct space_allocation));
if (alloc == NULL)
- errx(4, "out of memory");
+ err(1, NULL);
memcpy(alloc, alloc_table[index].table,
lastalloc * sizeof(struct space_allocation));
}
free(*partmp);
if ((*partmp = strdup(ap->mp)) == NULL)
- errx(4, "out of memory");
+ err(1, NULL);
}
}
if (from[i] != NULL) {
to[i] = strdup(from[i]);
if (to[i] == NULL)
- errx(4, "out of memory");
+ err(1, NULL);
}
}
}
/* XXX - might as well realloc */
free(mountpoints[partno]);
if ((mountpoints[partno] = strdup(p)) == NULL)
- errx(4, "out of memory");
+ err(1, NULL);
break;
}
fputs("Mount points must start with '/'\n", stderr);