DragonFlyBSD/src 7b59e4bsys/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 996c838sys/dev/netif/age if_age.c, sys/dev/netif/ale if_ale.c

kernel/netif: Fix some comments.
DeltaFile
+1-1sys/dev/netif/age/if_age.c
+1-1sys/dev/netif/ale/if_ale.c
+1-1sys/dev/netif/bfe/if_bfe.c
+1-1sys/dev/netif/bge/if_bge.c
+1-1sys/dev/netif/bnx/if_bnx.c
+1-1sys/dev/netif/et/if_et.c
+6-62 files not shown
+8-88 files

DragonFlyBSD/src 1ab20bdsbin/fdisk fdisk.c

fdisk(8): Silence "invalid fdisk partition table" warning

When we're initializing the disk (i.e., with -i or -I flag), silence the
"invalid fdisk partition table found" warning.
DeltaFile
+2-1sbin/fdisk/fdisk.c
+2-11 files

DragonFlyBSD/src ed9442bsbin/gpt migrate.c

gpt(8): Check map_add() errors in migrate()
DeltaFile
+4-0sbin/gpt/migrate.c
+4-01 files

DragonFlyBSD/src 72e9a85sbin/gpt migrate.c

gpt(8): Recognize FS_MSDOS in convert_fstype() for migration
DeltaFile
+3-0sbin/gpt/migrate.c
+3-01 files

DragonFlyBSD/src ee4b184sbin/gpt show.c

gpt(8): Show names for the recognized DOS partitions
DeltaFile
+16-4sbin/gpt/show.c
+16-41 files

DragonFlyBSD/src 41d898asbin/gpt migrate.c show.c

gpt(8): Minor cleanups to migrate() and show()
DeltaFile
+6-5sbin/gpt/migrate.c
+1-3sbin/gpt/show.c
+7-82 files

DragonFlyBSD/src 844a5a6sbin/gpt create.c

gpt(8): Fix "create" on MBR-formatted disk without free space at end

When to invoke "create" on MBR-formatted disk without free space at the
end, gpt(8) would fail with error of "no room for the backup header";
e.g.,

    $ sudo gpt show vn5
    Disk vn5: 1024MB (2097152 512-byte sectors)
        Start  Sectors    Size  Index  Contents
            0        1    512B      -  MBR
            1       31  15.5KB      -  Unused
           32  2097120  1024MB      0  MBR part 108 (active)

    $ sudo gpt -vvv create -f vn5
    gpt create: vn5: mediasize=1073741824; sectorsize=512; blocks=2097152
    gpt create: vn5: MBR at sector 0
    gpt create: vn5: MBR part: type=108, start=32, size=2097120
    gpt create: vn5: error: no room for the backup header


    [2 lines not shown]
DeltaFile
+33-47sbin/gpt/create.c
+33-471 files

DragonFlyBSD/src 9ff9c70sbin/gpt gpt.8

gpt.8: Minor fixes and style tweaks
DeltaFile
+13-12sbin/gpt/gpt.8
+13-121 files

DragonFlyBSD/src 9e24ffbsbin/gpt recover.c gpt.c

gpt(8): Rename MAP_TYPE_* constants for consistency

No functional change.
DeltaFile
+8-8sbin/gpt/recover.c
+7-7sbin/gpt/gpt.c
+6-6sbin/gpt/migrate.c
+6-6sbin/gpt/expand.c
+6-6sbin/gpt/create.c
+4-4sbin/gpt/add.c
+37-376 files not shown
+59-5912 files

DragonFlyBSD/src 470fd74sbin/gpt migrate.c

gpt(8): Show slice and partition migration messages
DeltaFile
+32-0sbin/gpt/migrate.c
+32-01 files

DragonFlyBSD/src f92b85dsbin/gpt gpt.8

gpt.8: Rewrite the examples to show a UEFI boot setup

Meanwhile, add "/boot/boot1.efi" in FILES section; add SEE ALSO links.
DeltaFile
+32-78sbin/gpt/gpt.8
+32-781 files

DragonFlyBSD/src 6c061absbin/gpt map.c gpt.c

gpt(8): Check mkmap() failure in map_add() and map_init()
DeltaFile
+8-1sbin/gpt/map.c
+4-1sbin/gpt/gpt.c
+1-1sbin/gpt/map.h
+13-33 files

DragonFlyBSD/src 34bda5dsbin/gpt add.c

gpt(8): Simply assign uuid_t rather than calling parse_uuid()
DeltaFile
+4-15sbin/gpt/add.c
+4-151 files

DragonFlyBSD/src 34111d6sbin/gpt migrate.c gpt.8

gpt(8): Support migration of DragonFly (0x6C) slice and disklabel64

Since DragonFly used 386BSD (0xA5) slice in the past, we need to perform
the same migration logic for 386BSD (0xA5) and DragonFly (0x6C) slices.
Detect both disklabel64 and disklabel32 and migrate the partitions.
DeltaFile
+122-58sbin/gpt/migrate.c
+1-7sbin/gpt/gpt.8
+123-652 files

DragonFlyBSD/src fd4926esbin/gpt migrate.c

gpt(8): No need to label the migrated partitions

Also, the generic label names don't make much sense.
DeltaFile
+1-11sbin/gpt/migrate.c
+1-111 files

DragonFlyBSD/src 9836187sbin/gpt gpt.c

gpt(8): Move a comment in gpt_gpt() to make more sense
DeltaFile
+5-2sbin/gpt/gpt.c
+5-21 files

DragonFlyBSD/src 9f19c3esbin/gpt gpt.c

gpt(8): Read secondary GPT from position stored in the primary header

When the primary GPT is found, read the secondary GPT from the position
stored in the primary header, rather than assuming the end of the disk.

Meanwhile, add error messages for gpt_read() failures.

Obtained-from: NetBSD
DeltaFile
+37-12sbin/gpt/gpt.c
+37-121 files

DragonFlyBSD/src 5fead1fsbin/gpt migrate.c

gpt(8): Improve "migrate" command in handling unknown partitions

If '-f' (force) is unspecified, exit with an error instead of ignoring
the unknown slice partitions, similar to the handling of unknown DOS
partitions.
DeltaFile
+16-9sbin/gpt/migrate.c
+16-91 files

DragonFlyBSD/src 61ba1desbin/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 4a92b9csbin/gpt gpt.c

gpt(8): Skip GPT header probe when MBR is present

gpt_open() previously probed the GPT header even when an MBR was
present.  When opening a disk that had been initialized with
"fdisk -I" (converting it from GPT to MBR), this caused errors in
map_add(), as shown:

    % sudo ./gpt -vv show da8
    gpt show: da8: mediasize=180045766656; sectorsize=512; blocks=351651888
    gpt show: da8: MBR at sector 0
    gpt show: da8: Primary GPT at sector 1
    gpt show: error: map entry doesn't fit media: new_start + new_size < start + size (34 + 29 < 40 + 409600)
    gpt show: unable to open device 'da8': Undefined error: 0

After this change, gpt(8) correctly treats the disk as MBR-only and
displays the partition table:

    % sudo ./gpt -vv show da8
    gpt show: da8: mediasize=180045766656; sectorsize=512; blocks=351651888

    [7 lines not shown]
DeltaFile
+40-25sbin/gpt/gpt.c
+40-251 files

DragonFlyBSD/src 54a89d1sbin/gpt gpt.c expand.c

gpt(8): Fix comments, tweak number formatter, improve messages
DeltaFile
+56-46sbin/gpt/gpt.c
+11-11sbin/gpt/expand.c
+7-7sbin/gpt/show.c
+6-7sbin/gpt/remove.c
+6-6sbin/gpt/migrate.c
+5-5sbin/gpt/map.c
+91-824 files not shown
+103-9410 files

DragonFlyBSD/src 07e9284sbin/gpt destroy.c create.c

gpt(8): Adjust and export destroy() to replace do_destroy()
DeltaFile
+3-12sbin/gpt/destroy.c
+1-1sbin/gpt/create.c
+1-1sbin/gpt/gpt.h
+5-143 files

DragonFlyBSD/src bf76e3fsbin/gpt show.c gpt.c

gpt(8): Don't abbreviate primary/secondary for better reading
DeltaFile
+4-4sbin/gpt/show.c
+1-1sbin/gpt/gpt.c
+5-52 files

DragonFlyBSD/src 58bad2csbin/gpt gpt.c

gpt(8): Improve GPT table partitions reading logic

The old code only tried to read the secondary GPT header, but didn't try
to read the partitions from the secondary GPT table.  The updated code
will try that so it could work in the case when there is no the primary
GPT but the secondary GPT.
DeltaFile
+49-24sbin/gpt/gpt.c
+49-241 files

DragonFlyBSD/src f2a5e6csbin/gpt gpt.c add.c

gpt(8): Minor style cleanups
DeltaFile
+7-7sbin/gpt/gpt.c
+2-2sbin/gpt/add.c
+2-2sbin/gpt/label.c
+11-113 files

DragonFlyBSD/src 5a2f9e9sbin/gpt migrate.c

gpt(8): Improve migrate_disklabel32() to support more filesystems

- Add support for CCD, HAMMER, and HAMMER2 filesystems.
- Use DragonFly's UUIDs for the filesystems instead of FreeBSD's,
  because we were using DOSPTYP_386BSD (0xA5) before migrating to
  our own DOSPTYP_DFLYBSD (0x6C).

The next commit will add disklabel64 migration support.
DeltaFile
+19-4sbin/gpt/migrate.c
+19-41 files

DragonFlyBSD/src 341b629sbin/gpt migrate.c

gpt(8): Refactor migrate_disklabel() to prepare disklabel64 support

- Refactor migrate_disklabel() into read_disklabel32() and
  migrate_disklabel32().  This allows us for easier adding disklabel64
  support.
- Free the gpt_read() returned buffer after use.
- Add a comment explaining the 'rowofs' determination.
DeltaFile
+35-12sbin/gpt/migrate.c
+35-121 files

DragonFlyBSD/src a1e2bf4sbin/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 ac71e85sbin/gpt migrate.c recover.c

gpt(8): Handle gpt_read() failure
DeltaFile
+6-1sbin/gpt/migrate.c
+5-0sbin/gpt/recover.c
+4-0sbin/gpt/create.c
+15-13 files