summaryrefslogtreecommitdiff
path: root/sbin/pdisk/util.c
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2006-04-27 19:52:22 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2006-04-27 19:52:22 +0000
commited27cd970afc6b5a1f13bcbcfa6e6f2c17383ea3 (patch)
tree1705907342ecd5f075b44fae6b75b82b0a5d413d /sbin/pdisk/util.c
parente317d0527a2e9963eb4d77f7416c9714f02efcfd (diff)
update for pdisk 0.8a2, from NetBSD, retaining our local changes;
summing it up: - Clean up sources - fix naming, delete old email addresses - Added support for display of Mac volume names - Fix block 0 display to show logical offset of drivers - Require confirmation of quit without write - Fix iteration to not complain about missing devices - Warn when creating/writing a map with more than 15 entries and, most important, add do_update_dpme() which allows us to partition OpenBSD slices without previous MacOS setup. Tested with shared MacOS install on macppc, procedure there remains the same. grammer and spelling help and ok jmc@ ok miod@
Diffstat (limited to 'sbin/pdisk/util.c')
-rw-r--r--sbin/pdisk/util.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sbin/pdisk/util.c b/sbin/pdisk/util.c
index 68fc272d8b8..be983546a03 100644
--- a/sbin/pdisk/util.c
+++ b/sbin/pdisk/util.c
@@ -1,7 +1,7 @@
/*
* util.c -
*
- * Written by Eryk Vershen (eryk@apple.com)
+ * Written by Eryk Vershen
*/
/*
@@ -105,8 +105,8 @@ TrapAvailable(short theTrap)
int
istrncmp(const char *x, const char *y, long len)
{
- unsigned char *p = (unsigned char *)x;
- unsigned char *q = (unsigned char *)y;
+ const unsigned char *p = (const unsigned char *)x;
+ const unsigned char *q = (const unsigned char *)y;
while (len > 0) {
if (tolower(*p) != tolower(*q)) {
@@ -141,21 +141,21 @@ get_version_string(void)
if (kVersionBugFix != 0) {
if (kVersionStage == final) {
if (asprintf(&dynamic_version, "%d.%d.%d", kVersionMajor,
- kVersionMinor, kVersionBugFix) == -1)
+ kVersionMinor, kVersionBugFix) == -1)
err(1, "asprintf");
} else {
if (asprintf(&dynamic_version, "%d.%d.%d%c%d", kVersionMajor,
- kVersionMinor, kVersionBugFix, stage, kVersionDelta) == -1)
- err(1, "asprintf");
+ kVersionMinor, kVersionBugFix, stage, kVersionDelta) == -1)
+ err(1, "asprintf");
}
} else {
if (kVersionStage == final) {
if (asprintf(&dynamic_version, "%d.%d", kVersionMajor,
- kVersionMinor) == -1)
+ kVersionMinor) == -1)
err(1, "asprintf");
} else {
if (asprintf(&dynamic_version, "%d.%d%c%d", kVersionMajor,
- kVersionMinor, stage, kVersionDelta) == -1)
+ kVersionMinor, stage, kVersionDelta) == -1)
err(1, "asprintf");
}
}