Commit Graph

332 Commits

Author SHA1 Message Date
skrll ac34435581 Remove port-acorn26
OK core@
2018-01-24 09:04:40 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
chs 037063a2ac use warnx() rather than warn() in a case where errno is not relevant. 2017-03-09 00:18:23 +00:00
snj b14abce7b5 revert part of revision 1.28. "e.g." is correct. bad igor! 2016-10-15 06:23:28 +00:00
sevan e2e783ad92 Remove ignored Pp macro, highlighted by mandoc -Tlint. 2016-09-11 02:10:31 +00:00
sevan a3477eb231 Grammar fix suggested by textproc/igor.
Syntax fix highlighted by mandoc -Tlint.
Bump date.
2016-09-11 01:59:10 +00:00
sevan a11e4d8d20 Document the version disklabel first appeared.
Fix spelling mistakes.
Replace contraction.
Bump date.
2016-09-11 01:48:00 +00:00
christos a97d476aa4 fix broken patch 2016-01-31 23:11:49 +00:00
christos 0636a2fe97 PR/50729: Izumi Tsutsui: Add "SMALLPROG"-like options to disklabel(8) 2016-01-31 18:57:29 +00:00
htodd 7f6bcf1f58 Fix build. 2015-07-18 06:00:46 +00:00
tsutsui 1d2382733b Fix botch in "make disklabel a MI tool" changes in rev 1.2.
After that chanage, "MAXPARTITIONS" constant is not for the target port.
If host's MAXPARTITIONS is larger than a value of the target label and
target endianness is different from the build host, bswaplabel() could
overwrite data beyond the disklabel and primary boot stored after
LABELSECTOR in images might be corrupted.

This fixes boot failure of sun2 liveimage built by
"build.sh -U -m sun2 release live-image"
on TME.

Should be pulled up to netbsd-7.
2015-07-17 20:30:21 +00:00
christos 874b0026ee Add missing doc flags (B,M,m) 2015-04-29 17:07:11 +00:00
christos c902c296d4 fix mistake in previous 2015-04-27 17:05:58 +00:00
christos 74c7e628de make table smaller in size. 2015-04-25 21:43:53 +00:00
christos 52e8eb1316 Fix the 3 programs that use DTYPE_ (disklabel disk types) constants from the
kernel. Two of them are inside ifdefs.
2015-01-02 19:46:02 +00:00
matt 3bbdf28d09 Add OpenRISC 1000 & UCB RISC-V platform support. 2014-09-19 17:45:03 +00:00
apb fa05229ce5 Fix typo in "dreamcast" port name. 2014-08-10 06:48:51 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
joerg 63b30d82c2 Print uint32_t field as such. 2014-07-15 20:18:30 +00:00
skrll 6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
matt 8176d96907 Add m68000/coldfire.
Add evbcf.
2013-08-22 00:26:23 +00:00
riz eab0544017 A number of new earm MACHINE_ARCH have shown up recently; make sure
we can deduce their endianness.
2013-08-11 17:15:15 +00:00
christos cb39557cb2 %td is for ptrdiff_t not for off_t 2013-05-15 00:47:43 +00:00
christos 1e2e5a9113 CVE 1020933: Prevent integer overflow by using wider type 2013-05-13 18:01:08 +00:00
christos 7d5016218f CVE 1020935: Prevent overflow 2013-05-13 17:58:50 +00:00
skrll 4cc906c4aa Add an arch_endian entry for x86_64. 2013-05-05 15:59:42 +00:00
matt 4fdf02c17a Make sure to initialize byteorder if native. 2013-05-03 21:23:36 +00:00
matt b1e3ebd45b Fix tpyos. 2013-05-03 16:39:00 +00:00
matt af8f0546ca Make disklabel a MI tool. It will use MACHINE/MACHINE_ARCH to determine
the disklabel params as well as allowing command-line options of -M <machine>
and -B {le,be} to specify MACHINE and byteorder to be used.
2013-05-03 16:05:11 +00:00
christos 772a10450c move dk_ioctl to a header file for the benefit of x-building. 2013-01-17 18:33:58 +00:00
christos b7825cc95f - simplify getinput.
- add adjust command.
2013-01-15 23:52:48 +00:00
cyber 05b3cc487c PR bin/45744
from Julian Fagir
Removing options that have had implementations removed.

-b: removed in -r1.4
-s: removed in -r1.2
2012-04-08 07:59:53 +00:00
bouyer a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
phx 233e75c9c0 Define USE_MBR for ofppc. 2011-08-18 08:42:07 +00:00
wiz e74a53f0f9 Sort sections. Remove comma in enumeration of two items. 2011-08-02 10:21:12 +00:00
christos e0f66530c3 mention that we don't handle more than 2TB disks/partitions. 2011-07-25 16:31:05 +00:00
dholland df520b1013 Disable COMPAT_386BSD_MBRPART. The code is still here if anyone needs it
for some reason. (But I have no idea why that would be -- if you have one
of these really ancient partitions and you're about to run disklabel, you
can easily run fdisk first and change the partition type to NetBSD.)

As it stands, the code will munch FreeBSD installs under some
circumstances, which is really not acceptable behavior.

The code, along with the kernel support that's been disabled by
default for several years, and some related but less dangerous code in
sysinst, should prboably be removed entirely after -6 is branched.

Discussed on tech-kern and tech-userlevel; closes PR 44496.

This is also almost certainly the cause of PR 42521 and PR 38841.
2011-02-12 22:23:01 +00:00
apb 63df928b37 Change printf formats to match the data type of the values being
printed.  There's now a lot of PRIu16 and PRIu32, some PRIu8, some
SCNu32, and a few cases where %u and %d were reversed.  Multiplication
of 32-bit and 8-bit values is cast to uint64_t and printed with PRIu64.

Inspired by a report from Patrick Welche on current-users.
2011-01-06 21:39:01 +00:00
christos 621e83eac4 match printf formats and types from Patrick Welche 2011-01-06 19:34:28 +00:00
dholland 0bf3480c62 Change getnum() to use intmax_t instead of int, so it doesn't overflow
between 2^31 and 2^32. Adjust call sites accordingly. PR 43354.
2010-05-28 07:40:53 +00:00
tsutsui d3724ba41f Add necessary byteswap ops for tools disklabel(8) used with -F option
(treating a target disk as a regular file and suppressing ioctl(2)s)
on reading/writing disklabel in a target file.
This allows cross build enviroment creating bootable disk images
for targets in different endian.
No functional changes to native (non-tools) disklabel(8) command.

Closes PR toolchain/42357.
2010-01-05 15:45:26 +00:00
nakayama 1c54a66d99 System utilities, boot programs and kernel modules are machine
(port) specific not CPU, so use MACHINE not MACHINE_ARCH.
2009-12-13 05:01:32 +00:00
pooka d6224f4507 Remove support for NetBSD/playstation2. 2009-12-05 16:29:10 +00:00
tsutsui e7730664e0 Don't use #ifdef __${MACHINE_ARCH}__ to enable machine dependent features.
Instead, use proper macro defined in Makefile per ${MACHINE_ARCH}.

__${MACHINE_ARCH}__ doesn't represent an architecture of tool's target
but an architecture of binaries being compiled, so required features
are not prolery enabled or unintentionally enabled on certain host
and target combinations during src/tools build.
2009-11-28 12:14:53 +00:00
tsutsui 93f39165ae Make dreamcast, evbsh3, and mmeye use -DUSE_MBR.
All of these ports use src/sys/arch/sh3/sh3/disksubr.c
which is MBR aware.
2009-11-28 11:26:36 +00:00
abs b861177ec4 - Display "Enter '?' for help" when starting interactive mode
- Use %.40g rather than %g when printing sectors and MB for existing
  partition size/offset.
  Changes [1.93802e+06c, 1953525105s, 953870M]:
  to:     [1938021c, 1953525105s, 953869.6875M]:
2009-11-28 10:52:10 +00:00
abs e115d85122 Shuffle the order of examples to put the interactive option (-i) ahead
of $EDITOR and "disklabel -w -r /dev/rsd0c sd2212 foo"
2009-11-28 10:28:22 +00:00
tsutsui ab4082e001 - u_short -> uint16_t
- KNF a bit
2009-10-24 18:15:45 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00