Subject: fdisk patch
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Joel M. Ward <jmward@pooh.uccs.edu>
List: current-users
Date: 02/05/1994 19:28:24
this makes fdisk a little more friendly when changing active partitions.
It clearly shows which patrition is active and makes the default the currently
actuve partition, not 3.
here's a patch
xerxes:/usr/joel>cat *h                                                         *** ofdisk/fdisk.c      Thu Dec 16 23:35:26 1993
--- nfdisk/fdisk.c      Fri Feb  5 01:59:42 1993
***************
*** 284,291 ****
                printf("<UNUSED>\n");
                return;
        }
!       printf("sysid %d,(%s)\n", partp->dp_typ, get_type(partp->dp_typ));
!       printf("    start %d, size %d (%d Meg), flag %x\n",
                partp->dp_start,
                partp->dp_size, partp->dp_size * 512 / (1024 * 1024),
                partp->dp_flag);
--- 284,293 ----
                printf("<UNUSED>\n");
                return;
        }
!       printf("sysid %d,(%s)", partp->dp_typ, get_type(partp->dp_typ));
!       if (partp->dp_flag & ACTIVE)
!               printf(" - Active");
!       printf("\n    start %d, size %d (%d Meg), flag %x\n",
                partp->dp_start,
                partp->dp_size, partp->dp_size * 512 / (1024 * 1024),
                partp->dp_flag);
***************
*** 394,399 ****
--- 396,405 ----
  
        if (a_flag && which != -1)
                active = which;
+       else
+         for (i=NDOSPART-1; i; i--)
+           if (partp[i].dp_flag & ACTIVE)
+             active = i;
        if (ok("Do you want to change the active partition?")) {
                do
                        Decimal("active partition", active, tmp);

------------------------------------------------------------------------------