[Bug 13061] New: ubiattach -O option for VID header offset does not work

bugzilla at busybox.net bugzilla at busybox.net
Tue Jul 7 13:10:22 UTC 2020


            Bug ID: 13061
           Summary: ubiattach -O option for VID header offset does not
           Product: Busybox
           Version: 1.30.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: mark.doyle at alum.mit.edu
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

BusyBox v1.30.1 (2020-07-05 19:34:29 EDT) multi-call binary.

Example of bug:

/ # ubiattach -m 11 -d 0 -O 4096 /dev/ubi_ctrl

ubiattach: invalid option -- 'O'

ubiattach advertises an O option to set the VID header offset, but fails to
recognize the option. 

Possible Bug Fix:
I need this for my embedded system so on my copy of busybox, I changed
miscutils/ubi_tools line 158 from

        opts = getopt32(argv, "^" "m:+d:+n:+N:s:a:+t:" "\0" "-1",

opts = getopt32(argv, "^" "m:+d:+n:+N:s:a:+t:O:+" "\0" "-1",

That is, I added the O:+ to the end of the format string in getopt32.

After the above fix I successfully attached:
/ # ubiattach -m 11 -O 4096 /dev/ubi_ctrl
[   58.465623] ubi0: attaching mtd11
[   59.327799] ubi0: scanning is finished
[   59.378294] ubi0: attached mtd11 (name "NAND.es-file-system", size 398 MiB)
[   59.385354] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[   59.397168] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024
[   59.404389] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192

You are receiving this mail because:
You are on the CC list for the bug.

More information about the busybox-cvs mailing list