Commit Graph

341 Commits

Author SHA1 Message Date
msaitoh
57920690e6 s/occurence/occurrence/ 2020-09-29 02:58:51 +00:00
msaitoh
811d5a8b03 s/parition/partition/ 2020-09-29 02:49:55 +00:00
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
isaki
002042ffe7 Fix a trivial wrong comment. x68k's arch is not m68010. 2019-08-03 04:21:37 +00:00
mlelstv
45a6f3d566 Fix NATIVELABEL_ONLY build. 2019-07-03 07:05:27 +00:00
wiz
400b2bc13c Sort and unify a bit. Add more macros. 2019-07-02 16:47:19 +00:00
mlelstv
1b979fcca7 Add options to define labelsector and -offset and number of slices.
Make options to chose alternate label position for systems using MBR
more intuitive. -m now selects mode with MBR, -n selects mode without,
independent of the machine defaults.
2019-07-02 16:23:47 +00:00
kamil
bd8efe16d3 Avoid misaligned access in disklabel(8) in find_label()
Introduce a new helper variable tlp and use it for memory access.

Detected with MKSANITIZER/UBSan

A patch by <christos>
2018-06-27 01:14:48 +00:00
ryo
fe33aa2786 Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)
- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
2018-04-01 04:35:01 +00:00
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