Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/util-linux/fdisk_sgi.c

    r2725 r3621  
    441441
    442442    write_sector(0, sgilabel);
    443     if (!strncmp((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8)) {
     443    if (is_prefixed_with((char*)sgilabel->directory[0].vol_file_name, "sgilabel")) {
    444444        /*
    445445         * keep this habit of first writing the "sgilabel".
     
    505505        if ((Index[0] != 10) && verbose)
    506506            printf("IRIX likes when Partition 11 covers the entire disk\n");
    507         if ((sgi_get_start_sector(Index[0]) != 0) && verbose)
     507        if ((sgi_get_start_sector(Index[0]) != 0) && verbose) {
    508508            printf("The entire disk partition should start "
    509509                "at block 0,\n"
    510510                "not at diskblock %u\n",
    511511                sgi_get_start_sector(Index[0]));
    512         if (SGI_DEBUG)      /* I do not understand how some disks fulfil it */
     512        }
     513        if (SGI_DEBUG) {     /* I do not understand how some disks fulfil it */
    513514            if ((sgi_get_num_sectors(Index[0]) != lastblock) && verbose)
    514515                printf("The entire disk partition is only %u diskblock large,\n"
     
    516517                    sgi_get_num_sectors(Index[0]), lastblock);
    517518            lastblock = sgi_get_num_sectors(Index[0]);
     519        }
    518520    } else {
    519521        if (verbose)
     
    670672
    671673    for (n = 8; n < g_partitions; n++) {
    672     if (!sgi_get_num_sectors(n)) {
    673         /*
    674          * 5 cylinders is an arbitrary value I like
    675          * IRIX 5.3 stored files in the volume header
    676          * (like sash, symmon, fx, ide) with ca. 3200
    677          * sectors.
    678          */
    679         if (g_heads * g_sectors * 5 < sgi_get_lastblock())
    680             sgi_set_partition(n, 0, g_heads * g_sectors * 5, SGI_VOLHDR);
    681             break;
     674        if (!sgi_get_num_sectors(n)) {
     675            /*
     676             * 5 cylinders is an arbitrary value I like
     677             * IRIX 5.3 stored files in the volume header
     678             * (like sash, symmon, fx, ide) with ca. 3200
     679             * sectors.
     680             */
     681            if (g_heads * g_sectors * 5 < sgi_get_lastblock()) {
     682                sgi_set_partition(n, 0, g_heads * g_sectors * 5, SGI_VOLHDR);
     683                break;
     684            }
    682685        }
    683686    }
Note: See TracChangeset for help on using the changeset viewer.