Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Armbian build PR] - Use a shorter label as the default value for bootfs to avoid mkfs.fat fail

Featured Replies

Description

When LABEL is longer than 11 characters, mkfs.fat 4.2 (2021-01-31) will fail while mkfs.fat 4.1 (2017-01-24) will cut it.

I want to split out a new function for formating filesystem. But unfortunally, there is a hook pre_prepare_partitions and prepare_partitions_custom. And bcm2711 use it for LABEL. Here is my try: hzyitc/armbian-onecloud#6c190484

The source of mkfs.fat:

v4.1: https://github.com/dosfstools/dosfstools/blob/v4.1/src/mkfs.fat.c#L1500:

case 'n':/* n : Volume name */
    sprintf(volume_name, "%-11.11s", optarg);
    for (i = 0; volume_name[i] && i < 11; i++)
/* don't know if here should be more strict !uppercase(label[i]) */
if (islower(volume_name[i])) {
    fprintf(stderr,
            "mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows\n");
    break;
}

    break;

v4.2: https://github.com/dosfstools/dosfstools/blob/v4.2/src/mkfs.fat.c#L706:

    len = mbstowcs(NULL, volume_name, 0);
    if (len != (size_t)-1 && len > 11)
die("Label can be no longer than 11 characters");

How Has This Been Tested?

No test

Checklist:

  • [ ] My code follows the style guidelines of this project
  • [X] I have performed a self-review of my own code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [X] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules

View the full article

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.