DragonFlyBSD/src 2f464f7usr.sbin/installer/dfuibe_installer fn_configure.c

installer(8): Auto fill default router in fn_assign_ip()

Add field change callbacks for "interface_ip" and "interface_netmask"
fields to auto fill/update the default router according to the IP and
netmask.

In addition, set the default netmask to "255.255.255.0".

Fix bug #3382

Bug: https://bugs.dragonflybsd.org/issues/3382
Reported-by: Nelson H. F. Beebe
DeltaFile
+80-1usr.sbin/installer/dfuibe_installer/fn_configure.c
+80-11 files

DragonFlyBSD/src 703449fusr.sbin/installer/dfuibe_installer fn_configure.c

installer(8): Fix hostname FQDN handling in fn_assign_ip()

Append domain to create FQDN only when the domain is not empty, similar
to the logic in fn_assign_hostname_domain().
DeltaFile
+4-1usr.sbin/installer/dfuibe_installer/fn_configure.c
+4-11 files

DragonFlyBSD/src ee87404usr.sbin/installer/dfuibe_installer fn_configure.c

installer(8): Avoid prompting for hostname and domain twice

During the manual IP configuration, the installer prompted for the
hostname and domain.  Later, the main configuration menu prompted for
them again.

Retrieve the hostname and domain from rc_conf/resolv_conf variables, and
pre-populate the form fields to avoid the duplicate prompts.

In addition, pre-populate the DNS server field from resolv_conf vars.

Fix bug #3383.

Bug: https://bugs.dragonflybsd.org/issues/3383
Reported-by: Nelson H. F. Beebe
DeltaFile
+46-15usr.sbin/installer/dfuibe_installer/fn_configure.c
+46-151 files

DragonFlyBSD/src 39a5f8eusr.sbin/installer/dfuife_curses curses_form.c curses_xlat.c, usr.sbin/installer/libdfui connection.c form.c

installer(8): Implement form field change callback mechanism

Implement a callback mechanism for form field change.  This allows the
backend to dynamically update the dependent form fields when user
modifies one field.

The whole interaction flow is:
1. Set the callback function for a form field;
2. The frontend presents the form;
3. User fills the field and changes focus;
4. The frontend sends the FIELD_CHANGED message and waits for the reply;
5. The backend handles the message, triggers the callback, and replies
   the FIELD_CHANGED_ACK message with the full dataset;
6. The frontend applies the dataset to present the updated form.

For example, when user fills the interface IP address, the callback will
auto fill the default router / gateway address.

TODO: The following low-priority features are missing:

    [4 lines not shown]
DeltaFile
+78-16usr.sbin/installer/libdfui/connection.c
+77-2usr.sbin/installer/dfuife_curses/curses_form.c
+63-0usr.sbin/installer/libdfui/form.c
+45-1usr.sbin/installer/dfuife_curses/curses_xlat.c
+35-0usr.sbin/installer/libdfui/dfui.h
+11-0usr.sbin/installer/dfuife_curses/curses_widget.c
+309-197 files not shown
+329-2613 files

DragonFlyBSD/src 85a02fcusr.sbin/installer/dfuibe_installer fn_configure.c flow.c

installer(8): Refactor vars handling to avoid writing duplicates

config_vars_write() appends the in-memory vars to the target config
file.  fn_assign_hostname_domain() fn_assign_ip() previously both read
the 'resolv.conf' and then write the updated vars, resulting duplicate
items being written to 'resolv.conf'.

Refactor the vars handling to start with empty 'rc_conf' and
'resolv_conf' vars, adjust the above configure functions to add/set
variables, and only write the config files once at the end.
DeltaFile
+61-77usr.sbin/installer/dfuibe_installer/fn_configure.c
+38-17usr.sbin/installer/dfuibe_installer/flow.c
+6-2usr.sbin/installer/dfuibe_installer/fn_install.c
+1-0usr.sbin/installer/dfuibe_installer/fn.h
+106-964 files

DragonFlyBSD/src ef90661usr.sbin/installer/libinstaller confed.c

installer(8): Improve config_vars_read() to support CONFIG_TYPE_RESOLV

The config_vars_read() function previously only supported CONFIG_TYPE_SH
and ignored CONFIG_TYPE_RESOLV that's supported by config_vars_write().
Add the CONFIG_TYPE_RESOLV file support to config_vars_read().  This
change is required in later commits that improve/simplify the
installation flow.
DeltaFile
+99-17usr.sbin/installer/libinstaller/confed.c
+99-171 files

DragonFlyBSD/src e2e1ce5usr.sbin/installer/installer installer.sh

installer(8): Use pgrep(1) to check frontend/backend processes

Use 'pgrep -x' to correctly match the frontend/backend processes.  This
is simpler than the original ps+grep method and fixes the partial match
problem.  For example, the old grep would incorrectly match the tail(1)
process that was checking the `dfuibe_installer_debug.log` or
`dfuife_curses_debug.log` debug logs.
DeltaFile
+4-21usr.sbin/installer/installer/installer.sh
+4-211 files

DragonFlyBSD/src a19fa47usr.sbin/installer/dfuibe_installer flow.c main.c, usr.sbin/installer/installer installer.sh

installer(8): Whitespace cleanups
DeltaFile
+114-116usr.sbin/installer/dfuibe_installer/flow.c
+14-14usr.sbin/installer/installer/installer.sh
+8-8usr.sbin/installer/libdfui/connection.c
+1-2usr.sbin/installer/dfuibe_installer/main.c
+1-1usr.sbin/installer/dfuibe_installer/fn_configure.c
+0-1usr.sbin/installer/libinstaller/confed.c
+138-1426 files

DragonFlyBSD/src b95a803usr.sbin/installer/dfuibe_installer fn_configure.c flow.c

installer(8): Remove unused and unfinished fn_select_services()

This configuration function is intended for enable/disable services.
However, it's unfinished (doesn't update rc.conf) and unused (i.e.,
commented out in the form).  Even if we could fix them, it still needs
to start/stop the changed services and to distinguish whether it's
configuring the LiveCD environment or the target installed system.

On the other hand, it's simple and effective to just edit rc.conf (after
booting into the newly installed system) to achieve the purpose.  So
simply remove this function to clean up the installer mess a bit.

Discussed-with: swildner
DeltaFile
+0-81usr.sbin/installer/dfuibe_installer/fn_configure.c
+0-6usr.sbin/installer/dfuibe_installer/flow.c
+0-1usr.sbin/installer/dfuibe_installer/fn.h
+0-883 files

DragonFlyBSD/src 0149fcausr.sbin/installer/dfuibe_installer fn_configure.c

installer(8): Auto fill default router in fn_assign_ip()

Add field change callbacks for "interface_ip" and "interface_netmask"
fields to auto fill/update the default router according to the IP and
netmask.

In addition, set the default netmask to "255.255.255.0".

Fix bug #3382

Bug: https://bugs.dragonflybsd.org/issues/3382
Reported-by: Nelson H. F. Beebe
DeltaFile
+80-1usr.sbin/installer/dfuibe_installer/fn_configure.c
+80-11 files

DragonFlyBSD/src e8cd692usr.sbin/installer/dfuife_curses curses_form.c curses_xlat.c, usr.sbin/installer/libdfui connection.c form.c

installer(8): Implement form field change callback mechanism

Implement a callback mechanism for form field change.  This allows the
backend to dynamically update the dependent form fields when user
modifies one field.

The whole interaction flow is:
1. Set the callback function for a form field;
2. The frontend presents the form;
3. User fills the field and changes focus;
4. The frontend sends the FIELD_CHANGED message and waits for the reply;
5. The backend handles the message, triggers the callback, and replies
   the FIELD_CHANGED_ACK message with the full dataset;
6. The frontend applies the dataset to present the updated form.

For example, when user fills the interface IP address, the callback will
auto fill the default router / gateway address.

TODO: The following low-priority features are missing:

    [4 lines not shown]
DeltaFile
+78-16usr.sbin/installer/libdfui/connection.c
+77-2usr.sbin/installer/dfuife_curses/curses_form.c
+63-0usr.sbin/installer/libdfui/form.c
+45-1usr.sbin/installer/dfuife_curses/curses_xlat.c
+35-0usr.sbin/installer/libdfui/dfui.h
+11-0usr.sbin/installer/dfuife_curses/curses_widget.c
+309-197 files not shown
+329-2613 files

DragonFlyBSD/src 7783614usr.sbin/installer/dfuibe_installer fn_configure.c flow.c

installer(8): Refactor vars handling to avoid writing duplicates

config_vars_write() appends the in-memory vars to the target config
file.  fn_assign_hostname_domain() fn_assign_ip() previously both read
the 'resolv.conf' and then write the updated vars, resulting duplicate
items being written to 'resolv.conf'.

Refactor the vars handling to start with empty 'rc_conf' and
'resolv_conf' vars, adjust the above configure functions to add/set
variables, and only write the config files once at the end.
DeltaFile
+61-77usr.sbin/installer/dfuibe_installer/fn_configure.c
+38-17usr.sbin/installer/dfuibe_installer/flow.c
+6-2usr.sbin/installer/dfuibe_installer/fn_install.c
+1-0usr.sbin/installer/dfuibe_installer/fn.h
+106-964 files

DragonFlyBSD/src d9da6a0usr.sbin/installer/dfuibe_installer fn_configure.c

installer(8): Fix hostname FQDN handling in fn_assign_ip()

Append domain to create FQDN only when the domain is not empty, similar
to the logic in fn_assign_hostname_domain().
DeltaFile
+4-1usr.sbin/installer/dfuibe_installer/fn_configure.c
+4-11 files

DragonFlyBSD/src da82167usr.sbin/installer/dfuibe_installer fn_configure.c

installer(8): Avoid prompting for hostname and domain twice

During the manual IP configuration, the installer prompted for the
hostname and domain.  Later, the main configuration menu prompted for
them again.

Retrieve the hostname and domain from rc_conf/resolv_conf variables, and
pre-populate the form fields to avoid the duplicate prompts.

In addition, pre-populate the DNS server field from resolv_conf vars.

Fix bug #3383.

Bug: https://bugs.dragonflybsd.org/issues/3383
Reported-by: Nelson H. F. Beebe
DeltaFile
+46-15usr.sbin/installer/dfuibe_installer/fn_configure.c
+46-151 files

DragonFlyBSD/src b25e581usr.sbin/installer/libinstaller confed.c

installer(8): Improve config_vars_read() to support CONFIG_TYPE_RESOLV

The config_vars_read() function previously only supported CONFIG_TYPE_SH
and ignored CONFIG_TYPE_RESOLV that's supported by config_vars_write().
Add the CONFIG_TYPE_RESOLV file support to config_vars_read().  This
change is required in later commits that improve/simplify the
installation flow.
DeltaFile
+99-17usr.sbin/installer/libinstaller/confed.c
+99-171 files

DragonFlyBSD/src d427802sys/kern subr_rman.c

kernel/rman: Fix error return in sysctl_rman().

Matt changed the error handling in 869748ea0626d3966a0b0e1a8223de70ef05
but forgot to return 'error' from now on.

This fixes devinfo -r (show hardware resource information).
DeltaFile
+1-1sys/kern/subr_rman.c
+1-11 files

DragonFlyBSD/src 624d38bshare/misc pci_vendors

Update the pciconf(8) database.

Feb 13, 2026 snapshot from https://pci-ids.ucw.cz
DeltaFile
+5,661-480share/misc/pci_vendors
+5,661-4801 files

DragonFlyBSD/src 6d19bccusr.sbin/installer/installer installer.sh

installer(8): Use pgrep(1) to check frontend/backend processes

Use 'pgrep -x' to correctly match the frontend/backend processes.  This
is simpler than the original ps+grep method and fixes the partial match
problem.  For example, the old grep would incorrectly match the tail(1)
process that was checking the `dfuibe_installer_debug.log` or
`dfuife_curses_debug.log` debug logs.
DeltaFile
+4-21usr.sbin/installer/installer/installer.sh
+4-211 files

DragonFlyBSD/src d842a1esbin/gpt show.c Makefile

gpt(8): Improve "show" command to print a disk summary line

Before print the partition entries, print a disk summary line like:
"Disk /dev/da0: 50.0GB (104857600 512-byte sectors)".

In addition, add a blank line between disks.

Example new output:
```
$ sudo gpt show /dev/da0 ad0
Disk /dev/da0: 50.0GB (104857600 512-byte sectors)
      start       size  index  contents
          0          1      -  PMBR
          1          1      -  Pri GPT header
          2         32      -  Pri GPT table
         34       2014      -  Unused
       2048     262144      0  GPT part - EFI System
     264192  104591360      1  GPT part - DragonFly Label64
  104855552       2015      -  Unused

    [14 lines not shown]
DeltaFile
+12-6sbin/gpt/show.c
+3-1sbin/gpt/Makefile
+15-72 files

DragonFlyBSD/src ff803d9etc/defaults uuids

etc: Sync entries from <sys/gpt.h>

Some of the GPT type names are derived from FreeBSD's gpart(8) man page.
DeltaFile
+60-11etc/defaults/uuids
+60-111 files

DragonFlyBSD/src 9df0696sbin/gpt show.c

gpt(8): Improve "show" command to print humanized size of partitions

Before:
Disk da0: 50.0GB (104857600 512-byte sectors)
      start       size  index  contents
          0          1      -  PMBR
          1          1      -  Pri GPT header
          2         32      -  Pri GPT table
         34       2014      -  Unused
       2048     262144      0  GPT part - EFI System
     264192  104591360      1  GPT part - DragonFly Label64
  104855552       2015      -  Unused
  104857567         32      -  Sec GPT table
  104857599          1      -  Sec GPT header

After:
Disk da0: 50.0GB (104857600 512-byte sectors)
      Start    Sectors    Size  Index  Contents
          0          1    512B      -  PMBR

    [8 lines not shown]
DeltaFile
+8-3sbin/gpt/show.c
+8-31 files

DragonFlyBSD/src 3ed4e32sbin/gpt gpt.c

gpt(8): Print a warning message when gpt_write() fails

gpt_write() is used in many places and all of them don't handle the
writing failure, so update gpt_write() to print a warning message when
it fails.
DeltaFile
+3-0sbin/gpt/gpt.c
+3-01 files

DragonFlyBSD/src 1460767sbin/gpt gpt.c

gpt(8): Refactor utf8_to_utf16() to be better understandable

Credit: ChatGPT (https://chatgpt.com/)
DeltaFile
+49-50sbin/gpt/gpt.c
+49-501 files

DragonFlyBSD/src c795974sbin/gpt gpt.c

gpt(8): Fix surrogate pair handling bug in utf16_to_utf8()

* The old code mishandled surrogate pairs and thus failed to recognize
  valid UTF-16 characters and would replace them with 0xFFFD.  Fix the
  code to correctly handle the surrogate pairs.

* Fix an out-of-bound access in the old code when it tried to handle the
  surrogate pairs.  Check `s16idx < s16len` before accessing it with
  `le16toh(s16[s16idx])`.

* Remove the `if (utfchar < 0x200000)` branch, because it's impossible
  for `utfchar` exceeding 0x200000.

* Tweak the `while` loop conditional to clean up the code.

Credit: ChatGPT (https://chatgpt.com/)
DeltaFile
+25-15sbin/gpt/gpt.c
+25-151 files

DragonFlyBSD/src b517f3fsbin/gpt gpt.c gpt.h

gpt(8): Change utf8_to_utf16/utf16_to_utf8() to use 'char *'

Use 'char *' instead of 'uint8_t *' for NUL-terminated UTF-8 strings,
making it easier for callers.
DeltaFile
+19-17sbin/gpt/gpt.c
+2-2sbin/gpt/gpt.h
+2-2sbin/gpt/show.c
+1-1sbin/gpt/label.c
+24-224 files

DragonFlyBSD/src 184a102sbin/gpt gpt.c

gpt(8): Fix bugs in utf8_to_utf16()

- The 'utfchar' was incorrectly reinitialized to zero on every loop
  iteration and thus destroyed the decoding state of multi-byte UTF-8
  sequences.  Fix it.
- Fix the endianness by adding the missing htole16() calls.

Obtained-from: NetBSD
DeltaFile
+7-5sbin/gpt/gpt.c
+7-51 files

DragonFlyBSD/src 6320fd3sbin/gpt gpt.c

gpt(8): Improve utf8_to_utf16()

- No need to NUL-terminate the UTF-16 string when it needs truncation.
- Pad the remaining characters with zeros. (obtained from NetBSD)
DeltaFile
+12-8sbin/gpt/gpt.c
+12-81 files

DragonFlyBSD/src 0bfd094sbin/gpt gpt.c show.c

gpt(8): Improve utf16_to_utf8()

- Let caller pass the buffer and thus avoid memory allocation.
- Handle the case that there is no NUL termination, i.e., the partition
  name is exactly 36 characters, which is allowed by the specification.

Obtained-from: NetBSD
DeltaFile
+22-14sbin/gpt/gpt.c
+6-3sbin/gpt/show.c
+1-1sbin/gpt/gpt.h
+29-183 files

DragonFlyBSD/src 176e90asbin/gpt gpt.c

gpt(8): Fix gpt_read() to report partial read error

A partial read() wouldn't touch 'errno', so the caller was unable to
know the error reason.  This caused the program to print an error
message like:
```
gpt show: unable to open device 'vn4': Undefined error: 0
```

Fix gpt_read() to return E2BIG (I couldn't find a better choice) for a
partial read(), so the above error becomes:
```
gpt show: unable to open device 'vn4': Argument list too long
```

Still a bit weird, but better, I guess.
DeltaFile
+12-5sbin/gpt/gpt.c
+12-51 files

DragonFlyBSD/src 94f4175sbin/gpt gpt.c

gpt(8): Clear errno before retrying open() in gpt_open()

Otherwise, the stale errno would go through gpt_read() when it failed
with a partial read, and the program would print a weird error message
like:
```
gpt show: unable to open device 'vn4': No such file or directory
```

Suggested-by: swildner
DeltaFile
+1-0sbin/gpt/gpt.c
+1-01 files