@@ -1897,7 +1897,6 @@ static int dos_get_partition(struct fdisk_context *cxt, size_t n,
18971897static int dos_set_partition (struct fdisk_context * cxt , size_t n ,
18981898 struct fdisk_partition * pa )
18991899{
1900- struct fdisk_dos_label * l ;
19011900 struct dos_partition * p ;
19021901 struct pte * pe ;
19031902 fdisk_sector_t start , size ;
@@ -1919,7 +1918,6 @@ static int dos_set_partition(struct fdisk_context *cxt, size_t n,
19191918 if (pa -> type && !pa -> type -> code )
19201919 fdisk_warnx (cxt , _ ("Type 0 means free space to many systems. "
19211920 "Having partitions of type 0 is probably unwise." ));
1922- l = self_label (cxt );
19231921 p = self_partition (cxt , n );
19241922 pe = self_pte (cxt , n );
19251923
@@ -1931,31 +1929,6 @@ static int dos_set_partition(struct fdisk_context *cxt, size_t n,
19311929 if (fdisk_partition_has_size (pa ))
19321930 size = pa -> size ;
19331931
1934- if (pa -> end_follow_default ) {
1935- fdisk_sector_t first [cxt -> label -> nparts_max ],
1936- last [cxt -> label -> nparts_max ],
1937- xlast ;
1938- struct pte * ext = l -> ext_offset ? self_pte (cxt , l -> ext_index ) : NULL ;
1939-
1940- fill_bounds (cxt , first , last );
1941-
1942- if (ext && l -> ext_offset ) {
1943- first [l -> ext_index ] = l -> ext_offset ;
1944- last [l -> ext_index ] = get_abs_partition_end (ext );
1945- }
1946- if (FDISK_IS_UNDEF (start ))
1947- start = get_abs_partition_start (pe );
1948-
1949- DBG (LABEL , ul_debug ("DOS: #%zu now %ju +%ju sectors" ,
1950- n , (uintmax_t ) start , (uintmax_t ) dos_partition_get_size (p )));
1951-
1952- xlast = get_unused_last (cxt , n , start , first , last );
1953- size = xlast ? xlast - start + 1 : dos_partition_get_size (p );
1954-
1955- DBG (LABEL , ul_debug ("DOS: #%zu wanted %ju +%ju sectors" ,
1956- n , (uintmax_t ) start , (uintmax_t ) size ));
1957- }
1958-
19591932 if (!FDISK_IS_UNDEF (start ) || !FDISK_IS_UNDEF (size )) {
19601933 DBG (LABEL , ul_debug ("DOS: resize partition" ));
19611934
0 commit comments