summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-04-18 22:11:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-04-18 22:11:42 +0000
commit03e7dafb2d9221701d755808f0d34aa5e0c211d7 (patch)
tree64d698a119584f71363aec186d908724110f1788 /sys/arch
parentcc950830cb8afef3efeddca999d3d7640c429477 (diff)
Report explicit failure instead of success and no operation when asked to
write a disklabel. Disklabel on mac68k is virtual and constructed from the MacOS partition table, that should only be edited from MacOS for safety.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/mac68k/disksubr.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/arch/mac68k/mac68k/disksubr.c b/sys/arch/mac68k/mac68k/disksubr.c
index e6c08d951f6..c10e98b568f 100644
--- a/sys/arch/mac68k/mac68k/disksubr.c
+++ b/sys/arch/mac68k/mac68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.17 2002/03/14 03:15:55 millert Exp $ */
+/* $OpenBSD: disksubr.c,v 1.18 2002/04/18 22:11:41 miod Exp $ */
/* $NetBSD: disksubr.c,v 1.22 1997/11/26 04:18:20 briggs Exp $ */
/*
@@ -365,8 +365,6 @@ skip:
}
/*
- * MF --
- * here's what i'm gonna do:
* read in the entire diskpartition table, it may be bigger or smaller
* than NUM_PARTS_PROBED but read that many entries. Each entry has a magic
* number so we'll know if an entry is crap.
@@ -376,11 +374,6 @@ skip:
* A: root
* B: Swap
* C: Whole disk
- * G: Usr
- *
- *
- * I'm not entirely sure what netbsd386 wants in c & d
- * 386bsd wants other stuff, so i'll leave them alone
*
* AKB -- I added to Mike's original algorithm by searching for a bzbCluster
* of zero for root, first. This allows A/UX to live on cluster 1 and
@@ -527,7 +520,7 @@ readdisklabel(dev, strat, lp, osdep, spoofonly)
if (dlp->d_magic == DISKMAGIC) {
*lp = *dlp;
} else {
- msg = "no disk label--NetBSD or Macintosh";
+ msg = "no disk label--OpenBSD or Macintosh";
}
}
}
@@ -636,7 +629,7 @@ done:
brelse(bp);
return (error);
#else
- return 0;
+ return (ENODEV);
#endif /* #if 0 */
}