Commit Graph

6984 Commits

Author SHA1 Message Date
christos
ea4f9899c6 print the name of the disk causing the error. 2019-10-07 20:56:07 +00:00
mrg
d6b33fe60a avoid access uninitialised memory, found by gcc8, patch by agc@. 2019-10-04 09:16:38 +00:00
kardel
479b835cf3 PR/54513 ifconfig exits on newly created carp interfaces
downgrade from err(EXIT_FAILURE, ... ) to warn() if ioctl(SIOCGLIFADDR) fails.
ifconfig now survives freshly created carp interfaces.
2019-10-01 10:52:53 +00:00
bad
7a2e426f67 initialize disc_dict to NULL.
otherwise, if DIOCGDISKINFO returns an error != ENXIO getdiskinfo() later
tries to prop_object_release() stack garbage.

found by rumpctrl tests using clang-7.
2019-09-28 18:03:18 +00:00
mlelstv
dacdd9d9b5 Need MIN in userland. Also some more signed/unsigned clashes. 2019-09-26 10:47:30 +00:00
mlelstv
3a8aa0a47c nspares is now unsigned. Validate and use as positive integer. 2019-09-26 10:33:30 +00:00
roy
99b959ff0d route(8): Show addres for RTM_LOSING
While here, add /* FALLTHROUGH */.
2019-09-02 00:30:01 +00:00
wiz
7c8c4d229e Remove superfluous Pp. 2019-09-01 19:13:18 +00:00
sevan
fe6b8268b9 grammar 2019-09-01 18:51:27 +00:00
roy
68a5c140d2 route(8): show addrs for RTM_MISS 2019-08-31 18:20:08 +00:00
brad
277f8a757a Use getdiskrawname to find the device name.
Reviewed by Christos
2019-08-22 20:26:07 +00:00
roy
2b94ade947 route(8): print RTM_CHANGE messages
XXX Pullup -9
2019-08-22 16:10:48 +00:00
perseant
f5654bbebe Clean up debugging cruft that somehow made it into my previous commit. 2019-08-20 21:18:10 +00:00
wiz
27a1bb09f8 Sort options in usage.
filesystem -> file system
2019-08-20 21:07:21 +00:00
perseant
473107ea62 Allow the user to specify the filesystem ID for umapfs at mount time,
allowing a consistent filesystem ID across reboots.  Closes PR #54471.
2019-08-20 20:18:54 +00:00
perseant
7aae290207 Add -D flag to allow the user to specify an alternate dumpdates file.
Closes PR #54469.
2019-08-19 18:12:50 +00:00
martin
21c20a3068 Properly release the disk properties dictionary we received via
ioctl.
Detected by leak sanitizer when building with MKSANITIZER=yes.
2019-08-18 11:08:56 +00:00
kamil
997c4cdc97 sysctl: Add indirection of symbols to remove clash with sanitizers
Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
2019-08-18 04:10:22 +00:00
msaitoh
5ae436aa7e Whitespace fix. 2019-08-16 10:33:17 +00:00
kamil
1f7b844ec7 fsck: Stop defining the same variable concurrently in bss and data
returntosingle was defined in multiple places:

 - fsck_lfs/main.c
 - fsck_ffs/main.c
 - fsck_ext2fs/main.c
 - fsck/fsutil.c

Keep the fsutil.c definition as the only one.

Detected during the build of telned with Address Sanitizer (MKSANITIZER).
2019-08-15 03:10:42 +00:00
roy
85f97b7a69 reboot: fix arg order for logwtmpx(3)
Matches the correct order from init(1).

Thanks to Sascha Wildner <swildner@dragonflybsd.org>
2019-08-08 21:14:12 +00:00
wiz
1100063163 Remove superfluous Pp. 2019-08-07 19:08:10 +00:00
mrg
1eef670a51 add an example about reattaching USB devices 2019-08-06 10:45:14 +00:00
isaki
002042ffe7 Fix a trivial wrong comment. x68k's arch is not m68010. 2019-08-03 04:21:37 +00:00
martin
8e17bc1a27 Remove outdated note about sysinst restrictions 2019-07-26 07:22:05 +00:00
msaitoh
eea2ee1212 Implement VLAN hardware filter function(ETHERCAP_VLAN_HWFILTER).
First proposed by jmcneill in 2017 and modified by me.

How to use:

 - Set callback function:

	ether_set_vlan_cb(struct ethercom *, ether_vlancb_t)

 - Callback. This function is called when a vlan is attached/detached to the
   parent interface:

	int (*ether_vlancb_t)(struct ethercom *ec, uint16_t vlanid, bool set);

 - ifconfig(8)

	ifconfig ixg0 [-]vlan-hwfilter

 Note that ETHERCAP_VLAN_HWFILTER is set by default on ixg(4) because
the PF driver usually enable "all block" filter by default.
2019-07-17 03:26:24 +00:00
msaitoh
cb1ccde89c KNF. No functional change. 2019-07-17 03:09:16 +00:00
msaitoh
83631b96b8 Add "ifconfig [-]vlan-hwtagging" to enable/disable VLAN hardware tagging
offload function. It's useful to see Ethernet frame's VLAN tag by
disabling with "ifconfig fooX -vlan-hwtagging" and "tcpdump -e -i fooX".
2019-07-08 03:04:15 +00:00
wiz
4785fe6db5 Formatting nit. 2019-07-04 13:55:31 +00:00
ozaki-r
86e9de9cad Add descr,description/-descr,-description commands to ifconfig(8) to handle a description.
From t-kusaba@IIJ
2019-07-04 02:45:45 +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
sevan
edae29ee93 Add rcsid 2019-06-30 11:38:16 +00:00
jnemeth
7d442200ff Add an "uuid" command to generate a new UUID for a portion. The
primary intention is for use for after cloning disks to prevent
collisions.
2019-06-25 04:53:40 +00:00
jnemeth
acc2b630b1 adjust gpt_uuid_generate() to accept gpt==NULL 2019-06-25 04:25:11 +00:00
jnemeth
46e7349176 Add gpt_change_hdr() similar to gpt_change_ent() for changing
arbitrary header fields.
2019-06-25 03:42:45 +00:00
jnemeth
e003a26f4c Add a third argument to the "cfn" function that is an argument to
gpt_change_ent().  The purpose of the third argument is to specify
whether the entry to be changed is a primary GPT entry or a secondary
GPT entry.  It is assumed that a secondary GPT entry will always
follow a corresponding primary entry.

This is in preparation for an upcoming change that will require it.
2019-06-21 02:14:59 +00:00
martin
cad3861523 When biosboot is used on an existing wedge and we are switching to
the gpt of the parent device, do not pass the size of the wedge to
gpt_open, it certainly is smaller than the whole device.
Fixes bin/54312.
2019-06-20 10:56:38 +00:00
martin
08878476cc Do not try to close a NULL gpt. Fixes the core dump part of PR bin/54312 2019-06-20 10:41:58 +00:00
kre
1d7ccd04d7 Delete a redundant (useless) assignment. NFCI. 2019-06-04 11:59:05 +00:00
kre
43729d11af PR toolchain/54269
Make a SMALL dmesg even smaller.

When compiled -DSMALL, dmesg does nothing at all with the kernel
timestamps (it processes no options to be told what would be the
user's desire) so make it truly do (almost) nothing, rather than
some botched partial processing of them.

The "almost" is that a SMALL dmesg will now ignore spaces at the
beginning of each new message line ... those are (vanishingly)
unlikely to occur, as the kernel puts the timestamp (which starts
with '[' there) - fixing this would have meant even more #ifdef's
as the code that ignores that leading space is the only remaining
thing that (in a SMALL) dmesg looks at the value of the "tstamp"
variable, and if we don't keep some use of it, gcc complains...

These changes affect only SMALL dmesg (as installed on boot
floppies, etc) and have no intended effect on the version that's
installed on a normal (full size) running system.
2019-06-04 11:37:39 +00:00
christos
7031824410 We already incremented cl; fix indexing. Noticed by Xin Li @FreeBSD. 2019-06-04 00:08:00 +00:00
wiz
3969855bdf New sentence, new line. 2019-05-31 16:38:27 +00:00
mlelstv
8ba9fb4d1c Mention SATL support. 2019-05-31 05:47:22 +00:00
mlelstv
c2d06938d9 Add support for ATA command pass-through to SCSI devices. 2019-05-30 21:32:08 +00:00
kre
fe6f1f01c1 PR bin/54222
Don't use portal_node_reclaim() inappropriately.   It frees data we
did not allocate, but which might have been allocated by someone else.

While here, various other cleanups (avoid losing fd's if fork fails,
don't compose mangled st_mode S_IFMT values - puffs or's in what it
thinks is correct to the value we set, one case I saw was producing
0110600 for the mode, the 011 isn't any defined type at all - I'd
never seen ls print a '?' as the first char of ls -l output before!

This is still not really correct, but is I believe, better than before.
2019-05-23 11:13:17 +00:00
wiz
7a2e675187 Remove superfluous Pp. 2019-05-23 09:15:45 +00:00
kre
4ab11b0d22 Better handling of comments in portal.conf ... # now only introduces
a comment at beginning of line, or after whitespace.   This allows #
to be used as data otherwhere in the line (there is no escape mechanism).
2019-05-23 04:34:25 +00:00
kre
de0c485250 KNF: blank lines after declarations, return (x) -> return x, and
eliminate spaces between cast and value being cast (most were OK already)
NFCI.
2019-05-23 02:39:06 +00:00