File: ChangeLog

package info (click to toggle)
parted 3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 17,324 kB
  • sloc: ansic: 73,015; sh: 11,628; makefile: 645; perl: 179; python: 44; asm: 36; sed: 16
file content (11228 lines) | stat: -rw-r--r-- 462,614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
2019-10-10  Brian C. Lane  <bcl@redhat.com>

	version 3.3
	* NEWS: Record release date.

	NEWS: Note the fix for the s390 bug

2019-09-30  Viktor Mihajlovski  <mihajlov@linux.ibm.com>

	libparted/s390: Re-enabled virtio-attached DASD heuristics
	DASDs attached to KVM guest as virtio-blk devices are only handled
	properly, if the unique DASD geometry is detected. Commit id
	61dd3d4c5eb782eb43caa95342e63727db3f8281 has prevented proper geometry
	detection. Fixed by making sure that HDIO_GETGEO takes precedence
	on s390[x].

2019-08-21  Brian C. Lane  <bcl@redhat.com>

	README-release: Add link to upload registration page
	Without this you cannot use gnupload to send the new release tarball to
	the ftp servers.

2019-08-12  Brian C. Lane  <bcl@redhat.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 3.2.153
	* NEWS: Record release date.

	maint: Move NEWS template to line 3

	maint: Update copyright statements to 2019
	By running make update-copyright

	maint: Bump library REVISION number for release

	maint: Update bootstrap script from latest gnulib

	maint: Update to latest gnulib

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix bug in bsd.c alpha_bootblock_checksum
	I flubbed this in e35af6cbc43f5b279e6f0d65ccc904b1ac6c63d2 by trying to
	switch to using a pointer and ended up writing off the end. Switch the
	loop in alpha_bootblock_checksum back to use [i] index. It's easier
	to read anyway.

	doc: Create po directory if missing
	When running 'make distcheck' the directory tree it uses is created
	without the po directory. Create it if it is missing.

	dist-check.mk: Remove empty .deps directories
	Borrowed from coreutils commits 373ba16f332d and 40434e566e52

	Turn off c_prohibit_gnu_make_extensions

	po: Add argmatch.h

	bsd.c: Rewrite disklabel code to prevent gcc warnings
	Constructing a pointer into a char array results in warnings about casting
	changing alignment. This changes how the boot sector is handled by adding the
	label to BSDDiskData with the correct offset (64 bytes).

	Add gcc malloc attribute to ped_alloc and ped_calloc

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	libparted: Replace abs() with llabs()
	GCC 9 fails to compile a few C source files which call abs() function.
	An example of the error messages was as follows:

	  CC       dos.lo
	dos.c: In function '_best_solution':
	dos.c:1773:13: error: absolute value function 'abs' given an argument of type 'long long int' but has parameter of type 'int' which may cause truncation of value [-Werror=absolute-value]
	 1773 |   a_delta = abs (part->geom.start - a->start);
	      |             ^~~
	dos.c:1774:13: error: absolute value function 'abs' given an argument of type 'long long int' but has parameter of type 'int' which may cause truncation of value [-Werror=absolute-value]
	 1774 |   b_delta = abs (part->geom.start - b->start);
	      |             ^~~
	cc1: all warnings being treated as errors

	To avoid the errors, replace abs() function calls with llabs().

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	sun.c: Aligned _SunRawLabel to 16bit boundary

	gpt.c: Drop cast of efi_guid_t to unsigned char *
	This confuses gcc, making it think the uuid_t is unaligned when it really comes
	from a efi_guid_t entry in _GPTDiskData.

	gpt.c: Align _GPTDiskData to 8 byte boundary

	dvh.c: Use memcpy instead of strncpy
	The strings are short, so using memcpy isn't much slower (if at all).  This
	fixes gcc complaining about strncpy possibly copying a non-terminated string.

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	include/parted/unit.in.h: Specify const attribute to ped_unit_get_name()
	GCC 8 fails to compile libparted/unit.c with an error:

	  CC       unit.lo
	unit.c:155:1: error: function might be candidate for attribute 'const' [-Werror=suggest-attribute=const]
	 ped_unit_get_name (PedUnit unit)
	 ^~~~~~~~~~~~~~~~~
	  CC       disk.lo
	cc1: all warnings being treated as errors

	Const attribute is required for the function ped_unit_get_name() because
	its return value is not affected by program status. To avoid the build
	failure, change attribute of the function from pure to const.

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	libparted/labels/pt-tools.c: Fix gperf generated function attribute
	GCC 8 fails to compile libparted/labels/pt-tools.c with an error:

	  CC       pt-tools.lo
	In file included from pt-tools.c:114:
	pt-tools.c: In function 'pt_limit_lookup':
	pt-limit.gperf:78:1: error: function might be candidate for attribute 'pure' [-Werror=suggest-attribute=pure]
	cc1: all warnings being treated as errors

	"Pure" attribute is required for the function pt_limit_lookup() because
	it does not change program status other than its return value.

	To avoid the build failure, add _GL_ATTRIBUTE_PURE to the function.
	The attribute cannot be added in libparted/gperf/pt-limit.c because it
	is generated by gperf during the build process. Instead, add the
	attribute in libparted/gperf/pt-tools.c which includes the generated
	function.

2019-08-09  Shin'ichiro Kawasaki  <kawasaki@juno.dti.ne.jp>

	configure.ac: Check ABI against ABI version 2
	GCC 8 fails to compile libparted/labels/aix.c with an error:

	  CC       aix.lo
	cc1: error: -Wabi won't warn about anything [-Werror=abi]
	cc1: note: -Wabi warns about differences from the most up-to-date ABI, which is
	also used by default
	cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
	cc1: all warnings being treated as errors
	make[4]: *** [Makefile:1250: aix.lo] Error 1

	To avoid the build failure, specify ABI version 2 to check ABI change
	from GCC 4.9.

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	Adjust the gcc warnings to recognize FALLTHROUGH

	dos.c: Fix cast alignment error in maybe_FAT

	atari.c: Align the AtariRawTable on a 16bit boundary
	The casts to uint16_t need to know that this will be aligned. The struct is
	actually 512 bytes, so it normally does end up aligned. This just makes sure
	the compiler knows it and stops warning about the casts.

	Change 'time stamp' to 'timestamp'
	Caught by make syntax-check

	Fix double semi-colons
	Caught by make syntax-check

	Update syntax-check NEWS hash to cover 3.2 release notes.

	Fix syntax-check complaints about tests

	Remove trailing whitespace
	Caught by make syntax-check

	Remove unnecessary if before free checks
	Caught by make syntax-check

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	configure.ac: Remove default -Werror flag
	Warnings as errors does not make sense with the current state of the
	codebase and it is making it difficult to do new releases.

	We should *show* the warnings, and handle them as time permits, but they
	should not block building a new release.

2019-08-09  Brian C. Lane  <bcl@redhat.com>

	README-release: Updating the release instructions

2019-08-05  A. Wilcox  <AWilcox@Wilcox-Tech.com>

	libparted: Fix endian bug in bsd.c
	You have to add 1 *before* doing the endian conversion, not after.

2019-07-15  Max Staudt  <max@enpas.org>

	libparted/fs/amiga/affs.c: Remove printf() to avoid confusion
	Currently, the affs code in libparted prints a debug line to stdout when
	an Amiga FFS partition is probed. This confuses tools that parse stdout.

	A prominent example is the partitioner (partman) in Debian's installer,
	which parses stdout from a tool (parted_devices) that uses libparted to
	scan the system's block devices. As of now, Debian cannot be installed
	on a typical Amiga:

	  https://lists.debian.org/debian-68k/2019/07/msg00015.html

	This patch removes this unexpected printf().

	Cc: glaubitz@debian.org

2019-04-09  Michael Small  <smallm@sdf.org>

	Tests case for sigsegv when false nilfs2 superblock detected.

2019-04-09  Michael Small  <smallm@sdf.org>

	Avoid sigsegv in case 2nd nilfs2 superblock magic accidently found.
	1. is_valid_nilfs_sb: make sure the subtraction bytes - sumoff - 4
	won't give a negative number. That as the len argument to
	__efi_crc32() would give a very large number for the latter's for
	loop limit, since len is unsigned long.

	2. nilfs2_probe: Read and allocate enough sectors to hold a
	struct nilfs2_super_block.  is_valid_nilfs_sb() will be passing
	up to 1024 bytes to __efi_crc32(). If only one 512 byte sector
	had been allocated with alloca and read from disk that would cause
	reads off the the end of the stack even if bytes were more than
	sumoff - 4.

2019-02-11  Brian C. Lane  <bcl@redhat.com>

	Fix align-check help output

2019-01-31  Hans-Joachim Baader  <baader@gmx.net>

	Added support for Windows recovery partition (WINRE) on MBR
	Windows 10 uses a recovery partition which is sometimes marked with
	partition type 0x27 on MBR systems. It wasn't possible to handle such
	a partition with parted. Therefore the partition type PARTITION_MSFT_RECOVERY
	is now used properly also on MBR when the flag msftres is set.

2019-01-31  Brian C. Lane  <bcl@redhat.com>

	parted: Remove PED_ASSERT from ped_partition_set_name
	Asserts should only check logic, not wrap functions with side-effects.
	When compiled with --disable-debug this causes the name field of mkpart
	to be ignored.

2019-01-30  Brian C. Lane  <bcl@redhat.com>

	docs: Update GNU License version in parted .text files

2018-10-16  dann frazier  <dann.frazier@canonical.com>

	Read NVMe model names from sysfs
	parted currently shows the same generic model name for all NVMe devices:

	  # parted /dev/nvme0n1 -s print | grep Model
	  Model: NVMe Device (nvme)

	If the model information is available in sysfs, display that instead:

	  # parted /dev/nvme0n1 -s print | grep Model
	  Model: THNSN5512GPU7 NVMe TOSHIBA 512GB (nvme)

2018-10-16  dann frazier  <dann.frazier@canonical.com>

	Fix warnings from GCC 7's -Wimplicit-fallthrough
	All of these locations appear to have intentional fallthroughs. Add
	comments that GCC will detect to mute warnings w/ -Wimplicit-fallthrough.

2018-10-16  dann frazier  <dann.frazier@canonical.com>

	ped_unit_get_name: Resolve conflicting attributes 'const' and 'pure'
	The const and pure attributes conflict:

	  error: ignoring attribute 'const' because it conflicts with attribute 'pure' [-Werror=attributes]

	pure functions may access global memory, const functions may not.
	ped_unit_get_name() accesses non-local variable unit_names, so drop const.

2018-10-16  Brian C. Lane  <bcl@redhat.com>

	Add udf to t1700-probe-fs and to the manpage
	If mkfs.udf is installed this will test to make sure that the filesystem
	is detected.

2018-10-16  Pali Rohár  <pali.rohar@gmail.com>

	libparted: Add support for MBR id, GPT GUID and detection of UDF filesystem
	This is needed for libparted based applications (like Gparted) to correctly
	choose MBR id and GPT GUID for UDF filesystem. MBR id for UDF is 0x07 and
	GPT GUID is Microsoft Basic Data, see why: https://serverfault.com/a/829172

	Without registering a new libparted fs code it is not possible to assign
	MBR id or GPT GUID.

	Detection of UDF filesystem is done by checking presence of UDF VSD (NSR02
	or NSR03 identifier) and UDF AVDP at expected locations (blocks 256, -257,
	-1, 512).

2018-10-16  Simon Xu  <xu.simon@oracle.com>

	Fix potential command line buffer overflow
	parted terminates with 'stack smashing detected' when fed with a long command
	line argument, and segfaults when the argument is long enough:

	root # /sbin/parted /dev/sda $(perl -e 'print "a"x265')
	*** stack smashing detected ***: /sbin/parted terminated
	...
	Aborted

	root # /sbin/parted /dev/sda $(perl -e 'print "a"x328')
	*** stack smashing detected ***: /sbin/parted terminated
	...
	Command History:
	Segmentation fault

	parted should be able to detect it and exit with error and usage messages.
	This also makes command line buffer overflow exploit more possible.  Fix it by
	adding length check in the condition of the for loop where command line
	arguments are copied.

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	t6100-mdraid-partitions: Use v0.90 metadata for the test
	Newer metadata types use more disk space, causing the test to fail.

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	parted.c: Make sure dev_name is freed
	If there was a problem with ped_device_get or ped_device_open it would not be freed.

	Related: rhbz#1602652

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	parted.c: Always free peek_word
	If command_line_get_fs_type failed it would never free it, so put a free
	in both branches of the if.

	Related: rhbz#1602652

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	Fix the length of several strncpy calls
	These need to be 1 less than the allocated size of the buffer, strncpy
	will fill shorter strings with zeros, but there needs to be room for at
	least one 0x00 at the end if the string is the same length as the buffer
	and has no terminating 0x00.

	Related: rhbz#1602652

2018-08-22  Brian C. Lane  <bcl@redhat.com>

	Modify gpt-header-move and msdos-overlap to work with py2 or py3
	Distributions are starting to remove python2 and only use python3.
	Modify these test scripts so that they will work with either python 2.7
	or python 3.X

2018-08-22  Ulrich Müller  <ulm@gentoo.org>

	libparted: Fix ending CHS address in PMBR.
	According to the UEFI specification version 2.7, Section 5.2.3,
	Table 16, the ending CHS address in the protective MBR should be set
	to 0xFFFFFF. This also agrees with the behaviour of fdisk from
	util-linux-2.32.

2018-06-12  Phillip Susi  <psusi@ubuntu.com>

	Fix atari label false positives
	The atari label gets false positives easily, so probe it after
	all other labels have said no.

2018-06-05  Phillip Susi  <psusi@ubuntu.com>

	Lift 512 byte restriction on fat resize
	As Colin Watson pointed out way back in 2014, when I removed the
	512 byte sector size restriction from the fs recognition code,
	I missed the same from the fat resize code.

2018-06-05  Colin Watson  <cjwatson@ubuntu.com>

	build: Remove unused traces of dynamic loading
	Now that file system operations have been removed from libparted,
	libreiserfs is no longer used.  Remove references to it, along with the
	dynamic loading build infrastructure which was only used for
	libreiserfs.

2018-06-05  Phillip Susi  <psusi@ubuntu.com>

	Fix resizepart iec unit end sector
	Fix resizepart to adjust the end to be -1 sector when using iec
	power of 2 units so that the next partition can start immediately
	following the new end, just like mkpart does.

2018-06-05  Niklas Hambüchen  <mail@nh2.me>

	mkpart: Allow negative start value when FS-TYPE is not given
	The manual had long documented that negative values are
	allowed for both start and end values, but until now negative
	start values were rejected if FS-TYPE was not given.

	Example:

	  # parted --script -a optimal /dev/loop0 -- mklabel gpt mkpart primary ext4 -5MiB 100%
	  (succeeds)

	  # parted --script -a optimal /dev/loop0 -- mklabel gpt mkpart primary -5MiB 100%
	  parted: invalid token: -5MiB
	  Error: Expecting a file system type.

	This commit fixes the latter error.
	The issue was an insufficient lookahead in command line parsing,
	looking only for digits when skipping over FS-TYPE.
	The fix is including the minus '-' in the lookahead.

	Originally reported as Debian bug #880035:

	  "parted: fails to use negative start value for 'mkpart' command without specyfying FS-TYPE"
	  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880035

2018-06-05  Phillip Susi  <psusi@ubuntu.com>

	Fix set and disk_set to not crash when no flags are supported
	Loop labels and file images support no flags.  set and disk_set
	would prompt for a flag and accept any string since the list of
	flags was empty, then fail to look up an actual flag value, then
	throw an exception with a null string for the name of the flag,
	which would bug.

2018-05-07  Phillip Susi  <psusi@ubuntu.com>

	tests: fix t6100-mdraid-partitions
	The test was failing because it didn't wait for the md device
	to appear after creating it.

	Fix make check
	Make check failed due to some warnings treated as errors.  One was
	caused by a warning that a function could have the noreturn attribute.
	It seems that this had previously been disabled but gcc has changed
	the flag from -Wmissing-noreturn to -Wsuggest-attribute=noreturn.  The
	recently added volser.c test also caused a few warnings when not
	compiled on s390x because most of the functions were no used, so #if
	those out as well.

2018-04-04  Richard W.M. Jones  <rjones@redhat.com>

	linux: Include <sys/sysmacros.h> for major() macro.
	Since glibc 2.27 this header is required.

2017-12-19  Sebastian Parschauer  <sparschauer@suse.de>

	Add support for NVDIMM devices
	Recognize NVDIMM devices, so that "parted -s /dev/pmem7 p" now
	prints "Model: NVDIMM Device (pmem)" instead of
	"Model: Unknown (unknown)".

	In order for a device to be recognized as NVDIMM, it has to
	have a 'blkext' major number. But since this major can be
	used also by other device types, we also check that the device
	path contains 'pmem' as a substring.

	* NEWS: Mention the change
	* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_PMEM
	* libparted/arch/linux.c(_device_probe_type): Recognize NVDIMM devices.
	* libparted/arch/linux.c(linux_new): Handle NVDIMM devices.
	* parted/parted.c(do_print): Add "pmem" to list of transports.

2017-12-19  Arnout Vandecappelle (Essensium/Mind)  <arnout@mind.be>

	libparted/labels: link with libiconv if needed
	gpt.c uses iconv so it should link with it. Otherwise, on platforms
	where libiconv is a separate library, we get a link failure of parted:

	    CCLD     parted
	  ../libparted/.libs/libparted.so: undefined reference to `libiconv'
	  ../libparted/.libs/libparted.so: undefined reference to `libiconv_open'
	  ../libparted/.libs/libparted.so: undefined reference to `libiconv_close'

	Since iconv functionality is needed unconditionally (not only when
	gettext is enabled), AM_ICONV needs to be added to configure.ac.

2017-07-31  Brian C. Lane  <bcl@redhat.com>

	atari.c: Drop xlocale.h (#1476934)
	glibc no longer includes this header. locale.h should work just fine.

2017-06-06  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix udev cookie leak in _dm_resize_partition
	Add a NEWS entry.

2017-05-25  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix udev cookie leak in _dm_resize_partition
	The function is setting udev cookies, but not using them when waiting
	for the task. This results in leaked cookies, which can eventually
	exhaust the available number of semaphores.

	'dmsetup udevcookies' will show a cookie remaining afterwards, and 'ipcs -s'
	will show the semaphores in use.

	Also simplified the exit so that the task is always destroyed and memory
	is all freed in the same path.

	Resolves: rhbz#1455564

2017-05-02  Brian C. Lane  <bcl@redhat.com>

	tests/t1701-rescue-fs wait for the device to appear.
	After mkpart it needs to wait for the new partition to appear.

2017-05-02  Brian C. Lane  <bcl@redhat.com>

	Increase timeout for rmmod scsi_debug and make it a framework failure
	On some hardware scsi_debug can take longer to remove. If this fails it
	inevitably results in the next test failing since it cannot load
	scsi_debug.

	Increse the timeout to 40 loops (8 seconds), and if it hits the limit
	without succeeding call framework_failure_

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: add test cases for the new fdasd functions
	The test case uses a temporary file in libparted/tests under
	Check framwork.It can be issued by "make check" in the test dir.

	libparted/dasd: add an exception for changing DASD-LDL partition table
	The partition table of DASD-LDL device with the dasd disk label
	should not be changed according to its character in Linux.
	When the user tries to modify the partition table, an exception
	will be raised to inform user of this character.

	libpartd/dasd: improve flag processing for DASD-LDL
	DASD-LDL does not support flag now, so all the flags are
	unavailable to it.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted/ui: remove unneccesary information of command line
	When some command fails, the information still exists in
	command_line buffer. When in command mode or interactive mode,
	if an interactive exception prompts, the remained information
	will be processed as option from user. This will raise some other
	information or even unexpected results. So before getting option
	input from user, clean the command line buffer.

	Example: When the disk label is invalid and user tries to make
		 new partition on the device with command like,
		 mkpart 0 50%. Then parted will raise an exception
		 telling an invalid disk label found and whether to correct it.
		 But at this time 0 as the input of mkpart will be
		 considered as the option input for the exception(yes/no).
		 So one more exception will raised with error information.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted: check the name of partition first when to name a partition
	The previous function works well for the labels supporting naming
	partition, but not for these which don't. If the disk label does not
	support partition naming, two exceptions will be raised. Even after the first
	error indicates it does not support name, parted yet asks user for
	name in iteractive mode.

	First check if the disk label supports partition naming and if it
	does, it will continue; otherwise, it will stop and raise an
	exception.

2017-05-01  Sebastian Parschauer  <sparschauer@suse.de>

	Add support for RAM drives
	Recognize RAM drives, so "parted -s /dev/ram0 p" now prints
	"RAM Drive (brd)" instead of "Model: Unknown (unknown)".

	In order for a device to be recognized as RAM drive, it has to
	have major number 1. Also the BLKFLSBUF ioctl shouldn't be used
	on RAM drives as it is used to zero the device.

	* NEWS: Mention the change
	* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_RAM.
	* libparted/arch/linux.c(RAM_MAJOR): New define.
	* libparted/arch/linux.c(_device_probe_type): Recognize RAM drives.
	* libparted/arch/linux.c(linux_new): Handle RAM drives.
	* libparted/arch/linux.c(_flush_cache): Skip RAM drives.
	* parted/parted.c(do_print): Add "brd" to list of transports.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	clean the disk information when commands fail in interactive mode.
	parted always reads disk information to memory before any
	operations. The disk that user operates is actually
	a copy of real one in memory. When the information in memory
	is changed, it will commit the memory to device to update the
	disk information.

	Once the disk information is read, parted will never re-read it
	again unless another device is loaded or the device is re-read.
	Above work has been done in commit 7eac058 (parted: don't reload
	partition table on every command)

	Each command of parted always commits the memory when it succeeds.
	Then the disk information on device and in memory are the same.
	But when it fails, they might be different. User will be confused
	by this, and sometimes get undesired result with the contaminated
	memory. This memory should be cleaned if some command fails.
	Then the command followed will re-read the disk.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted: fix wrong error label jump in mkpart
	When the user makes a new partition, if parted fails to add the
	partition to disk, it jumps to wrong error label. In this
	situation, this new partition actually is not a node in disk
	data structure. But in the wrong error label, it pretends this
	is a node and removes it as a list node, leading to other
	partition in this disk deleted. This might lead to a memory leak.
	Because if there are other partitions, it just removes them from
	list without releasing the resource. And this also leads to different
	disk information between memory and device. This is confusing.

	But when the new partition is added to disk successfully and if
	any operations followed fail, this partition should be removed from
	disk and destroyed.

2017-05-01  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	parted: fix crash due to improper partition number input
	When the user makes a new partition, if parted fails to add the
	partition to disk, it jumps to wrong error label. In this
	situation, this new partition actually is not a node in disk
	data structure. But in the wrong error label, it pretends this
	is a node and removes it as a list node, leading to other
	partition in this disk deleted. This might lead to a memory leak.
	Because if there are other partitions, it just removes them from
	list without releasing the resource. And this also leads to different
	disk information between memory and device. This is confusing.

	But when the new partition is added to disk successfully and if
	any operations followed fail, this partition should be removed from
	disk and destroyed.

2017-04-17  Phillip Susi  <psusi@ubuntu.com>

	Fix crash when localized
	The _() macro is only for translating string literals.  It was
	incorrectly applied to a runtime string representing the name
	of a partition and this sometimes caused a gettext crash.

2017-01-19  Sebastian Rasmussen  <sebras@gmail.com>

	libparted: Fix typo in hfs error message

2016-12-22  Laurent Vivier  <laurent@vivier.eu>

	libparted: Fix MacOS boot support
	boot_region_length (or BootSize in the MacOS dialect) is the length
	of the driver code in the driver partition. This length is used
	to compute the checksum of the driver.

	libparted updates this value by setting the whole size of the partition
	without computing the checksum of the driver using this size.

	As the checksum is wrong, the driver is broken and cannot be loaded
	by the MacOS ROM, and thus the disk is not bootable anymore.

	Moreover, parted try to update the driver list and makes it disappear.

	As parted is not able to insert a driver in a partition,
	the driver is generally inserted by the Apple HD Tool,
	this patch removes the line updating the driver size.

	We also simplify the driver list scan and fix endianess use.

	This has been tested... and it works, now.

	I have updated a bootable disk with parted on x86_64 and
	then been able to boot it (again) on a Mac LC III.

2016-12-22  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>

	libparted: Add support for atari partition tables

	libparted:tests: Move get_sector_size() to common.c
	Moving get_sector_size() from disk.c to common.c allows
	us to use it in _implemented_disk_label() to test for
	512-byte sectors. This change is required to be able to
	enable this test for atari partition tables for which
	support is added in a follow-up patch.

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Update t0220 and t0280 for the swap flag.

2016-12-22  Arvin Schnell  <aschnell@suse.com>

	libparted: set swap flag on GPT partitions
	The filesystem type is still detected as befor, but now setting the
	'swap' flag will set the partition GUID to PARTITION_SWAP_GUID.

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: add test cases for the new fdasd functions
	The test case uses a temporary file in libparted/tests under
	Check framwork. It can be issued by "make check" in the test dir.

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: add new fdasd functions
	Introduce a set of new functions from the fdasd utility of the s390-tools
	to keep the code base in parted and s390-tools in sync.

	These new functions are:
	  fdasd_check_volser():  validate the volser input
	  fdasd_get_volser():    get volume serial (volser)
	  fdasd_change_volser(): change volser with string
	  fdasd_reuse_vtoc():    re-create vtoc labels based on the existing vtoc

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: update and improve fdasd functions
	Update the fdasd_anchor_t data structure and the fdasd_cleanup()
	function. Also correct vtoc_changed and vlabel_changed accounting
	because they are important to rewrite vtoc to save the changes.

	Wang Dong <dongdwdw@linux.vnet.ibm.com>
	Hendrik Brueckner <brueckner@linux.vnet.ibm.com>

2016-12-22  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: unify vtoc handling for cdl/ldl
	Merge volume label cdl and ldl. It is convenient to manipulate
	the same structure. Also remove unused arguments in the functions.

2016-12-22  Sebastian Parschauer  <sparschauer@suse.de>

	libparted: Don't warn if no HDIO_GET_IDENTITY ioctl
	Fully virtualized Xen VMs (HVM) use Linux IDE devices which don't
	support the HDIO_GET_IDENTITY ioctl. EINVAL is returned, a warning
	is printed and the device model is set to "Generic IDE" in that
	case. The problem is seeing the warning all the time. So drop it
	for this case.

2016-12-22  Petr Uzel  <petr.uzel@suse.cz>

	libparted: Fix starting CHS in protective MBR
	The CHS address for protective partition start in protective MBR
	should be 0/0/2, according to UEFI spec (v2.6, section 5.2.1).

	* libparted/labels/gpt.c (_write_pmbr): Fix starting CHS address

	Reported by Steffen Winterfeldt in https://bugzilla.suse.com/969165

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Stop timing t9040 (#1172675)
	parted doesn't have any control over how long this takes, there is no
	reason to consider this a parted bug if it takes longer than expected.

	Resolves: rhbz#1172675

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	partprobe: Open the device once for probing
	Previously there were 3 open/close pairs for the device, which may
	result in triggering extra udev actions. Instead, open it once at the
	start of process_dev and close it at the end.

	tests: Set optimal blocks to 64 for scsi_debug devices
	The Linux kernel 4.5 changed the optimal blocks count from 64 to 1024
	This causes tests using scsi_debug devices to fail because of alignment
	issues. Set the opt_blks to 64 so that we have consistent behavior
	across kernels.

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	doc: Add information about quoting
	Some shells (bash) will strip off the " so it needs to be
	wrapped in '' to prevent it. eg.

	parted -s ./disk.img mkpart '"EFI System Partition"' 1M 500M

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	doc: Cleanup mkpart manpage entry (#1183077)

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Fix t1700 failing on a host with a 4k xfs filesystem (#1260664)
	The problem is that mkfs.xfs won't work if the file it is trying to
	create is on a filesystem with a sector size larger than the passed
	-ssize value. So a host with 4k disks (eg. s390) and the xfs filesystem
	will fail with the error message:
	    illegal sector size 512; hw sector is 4096

	Failures setting up the environment for the test aren't parted bugs.
	This stops treating mkfs and dd errors as test failures, skipping the fs
	and logging a warning.

	Related: rhbz#1260664

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Add wait to t9042 (#1257415)
	Also make the new disklabel and first partition all in one step to
	prevent udev problems.

	Resolves: rhbz#1257415

2016-12-22  Brian C. Lane  <bcl@redhat.com>

	tests: Add udevadm settle to wait_for_ loop (#1260664)
	Sometimes the device will vanish after the wait_for_dev_to_appear exits.
	Add udevadm settle in an attempt to make sure the udev system is done
	flapping around and the device will stay in place.

	Related: rhbz#1260664

2016-10-04  Brian C. Lane  <bcl@redhat.com>

	tests: t3310-flags.sh skip pc98 when sector size != 512

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add tests for remaining table types
	Add test of flags for remaining table types: aix, amiga, pc98, sun and
	loop.  Note that support of writing AIX tables is not yet implemented in
	parted and LOOP tables don't support partitions nor flags.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add test for dvh table flags
	DVH table reserves the first 4 MiB for the volume header information so
	move the created test partition to immediately after that.

	Exclude testing the boot flag as that can only be set on logical
	partitions and this test script only uses primary partitions so far.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add test for mac table flags
	MAC partition table reserves partition 1 for the partition map
	partition, so the created test partition will be number 2.  Adapt
	accordingly.

	Setting flags 'root' and 'swap' also sets the partition name to 'root'
	and 'swap' respectively, so no longer match the partition name in
	extract_flags().

	Don't test lvm and raid flags as they fail to be cleared with a single
	set off command.  See FIXME comment in the test for more details.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	libparted: Remove commented local variable from bsd_partition_set_flag()

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	libparted: Fix to report success when setting lvm flag on bsd table
	bsd_partition_set_flag() was falling through in the lvm flag case and
	returning failure.  Fix this by adding missing return 1 (success) like
	for the other flags.

	Found as a result of this bug reported by Timo Riikonen:
	https://bugzilla.gnome.org/show_bug.cgi?id=769831

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Add test for bsd table flags

	tests: t3310-flags.sh: Stop excluding certain flags from being tested
	Also grep for whole words, grep -w, to avoid flag 'boot' being matched
	as a substring of flag 'legacy_boot'.

2016-10-04  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3310-flags.sh: Query libparted for all flags to be tested
	Replace scanning the documentation for an incomplete list of flags with
	querying libparted for the complete list of supported flags via the
	added helper print-flags.

	Correct $ME -> $ME_ in the warning messages.  Improve the warning
	messages by including the table type and flag name not correctly set or
	cleared.

	Plus minor changes:
	(1) use slightly longer variable name primary_or_name;
	(2) use longer test partition name PTNNAME; and
	(3) stop shortening parted unit command to u.

2016-09-30  Petr Uzel  <petr.uzel@suse.cz>

	libparted: only IEC units are treated as exact
	If the user specifies start/end of the partition as a unit,
	whose size happens to be power of two, we treat that as
	exact address with exact placement.

	Recently, commit 01900e056ec25083 added an exception for
	percent units.

	This logic however can fail also for cylinders, e.g. on DASD FBA disks,
	which report CHS=(*, 128, 16) geometry, hence once cylinder is 1 MiB.
	With cylinders as units, exact placement is not what the user wants.

	Instead of adding cylinders to the blacklist, let's instead
	whitelist units which should trigger exact placement.

	* libparted/unit.c (is_power_of_2): Remove now unused function.
	(ped_unit_parse_custom): Specify which units trigger exact placement.
	* NEWS (Bug Fixes): Mention this.

2016-09-30  Gareth Randall  <gareth.randall@virgin.net>

	docs: Improve partition description in parted.texi

2016-06-23  Petr Uzel  <petr.uzel@suse.cz>

	Add support for NVMe devices
	Recognize NVMe Devices, so "parted -s /dev/nvme0n1" now prints
	"NVMe Device (nvme)" instead of "Model: Unknown (unknown)".

	In order for a device to be recognized as NVMe, it has to
	have a 'blkext' major number. But since this major can be
	used also by other device types, we also check the device
	path contains 'nvme' as a substring.

	* NEWS: Mention the change
	* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_NVME
	* libparted/arch/linux.c(BLKEXT_MAJOR): New define.
	* libparted/arch/linux.c(_is_blkext_major): New function.
	* libparted/arch/linux.c(_device_probe_type): Recognize NVMe devices.
	* libparted/arch/linux.c(linux_new): Handle NVMe devices.
	* parted/parted.c(do_print): Add "nvme" to list of transports.

2016-06-23  Wang Dong  <dongdwdw@linux.vnet.ibm.com>

	libparted/dasd: correct the offset where the first partition begins
	The start point of first partition must start at least from the third
	track of DASD, due to the existence of metadata in the first two track.
	The previous constraint just sets all the device to be partitioned.
	So when the start point of the first partition start before the third
	track, (For example if it starts from.0) parted will exit abruptly.
	And this kind of job must be done with constraint explicitly.

	Then the constraint is modified to exclude the first two tracks and
	to make the first partition start from the third track by default.

	Reviewed-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>

2016-05-06  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix probing AIX disks on other arches
	Not a likely scenario, but make sure the magic check works everywhere.

2016-04-15  Brian C. Lane  <bcl@redhat.com>

	libparted: Remove fdasd geometry code from alloc_metadata (#1244833)
	commit db20944f changed how the trailing_metadata_end is calculated in
	dasd_alloc_metadata, removing the need for setting up the anchor struct.
	But dasd_alloc_metadata can be called in various contexts, and the
	arch_specific->fd may or may not be valid during these calls. This can
	result in unpredictable crashes when it uses a stale fd and tries to run
	the file image code in fdasd_get_geometry instead of the device code.

	The solution is to just drop the unneeded code, and to remember that
	arch_specific->fd should only be used when ped_device_open has first
	been called.

	Resolves: rhbz#1244833

2016-04-14  Phillip Susi  <psusi@ubuntu.com>

	Add NEWS entry for fat resize fix

2016-04-14  Gustavo Zacarias  <gustavo@zacarias.com.ar>

	bug#17883: [PATCH] configure.ac: uclinux is also linux
	uclinux is used in the tuple for some noMMU linux builds like Blackfin
	FLAT output, so accept it as linux too.

2016-04-14  Curtis Gedak  <gedakc@gmail.com>

	lib-fs-resize: Fix recognition of FAT file system after resizing
	When resizing a FAT partition, an extra boot_sector memory allocation
	was causing the original boot_sector information to be lost.  The
	resulting FAT file system was still recognized by GNU/Linux, but not
	recognized by the proprietary Windows operating system.

	The problem with Windows FAT32 recognition was introduced with:

	  Fix filesystem detection on non 512 byte sectors
	  80678bdd957cf49a9ccfc8b88ba3fb8b4c63fc12

	Fix by removing the extra boot_sector memory allocation.

	Note that since parted-3.0 another code path to the extra memory
	allocation of fat_create(...) via ped_file_system_create(...) is
	inaccessible.  In an effort to maintain the ability to re-instate the
	code, add a new boot_sector memory allocation where it is needed in
	the alternate code path.

	GNU bug report logs - #22266
	[libparted] jump instruction and boot code is corrupted with random
	bytes after fat is resized
	http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22266

2016-04-12  Brian C. Lane  <bcl@redhat.com>

	parted: Display details of partition alignment failure (#726856)
	When alignment for a new partition fails it isn't always obvious why it
	failed. This adds printing the reason for the failure, in the form of:

	start % grain != offset

	This modifies align-check in interactive mode to print the alignment the
	error details if it isn't aligned. Script mode behavior is unchanged.

	Also cleanup pointer usage and handle asprintf failure by using a constant
	string in the error report - "unknown (malloc failure)".

2016-04-12  Brian C. Lane  <bcl@redhat.com>

	docs: Add list of filesystems for fs-type (#1311596)
	Add the most common filesystem types to the parted manpage.

	Resolves: rhbz#1311596

2016-04-12  Brian C. Lane  <bcl@redhat.com>

	Add libparted-fs-resize.pc
	Add a pkgconfig file for the filesystem resize library.

2016-04-10  Steven Lang  <Steven.Lang@hgst.com>

	Use disk geometry as basis for ext2 sector sizes.
	When creating the geom for probed ext2 based filesystems, the
	size was being reported in 512 byte sectors, regardless of what
	the actual sector size of the device is.

2016-04-10  Phillip Susi  <psusi@ubuntu.com>

	parted: fix the rescue command
	The rescue command often failed to locate a filesystem due to it
	leaving cylinder alignment on, which snapped the allowed bounds
	of the filesystem down to the next lower cylinder boundary,
	causing the detected filesystem to be rejected due to not fitting.

2016-03-18  David Cantrell  <dcantrell@redhat.com>

	Use BLKSSZGET to get device sector size in _device_probe_geometry()
	Seen on certain newer devices (such as >32G SDHC memory cards), the
	HDIO_GETGEO ioctl does not return useful information.  The libparted
	code records hardware and bios reported geometry information, but all of
	that is largely unusable these days.  The information is used in the
	PedConstraint code for aligning partitions.  The sector count is most
	useful.  Rather than only trying HDIO_GETGIO, first initialize the
	bios_geom fields to 0 and then use BLKSSZGET to capture the sector size.
	If that fails, try HDIO_GETGEO.  And if that fails, raise a warning and
	fall back on the library's default sector size macro.

	This problem showed up on Raspberry Pi devices where users were
	attempting to grow a partition to fill the SDHC card.  Using the
	optimal_aligned_constraint returned invalid geometry information
	(98703359 instead of 124735488 sectors).  The issue was reported here:

	    https://github.com/fedberry/fedberry/issues/8

	And to the pyparted project:

	    https://github.com/rhinstaller/pyparted/issues/25

	I've applied this patch locally to parted, rebuilt, and reinstalled it
	and it is working correctly for the problem SDHC cards.

2016-03-07  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3000-resize-fs.sh: Add very deep directory
	Create 500 deep directory tree, with longest name of 4000 characters, to
	the file system being resized to test the fix to prevent crash when
	resizing a FAT file system with such a long path.

2016-03-07  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	lib-fs-resize: Prevent crash resizing FAT with very deep directories
	Resizing a FAT file system crashes in libparted/fs/r/fat/count.c
	flag_traverse_dir() if the length of any path name in the file system
	overflows the 512 byte file_name local buffer.  Increase buffer to 4096,
	PATH_MAX on Linux.

	Reported in
	https://bugzilla.gnome.org/show_bug.cgi?id=762448

2016-02-09  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	fdasd.c: Safeguard against geometry misprobing
	Fixes an issue with parted print being run against a logical
	volume realised by extents on a physical volume residing on
	a DASD.
	We must make sure that geometry, device blocksize and DASD
	attributes are present before we start format verifications
	If any of it is missing this is not a DASD.

2015-10-29  Colin Watson  <cjwatson@ubuntu.com>

	parted: fix build error on s390
	The preceding dasd probing patches have introduced a compile error
	when building with blkid support. Fixed by reordering function
	definitions.

2015-10-27  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	dasd: enhance device probing
	Probe for all device/transport types as every block device
	could be a DASD on s390.

	Since the calculation of the minimum and optimum alignment
	is different between DASDs and common fixed block disks
	we need a means other than dev->type == PED_DEVICE_DASD.
	For that purpose a static function _ped_device_like_dasd()
	offering a DASD detection heuristic has been added to
	arch/linux.c.

	By always providing arch-specific alignment functions the
	need for DASD-specific code could be removed from device.c.

	Observe fdasd_get_geometry return code for proper error
	handling.

	Remove the obsolete API check as we no longer require the
	DASD-specific IOCTLs.

	Acked-by: Stefan Haberland <stefan.haberland@de.ibm.com>

2015-10-27  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	fdasd: geometry handling updated from upstream s390-tools
	Remove the necessity for DASD-specific ioctls for partition handling.
	This allows to correctly handle DASD-backed virtio block devices.

	Note that this is necessary because virtio is just the transport.
	A DASD, even if provided via virtio, still has it's unique
	characteristics, which means that only traditional DASD partition
	table formats can be used (no MBR, GPT, or similar).

	Use bzero for initialization to make sure all struct members are
	properly cleared. Also changed partition list handling code to be
	more similar to upstream s390-tools fdasd.

	Further, enhanced error handling capabilities by providing a
	return code by fdasd_get_geometry.

	Code is largely backported from s390-tools project.

	Acked-by: Stefan Haberland <stefan.haberland@de.ibm.com>

2015-10-09  Brian C. Lane  <bcl@redhat.com>

	tests: Use wait_for_dev_to_ functions
	Recent changes to udev have made some long-standing problems appear more
	frequently. udev executes various actions when changes are made to
	devices. Sometimes this can result in device nodes not appearing
	immediately. Other times it can result in EBUSY being returned. This
	patch only addresses devices that are slow to appear/disappear.

	It is best to use the wait_for_dev_to_appear_ and
	wait_for_dev_to_disappear_ functions than to test for existance. These
	will loop and wait for up to 2 seconds for it to appear.

	This also changes t9041 to fail if mkfs doesn't work since using skip
	here may hide cases when the device node doesn't appear.

2015-10-09  Brian C. Lane  <bcl@redhat.com>

	libparted: Use read only when probing devices on linux (#1245144)
	When a device is opened for RW closing it can trigger other actions,
	like udev scanning it for partition changes. Use read only for the
	init_* methods and RW for actual changes to the device.

	This adds _device_open which takes mode flags as an argument and turns
	linux_open into a wrapper for it with RW_MODE.

	_device_open_ro is added to open the device with RD_MODE and increment
	the open_counter. This is used in the init_* functions.

	_device_close is a wrapper around linux_close that decrements the
	open_counter and is used in the init_* functions.

	All of these changes are self-contained with no external API changes.
	The only visible change in behavior is that when a new PedDevice is
	created the device is opened in RO_MODE instead of RW_MODE.

	Resolves: rhbz#1245144

2015-08-07  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix misspelling in hfs exception string

2015-08-07  Brian C. Lane  <bcl@redhat.com>

	libparted: Stop converting . in sys path to /
	In _probe_sys_block it claimed that ! and . are replaced by / in sys
	paths, but according to the kernel code only ! is replaced (for cciss
	devices).

	This is now causing problems with libnvdimm devices, the details are
	here:

	https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next

2015-08-05  Amarnath Valluri  <amarnath.valluri@intel.com>

	libparted: Fix possible memory leaks
	* libparted/fs/r/fat/resize.c(fat_convert_directory): Possible leak
	  of sub_old_dir_trav or sub_new_dir_trav in error case.
	* libparted/fs/r/fat/resize.c(fat_construct_converted_tree ): Possible
	  leak of new_trav_info or old_trav_info in error case.

2015-08-03  Amarnath Valluri  <amarnath.valluri@intel.com>

	libparted: Fix memory leaks
	* libparted/fs/r/hfs/hfs.c(hfsplus_resize): Don't leak embedded_geom
	  when volume resizing failed.
	* libparted/fs/fat/fat.c(fat_create): Don't leake fs in-case of
	  fat_write_clustor failuer.
	* libparted/arch/linux.c(_kernel_get_partition_start_and_length): Don't leak
	  dev_fd file descriptor.

	UI: Avoid memory leaks.
	* parted/ui.c(command_line_get_sector): Don't leak input string.
	* parted/ui.c(command_line_prompt_words): Don't leak _def string in
	  opt script mode.

2015-07-13  Brian C. Lane  <bcl@redhat.com>

	parted: Fix crash with name command and no disklabel (#1226067)
	A typo (the last I think) from commit 7eac058 wasn't properly checking
	the result of ped_disk_new so it could crash if there was no disklabel
	on the device.

2015-07-13  Alexander Todorov  <atodorov@redhat.com>

	Fwd: [PATCH 2/2] add verbose test documentation

	merge HACKING and README-hacking

2015-07-02  Sergei Antonov  <saproj@gmail.com>

	mac: copy partition type and name correctly
	Use strncpy() instead of strcpy() to copy partition name and type.
	This prevents possible buffer overflow, because the source string
	occupies up to 33 bytes with a terminating null.

	Static analysis tools complain about the code as it is now:
	  Function: _generate_raw_part
	  Destination buffer too small
	  string_overflow: You might overrun the 32 byte destination string
	  part_map_entry->type by writing 33 bytes from mac_part_data->system_name
	  (Destination buffer too small, line 933)

	Cc: Sabas Rosales, Blanca E <blanca.e.sabas.rosales@intel.com>

2015-06-26  Brian C. Lane  <bcl@redhat.com>

	libparted: BLKPG_RESIZE_PARTITION uses bytes, not sectors (#1135493)
	This results in the extended partition vanishing after adding another
	partition.

	Resolves: rhbz#1135493

2015-06-26  Brian C. Lane  <bcl@redhat.com>

	tests: Make sure the extended partition length is correct (#1135493)
	parted tells the kernel the wrong length when reporting a resize of an
	extended partition. Make sure the length is 2 for 512b sectors and 1
	sector for larger.

2015-06-24  Brian C. Lane  <bcl@redhat.com>

	doc: Fix url for LWN article
	Removed an extra http:// from it.

2015-06-24  Alexander Todorov  <atodorov@redhat.com>

	tests: Fall back to C.UTF-8 if no en_US.utf8 available
	Not all distributions (Fedora) have C.UTF-8 so first try en_US.utf8 and fall
	back to it. This may still fail if neither exist.

	* tests/t0251-gpt-unicode.sh: Test for en_US and fall back to C.UTF-8

2015-06-22  Felix Janda  <felix.janda@posteo.de>

	libparted/fs/xfs/platform_defs.h: Include <fcntl.h> for loff_t
	This is needed for compilation with musl libc

	Suggested-by: Travis Tilley <ttilley@gmail.com>

2015-06-22  Felix Janda  <felix.janda@posteo.de>

	libparted/arch/linux.c: Compile without ENABLE_DEVICE_MAPPER

2015-03-23  Brian C. Lane  <bcl@redhat.com>

	Update manpage NAME so whatis will work

2015-02-06  Brian C. Lane  <bcl@redhat.com>

	libparted: device mapper uses 512b sectors
	device mapper doesn't use the device's sector size when creating a
	table. It always uses 512b units. This causes partitions to be created
	8x smaller than expected on devices with 4906b sectors.

2015-02-05  Brian C. Lane  <bcl@redhat.com>

	tests: Add a test for device-mapper partition sizes
	device-mapper uses 512b sector units, not device specific sector sizes.
	This test ensures that the correct partition size is created, no matter
	what the device's sector size is.

2015-01-13  Phillip Susi  <psusi@ubuntu.com>

	parted: don't crash in disk_set when disk label not found
	Due to a typeo in commit 7eac058 "parted: don't reload partition
	table on every command", the disk_set command would crash if
	a disk label was not found.

2014-11-10  Brian C. Lane  <bcl@redhat.com>

	tests: Change minimum size to 256MiB
	btrfs on ppc64 wants 136MiB so expand the minimum temp filesystem size
	for the t1700-probe-fs test.

2014-10-27  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3000-resize-fs.sh: Add requirement on mkfs.vfat
	Add test skipping requirement on mkfs.vfat for the FAT32 and FAT16 file
	system resizing tests.  This matches existing test skipping requirement
	on mkfs.hfs for the hfs+ file system.

	* tests/t3000-resize-fs.sh: Also correct skip_test_ to skip_.
	* tests/t-lib-helpers.sh: Also update message for requirement of hfs.

2014-10-27  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	tests: t3000-resize-fs.sh: Add FAT16 resizing test
	Add FAT16 resizing test so that we don't regress again.

2014-10-27  Mike Fleetwood  <mike.fleetwood@googlemail.com>

	lib-fs-resize: Prevent crash resizing FAT16 file systems
	Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c
	create_resize_context() because it was dereferencing NULL pointer
	fs_info->info_sector to copy the info_sector.

	Only FAT32 file systems have info_sector populated by fat_open() ->
	fat_info_sector_read().  FAT12 and FAT16 file systems don't have an
	info_sector so pointer fs_info->info_sector remains assigned NULL from
	fat_alloc().  When resizing a FAT file system create_resize_context()
	was always dereferencing fs_info->info_sector to memory copy the
	info_sector, hence it crashed for FAT12 and FAT16.

	Make create_resize_context() only copy the info_sector for FAT32 file
	systems.

	Reported by Christian Hesse in
	https://bugzilla.gnome.org/show_bug.cgi?id=735669

2014-09-20  Heiko Becker  <heirecka@exherbo.org>

	libparted: also link to UUID_LIBS
	* libparted/Makefile.am (libparted_la_LIBADD): Add UUID_LIBS.
	This fixes building parted with the gold linker.

2014-07-28  Phillip Susi  <psusi@ubuntu.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 3.2
	* NEWS: Record release date.

2014-07-27  Phillip Susi  <psusi@ubuntu.com>

	Bump library REVISION number for release

	tests: don't require en_US locale in t0251-gpt-unicode.sh
	Switch from en_US.UTF-8 to C.UTF-8 so the test does not fail on systems
	that do not have the en_US locale installed.

2014-06-23  Jim Meyering  <meyering@fb.com>

	maint: correct a POT-file updating rule
	* doc/C/Makefile.am (updatepo): If there is no po/$name.pot,
	create an empty one.  Reported by Philip Susi.

2014-06-15  Phillip Susi  <psusi@ubuntu.com>

	tests: fix t9020-alignment.sh
	This test was refering to print-alignment by absolute path, which
	broke building with a different object directory, causing
	make distcheck to fail.

	Document resizepart command

	parted: Add stub resize command for backward compatibility
	To make sure that older scripts trying to use the resize command do not
	accidentally run the new resizepart command by mistake, this undocumented
	stub command will throw an error if called.

	parted: Allow undocumented commands
	Have command_print_summary print nothing if the command summary is NULL.
	This allows for a command to be registered, but not documented in the
	output of help.

	parted: make _partition_warn_busy actually a warning instead of an error
	This function was throwing a PED_EXCEPTION_ERROR with only the
	PED_EXCEPTION_CANCEL option.  Converted to a PED_EXCEPTION_WARNING
	with the option to continue anyhow.

	libparted: Add support for partition resize
	When resizing a partition ( same partition number, same
	start sector, different end sector ), try to use the
	new BLKPG_RES_PARTITION request to update the kernel
	partition table with the new size.  Also handle resizing
	devmapper targets.

2014-06-15  Petr Uzel  <petr.uzel@suse.cz>

	tests: excersise resize command
	a lot of TODOs

	parted: add resizepart command
	Add resizepart command to resize ( change the end position ) an existing
	partition.  Note that it does nothing to a filesystem in the partition.

2014-06-15  Brian C. Lane  <bcl@redhat.com>

	Fix python test scripts for distribution
	make distcheck was failing because these scripts were not being
	included.

	Make them both executable and and add the path to the tests that use
	them. They also need to be included in the distribution so update
	Makefile.am

	* tests/Makefile.am: Add python test scripts
	* tests/gpt-header-move.py: rename to gpt-header-move and make it
	  executable
	* tests/msdos-overlap.py: rename to overlap.py
	* tests/t0282-gpt-move-backup.sh: add path to scripts and use new name
	* tests/t0283-overlap-partitions.sh: same

2014-06-15  Brian C. Lane  <bcl@redhat.com>

	tests: check name when duplicating
	Create a second partition with a name when supported by the disk label.
	Check to make sure that the duplicate has copied over the name. The goal
	with this was to try to catch the bug fixed by the previous commit but I
	was unable to make it fail. But this should improve our test coverage
	anyway.

	* tests/duplicate.c: Add a partition name test.

2014-06-15  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix part dupe with empty name
	It was setting the original translated_name to 0, not the new copy.

	* libparted/labels/gpt.c (gpt_partition_duplicate): fix empty name

2014-05-28  Jim Meyering  <meyering@fb.com>

	tests: use test's "=" operator, not "=="
	* tests/t1700-probe-fs.sh: Avoid "make syntax-check" error: s/==/=/

	tests: avoid false-positive failure due to symlink
	* tests/t6000-dm.sh (sanitize): Helper function.
	Before this change, this test would fail due to difference between
	absolute name and symlink-including names in "parted print" output

	maint: fix "make syntax-check" nits
	* doc/parted.texi: Update copyright year to 2014.
	* tests/gpt-header-move.py: Remove empty line at EOF.
	* tests/t0281-gpt-grow.sh: Correct reversed args to compare.
	* tests/t0282-gpt-move-backup.sh: Likewise.
	* libparted/labels/gpt.c (gpt_partition_set_name): Change "Can not"
	to "failed to" in diagnostic.
	(gpt_partition_get_name): Likewise.
	* tests/t1102-loop-label.sh (dev): Remove trailing space in
	here document that creates expected output, and strip that
	same trailing space from actual output.
	* libparted/fs/jfs/jfs.c: Do not cast alloca return value.
	* libparted/fs/reiserfs/reiserfs.c: Likewise.
	* libparted/fs/xfs/xfs.c: Likewise.

2014-05-27  Brian C. Lane  <bcl@redhat.com>

	tests: Use mkfs.xfs to create files (#1101112)
	On s390 there is a bug with mkfs.xfs and pre-existing files. Work around
	it by creating the file directly with mkfs.xfs. This also works on other
	arches.

	* tests/t1700-probe-fs.sh: Check for xfs and use direct file creation
	* tests/t4100-dvh-partition-limits.sh: Use mkfs.xfs -dfile
	* tests/t4100-msdos-partition-limits.sh: Use mkfs.xfs -dfile

2014-05-27  Brian C. Lane  <bcl@redhat.com>

	tests: Add ntfs vfat hfsplus to t1700 probe test
	Add some new filesystems to test. Adjust how mkfs.* tests, since some of
	them don't support -V, and add fsname so that the printed filesystem
	name doesn't have to match the type.

	* tests/t1700-probe-fs.sh: Add new filesystems to test

2014-05-25  Jim Meyering  <meyering@fb.com>

	maint: run "make update-copyright"

	maint: remove doubled word: s/on on/on/
	* NEWS: Remove doubled-word detected by "make syntax-check".

	gnulib: update submodule to latest
	* gnulib: Update module to latest.
	* bootstrap: Update from gnulib.

2014-05-25  Sergei Antonov  <saproj@gmail.com>

	libparted: mac: support sector size > 512 correctly
	This patch fixes several problems found when trying to do Apple
	Partition Map on a 4K-sector iPod. The problems happened because of
	unneeded conversion between physical sectors and 512-byte units.
	For devices with sector 512 the conversion did no harm, for others it did.

	List of problems (all are gone with the patch):

	* Partition in OS X, connect to Linux, run "parted <dev> print".
	  "Error: Can't have a partition outside the disk!" is shown.
	  Every partition is displayed 8 times (4k/512) bigger its real size.

	* Exec "mktable mac", connect to OS X.
	  The drive's partitioning scheme is not recognized.

	* mkpart creates partitions 8 times (4k/512) smaller than requested.

2014-05-22  Phillip Susi  <psusi@ubuntu.com>

	tests: test loop labels
	Verify previous fixes to loop labels.

	libparted: don't trash filesystem when writing loop label
	If you deleted the fake partition on a loop label, loop_write() would write
	the loop signature to the device, zeroing out all other bytes in the first
	sector.  When the disk contained an ext[234] filesystem and was using 2k
	sectors, this would trash the super block residing in the 1-2kb part of the
	sector causing the disk to become unrecognized.  Instead, read the existing
	sector and only modify the first few bytes that contain the loop label.

	libparted: give correct partition device name on loop labels
	ped_partition_get_path() was returning "/dev/foo1" instead of
	"/dev/foo" on loop labels.  This caused gparted to run tools like mkfs on
	a device node that did not actually exist.

	partprobe: do not skip loop labels
	Partprobe was not syncing loop labels.  This resulted it failing to remove
	existing partitions when switching to a loop label.

	libparted: don't create partition on loop label
	The loop label represents an unpartitioned disk, but creates
	a dummy partition to represent the whole disk.  This dummy partition
	was actually being loaded into the kernel.  Don't do that.

2014-05-22  Phillip Susi  <psusi@ubuntu.com>

	libparted: fix loop labels to not vanish
	The loop label type was using the existence of a partition as a proxy for
	a filesystem being detected, and loop_write() would try to write a loop
	signature if there was no filesystem, and erase it if there was.  Because
	of this, creating a partition without writing a filesystem to it caused
	loop_write to erase the loop label.

	There seems to be no reason to bother erasing the loop label if it is still
	present along with a filesystem signature, so don't bother with this, and
	actually check to see if a filesystem is detected in the partition rather
	than using the existence of a partition to decide if writing the loop
	signature is needed.  Finally, since there is no way to preserve the
	existence of a partition with no filesystem in it, have loop_read() always
	create a partition, even if no filesystem is detected.

2014-05-22  Phillip Susi  <psusi@ubuntu.com>

	libparted: remove all old partitions, even if new label allows less
	We were limiting partition sync operations to the lesser number allowed
	by the device, or the label.  This meant that when creating a new label
	over an old label that had more partitions than the new one allows, the
	higher partitions would not be removed.  Use the greater of the two values
	for the remove pass, and the lesser for the add.

	libparted: remove old partitions *first* before adding new ones
	"libparted: avoid disturbing partitions" put the remove of the old
	partition in second pass.  If you simultaneously removed partitions 1
	and 2, and created a new partition #1 that overlapped the previous second
	partition, the sync would fail because it would try to create the new,
	larger partition #1 before removing the old partition #2.

	libparted: don't detect fat and ntfs boot sectors as dos MBR
	fat and ntfs boot sectors are very similar to an MBR so if you had one of
	these filesystems on an unpartitioned disk, parted detected them as a dos
	partition table.  Have the dos label code call the fat and ntfs filesystem
	probes and if they recognize the sector ( their tests are more stringent )
	then don't claim it as a dos label.

2014-05-22  Phillip Susi  <psusi@ubuntu.com>

	parted: don't reload partition table on every command
	gpt was using a static local variable to suppress repeatedly reporting
	an error if you chose to ignore it.  This is incorrect as the variable is
	global to all disks, and ignoring the error on one should not suppress its
	reporting on another.  Moving the flag to the PedDisk object made it
	effectively useless because parted was destroying the PedDisk and reloading
	the partition table on every command.

	Parted has been reworked to cache the PedDisk once loaded, and only discard
	it when changing disks, or creating a new disklabel.

2014-05-22  Phillip Susi  <psusi@ubuntu.com>

	libparted: fix fat resize
	The changes to fix filesystem detection on non 512 byte sector sizes broke
	fat filesystem resizing.

2014-05-19  Brian C. Lane  <bcl@redhat.com>

	GPT strings are UCS-2LE not UTF-16
	There was a problem using UTF-16, it was writing the Byte Order Mark
	before the string which caused problems with older versions of parted
	reading the partition name. The test was skipping these 2 bytes when
	checking the written string.

	* libparted/labels/gpt.c: Switch to UCS-2LE for GPT Partition names
	* tests/t0251-gpt-unicode.sh: Update the test

2014-04-29  Brian C. Lane  <bcl@redhat.com>

	Update NEWS with new DASD features.
	* NEWS: New DASD support

2014-04-29  Petr Uzel  <petr.uzel@suse.cz>

	dasd: avoid usage of uninitialized data
	In ped_partition_new(), disk_specific data of PedPartition
	structure is allocated (via dasd_partition_new()). This
	data is later used uninitialized in dasd_partition_set_system().

	* libparted/labels/dasd.c (dasd_partition_new):
	Zero out allocated disk_specific data.

2014-04-29  Nageswara R Sastry  <rnsastry@linux.vnet.ibm.com>

	libparted: mklabel to support EDEV DASD
	Fixed Block Access (FBA) DASDs are mainframe-specific disk devices
	which are layed out as a sequence of 512-byte sectors. This patch adds
	support for mklabel to properly handle FBA devices.

	libparted: Avoid dasd as default disk type while probe
	This patch avoids setting 'dasd' as a default disk type for
	'disk image file' at the time of probe.

	libparted: mklabel to support EAV DASD
	Extended Address Volume (EAV) DASDs are ECKD DASDs with more than
	65520 cylinders. This patch adds support for mklabel to properly
	handle unformatted EAV DASDs.

2014-04-29  Nageswara R Sastry  <rnsastry@linux.vnet.ibm.com>

	libparted: add support for EAV DASD partitions
	Extended Address Volume (EAV) DASDs are ECKD DASDs with more than
	65520 cylinders. This patch adds support for recognizing and
	modifying partitions on EAV DASDs to Parted. The changes are
	based on the EAV support added to version 1.8.1 [1] of the
	s390-tools package.

	[1] http://www.ibm.com/developerworks/linux/linux390/s390-tools-1.8.1.html

2014-04-29  Nageswara R Sastry  <rnsastry@linux.vnet.ibm.com>

	libparted: add support for implicit FBA DASD partitions
	Fixed Block Access (FBA) DASDs are mainframe-specific disk devices
	which are layed out as a sequence of 512-byte sectors. In contrast
	to ECKD DASDs, these disks do not require formatting and resemble
	the LBA layout of non-mainframe disks. Despite this resemblance,
	the Linux kernel applies special handling during partition detection
	for FBA DASDs, resulting in a single, immutable partition being
	reported.

	While actual FBA DASD hardware is no longer available, the z/VM
	hypervisor can simulate FBA DASD disks, backed by either ECKD or
	SCSI devices.

	This patch adds support for recognizing FBA DASD partitions
	to parted.

2014-04-18  Phillip Susi  <psusi@ubuntu.com>

	Fix filesystem detection on non 512 byte sectors
	Enable probing for filesystems with non 512 byte sectors, and fix up each
	filesystem to correctly handle that.  Remove unused field from the fs type
	structure listing acceptable sector sizes.

	tests: fix t2310-dos-extended-2-sector-min-offset.sh
	This test was ignoring the requested sector size and always using
	512 bytes per sector.  Fix it to use the requested sector size.

	tests: fix t1700
	bb181a7e: "tests: Use force for xfs in t1700 and a larger file" caused
	the previous filesystem signatures to be left in the image file
	causing mkfs.nilfs2 to complain that there is already an xfs filesystem
	there, and hang the test suite waiting for an answer to proceed or not.
	Remove the file between filesystems so it is recreated cleanly again.

	libparted: remove last_usable_if_grown
	Commit 3398e82a: "libparted: Use common function to calculate PTE sectors"
	removed usage of the last_usable_if_grown variable, resulting in an error
	because it is now unused but still defined.

2014-04-17  Brian C. Lane  <bcl@redhat.com>

	tests: t1700 change count to seek
	Fix a typo when changing to sparse images.

	* tests/t1700-probe-fs.sh: count should be seek.

2014-04-16  Brian C. Lane  <bcl@redhat.com>

	tests: Use force for xfs in t1700 and a larger file
	Also use sparse files that are (with 512B blocks) 128M so that they are
	large enough for all the filesystems.

	* tests/t1700-probe-fs.sh: Make changes.

2014-04-10  Ming Liu  <ming.liu@windriver.com>

	libparted: fix several integer overflows with dvh labels
	Integer overflows was found in libparted/labels/dvh.c, while attemptting
	assign unsigned int values to int types in some places.

	Defined by unsigned int instead.

	* libparted/labels/dvh.h: Change int to unsigned int

2014-04-10  Brian C. Lane  <bcl@redhat.com>

	testing: Use little-endian packing in gpt tests
	Fix gpt-header-move.py and gpt-header-munge to use little endian when
	packing and unpacking. This allows us to turn the t0210 and t0211 tests
	back on for big-endian systems.

	* tests/gpt-header-move.py: Use little endian for pack/unpack
	* tests/gpt-header-munge: Same
	* tests/t-lib-helpers.sh: Add requires_64bit_ that checks for x86_64 and ppc64
	* tests/t0210-gpt-resized-partition-entry-array.sh: Remove x86_64 test
	* tests/t0211-gpt-rewrite-header.sh: Same

2014-04-08  Brian C. Lane  <bcl@redhat.com>

	tests: Use msdos-overlap to setup t0283
	xxd isn't present in minimal build systems, as it is part of vim. Change
	to using a simple python script to mangle the msdos disklabel for the
	test.

	* tests/msdos-overlap.py: New file
	* tests/t0283-overlap-partitions.sh: Use msdos-overlap.py

2014-04-08  Brian C. Lane  <bcl@redhat.com>

	tests: Add emit_superuser_warning for gpt tests
	When parted runs without script mode it will print a warning about not
	being superuser. Add the library call to add this to expected output
	from the tests.

	* tests/t0281-gpt-grow.sh: Add emit_superuser_warning
	* tests/t0282-gpt-move-backup.sh: Add emit_superuser_warning
	* tests/t0283-overlap-partitions.sh: Add emit_superuser_warning

2014-04-08  Brian C. Lane  <bcl@redhat.com>

	libparted: Use common function to calculate PTE sectors
	Use _ptes_sectors in _parse_header's calculation to determine if the
	disk has been grown.

	* libparted/labels/gpt.c (_parse_header): use _ptes_sectors

2014-04-08  Brian C. Lane  <bcl@redhat.com>

	libparted: Fix check for backup header location
	Add a couple of helper functions for calculating the partition table
	entry size (in sectors) and for guessing the end of the disk based on
	the LastUsableLBA and the Partition Table Entry size.

	The backup header should be either at the end of the disk, or at what
	the primary header thinks is the end of the disk. Prompt to fix the
	backup header if it is located any other place.

	* libparted/labels/gpt.c (_ptes_sectors): New function
	  (_hdr_disk_end): New function
	  (gpt_read): Use new function to test for pri's idea of end of disk

2014-03-05  Gustavo Zacarias  <gustavo@zacarias.com.ar>

	ui: switch to new-style readline typedef
	The CPPFunction typedef (among others) have been deprecated in favour of
	specific prototyped typedefs since readline 4.2 (circa 2001).
	It's been working since because compatibility typedefs have been in
	place until they where removed in the recent readline 6.3 release.
	Switch to the new style to avoid build breakage.

2014-03-05  Phillip Susi  <psusi@ubuntu.com>

	libparted: sync partitions > 16
	The linux partition sync code was hard coded to only flush
	the first 16 partitions.

2014-03-02  Phillip Susi  <psusi@ubuntu.com>

	libparted: don't require a system id string
	Historically the system ID field of a fat boot sector contains a
	string identifying the OS that formatted it.  It appears that some
	recent versions of Windows have stopped bothering with this.  Stop
	requiring this string to recognize fat as valid.

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	tests: Restrict gpt-header-munge to little-endian systems
	gpt-header-munge uses perl to manipulate the gpt header for the test. It
	only works on 64 bit little-endian systems so restrict it to x86_64
	only.

	* tests/t0210-gpt-resized-partition-entry-array.sh: Skip if not x86_64
	* tests/t0211-gpt-rewrite-header.sh: Skip if not x86_64

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	tests: Add btrfs and xfs to the fs probe test
	* tests/tests/t1700-probe-fs.sh: Add btrfs and xfs

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	libparted: Recognize btrfs filesystem
	Add support for showing 'btrfs' in  the 'file system' column. Also
	allows the used to enter btrfs as the fs type. It doesn't really do
	anything -- just sets the partition type to linux.

	* NEWS (Changes in behavior): Mention it.
	* doc/parted.texti: Document btrfs fs.
	* (libparted/fs/Makefile.am): Add btrfs.c
	* (libparted/fs/btrfs/btrfs.c): Probe for btrfs
	* (libparted/libparted.c): Register btrfs

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	libparted: Add UEFI System Partition flag.
	This adds support for the ESP partition type on MS-DOS. It also aliases
	it to the boot flag on GPT which sets the ESP GUID type.

	* NEWS (New Features): Mention it.
	* doc/C/parted.8: Document esp flag.
	* doc/parted.texti: Document esp flag.
	* include/parted/disk.in.h (_PedPartitionFlag): Add PED_PARTITION_ESP flag
	* libparted/disk.c (ped_partition_flag_get_name): Add esp flag
	* libparted/labels/dos.c (DosPartitionData): Likewise
	(raw_part_parse): Likewise
	(msdos_partition_new): Likewise
	(msdos_partition_duplicate): Likewise
	(msdos_partition_set_system): Likewise
	(clear_flags): Likewise
	(msdos_partition_set_flag): Likewise
	(msdos_partition_get_flag): Likewise
	(msdos_partition_is_flag_available): Likewise
	* libparted/labels/gpt.c (gpt_partition_set_flag): Add PED_PARTITION_ESP
	(gpt_partition_get_flag): Likewise
	(gpt_partition_is_flag_available): Likewise

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	libparted: Add Intel Rapid Start Technology partition flag.
	This adds support for the irst partition type flag. Sets the type to
	0x84 on MS-DOS and D3BFE2DE-3DAF-11DF-BA-40-E3A556D89593 on GPT.

	* NEWS (New Features): Mention it.
	* doc/C/parted.8: Document irst flag.
	* doc/parted.texti: Document irst flag.
	* include/parted/disk.in.h (_PedPartitionFlag): Add PED_PARTITION_IRST flag
	* libparted/disk.c (ped_partition_flag_get_name): Add irst flag
	* libparted/labels/dos.c (DosPartitionData): Likewise
	(raw_part_parse): Likewise
	(msdos_partition_new): Likewise
	(msdos_partition_duplicate): Likewise
	(msdos_partition_set_system): Likewise
	(clear_flags): Likewise
	(msdos_partition_set_flag): Likewise
	(msdos_partition_get_flag): Likewise
	(msdos_partition_is_flag_available): Likewise
	* libparted/labels/gpt.c: Add PARTITION_IRST_GUID
	(GPTPartitionData): Add irst flag
	(_parse_part_entry): Likewise
	(gpt_partition_new): Likewise
	(gpt_partition_set_system): Likewise
	(gpt_partition_set_flag): Likewise
	(gpt_partition_get_flag): Likewise
	(gpt_partition_is_flag_available): Likewise

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	tests: rewrite t6001 to use /dev/mapper
	This test began failing because using a private copy of /dev/mapper
	confuses the system. This fixes that and generally cleans up the test.

	tests/t6001.sh: update to use /dev/mapper directly

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	libparted: don't canonicalize /dev/md/ paths (#872361)
	This is the same issue we have with /dev/mapper/ paths that was fixed in
	commit c1eb485b9fd8919e18f192d678bc52b0488e6ee0. When libparted
	is used to setup the device the symlink should be used to reference it,
	not the backing device name which could change.

	* libparted/device.c (ped_device_get): Don't canonicalize names
	  that start with "/dev/md/".

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	tests: Make sure dm UUIDs are not erased
	* tests/t6005-dm-uuid.sh: Make sure dm UUIDs are not erased

	libparted: preserve the uuid on dm partitions (#832145)
	* libparted/arch/linux.c (_dm_add_partition): Set the uuid if there was
	  one.

2014-03-02  Brian C. Lane  <bcl@redhat.com>

	libparted: use dm_udev_wait (#698121)
	This is based on Peter Rajnoha's patch to use dm_udev_wait to
	synchronize with udev.

	This requires libdevmapper v1.02.39 and higher.

	mailing list thread:
	https://lists.gnu.org/archive/html/bug-parted/2010-09/msg00007.html

	* libparted/arch/linux.c (_dm_task_run_wait): New function
	(_is_dm_major): Add cookie and change call to _dm_task_run_wait
	(_is_dmraid_device): Same
	(_dm_is_part): Same
	(dm_canonical_path): Same
	(_dm_remove_partition): Same
	(_dm_get_partition_start_and_length): Same
	(_dm_add_partition): Same
	(linux_new): Enable udev sync support

2014-02-25  Brian C. Lane  <bcl@redhat.com>

	tests: test creating 20 device-mapper partitions (#803108)
	* tests/t6004-dm-many-partitions.sh: Make sure > 17 partitions appear in
	  device mapper.

	libparted: copy pmbr_boot when duplicating GPT disk
	* libparted/labels/gpt.c (gpt_duplicate): copy pmbr_boot flag

2014-02-24  Phillip Susi  <psusi@ubuntu.com>

	Fix help text for disk_{set,toggle}
	Fix the help text to show *disk* flags instead of partition flags.

2013-12-23  Phillip Susi  <psusi@ubuntu.com>

	bug#15591: [PATCH] libparted: handle i18n gpt partition names correctly
	gpt.c was simply truncating the UTF-16 characters stored
	in the partition name field to 8 bits.  This corrupted non
	ascii characters which later resulted in parted crashing in
	strlist.c trying to convert the now invalid multi byte
	characters to wchar.

	gpt.c will now properly convert the UTF-16 to the current
	locale encoding.

2013-11-23  Phillip Susi  <psusi@ubuntu.com>

	libparted: make sure not to treat percentages as exact
	If 1% of the drive size worked out ot be an even power of
	two, it would trigger the exact placement.  Add an exception
	for the percent units.

2013-11-23  Daniel Battaiola Kreling  <dbkreling@br.ibm.com>

	GPT: add support for PReP GUID
	PReP (PowerPC Reference Platform) boot partition is the first partition used in
	PowerPC platform for containing the bootable kernel or bootloader. The firmware
	searches for this partition and jumps to it for booting. So far no GUID was
	specified for this partition type and hence booting from GPT disk was not
	supported on this platform. A new GUID 9e1a2d38-c612-4316-aa26-8b49521e5a8b for
	PReP partition is proposed to be included in GPT.

2013-11-23  Phillip Susi  <psusi@ubuntu.com>

	Fix test compilation
	The tests were not being linked against libpthread but were using
	it, and recent versions of gcc refuse to implicitly pull it in.

	libparted: avoid disturbing partitions
	The partition sync logic was first removing all
	partitions, then trying to re-add them.  This resulted in many
	udev events triggering annoying behavior like auto mounting.
	Refactor the code to avoid removing and re-adding unmodified
	partitions.

	Revert "linux-commit: do not unnecessarily open partition device nodes"
	This reverts commit 2a6936fab4d4499a4b812dd330d3db50549029e0.  The commit
	disabled flushing the block buffer caches on the partition nodes to ensure
	cache consistency on 2.6 kernels, supposedly because this was no longer
	required.  It appears this was incorrect, and the caches DO still need
	flushed, otherwise a new fs written to the partition device does not show
	up in the disk device cache, causing parted to still identify the old fs.

	libparted: allow some common errors to be ignored
	Partitions that overlap or extend beyond the end of the disk are common
	errors that usually result in people having to use other tools to correct
	because parted refuses to operate when it sees them.  Change these errors
	to allow you to ignore them and use parted to correct the problem.

2013-11-23  Phillip Susi  <psusi@ubuntu.com>

	libparted: fix gpt end of disk handling
	There are two checks for problems with the end of disk.  The first checks
	to make sure that the backup gpt is actually at the end of the disk as it
	should be.  The second checks to see that the gpt's idea of where the disk
	ends is correct.  The handling of the backup gpt location was wrong because
	if you chose not to fix the error, then as soon as you made any changes the
	backup would be written to the end of the disk anyhow, only the previous
	backup would not be zeroed.

	This patch fixes the write path to put the backup gpt where the gpt says
	it goes, not where we think the disk ends.  This allows you to choose
	not to fix the problems, and the backup gpt will be written to the same
	place it was before, not the new end of disk.

2013-11-23  Phillip Susi  <psusi@ubuntu.com>

	libparted: handle logical partitions starting immediately after the EBR
	_blkpg_add_partition() set the length of the extended partition
	to 2 sectors to allow LILO to be installed there, beacuse the
	linux kernel does this.  If a logical partition used that second
	sector, adding it would fail beacuse of the overlap.  Now
	_blkpg_add_partition() will limit the length to only the first
	sector if the second is used by a logical partition.

	Previously parted did create the partition table, and after a
	reboot, the kernel would recognize the table, and happily create
	the extended partition as 2 sectors long, thus overlapping the
	logical partition, but when parted tried to recreate the same
	table with BLKPG, the kernel rightly rejected it.

2013-11-23  Phillip Susi  <psusi@ubuntu.com>

	gpt: Revert small device commits
	The following commit broke the position of the LastUsableLBA:

	48f236f9: gpt: permit "mklabel gpt" on a 67-sector device

	It introduced an off by one error, leaving LastUsableLBA pointing to
	the first sector of the backup partition table instead.

	This effectively reverts that commit, as well as adjusting the subsequent
	commits to instead use 68 sectors as the minimum length.  I believe
	this is the minimum legal size as at 67 sectors, there is no valid
	value for FirstUsableLBA and LastUsableLBA.

2013-11-23  Phillip Susi  <psusi@ubuntu.com>

	tests: t6003-dm-hide: don't hang on exception
	If the parted -l found any exceptions, it would print the prompt, which was
	redirected to the log, then hang waiting for input, which never came.  Use
	script mode to disable the prompts.

	parted: fix EOF and ctrl-c handling
	feof() seems to not detect EOF after readline() hits it, so parted went
	into an infinite loop prompting for input on EOF.  Change test to use the
	got_ctrl_c variable instead, which is set when readline hits EOF and
	returns NULL.  This also makes parted properly exit on ctrl-c.

2013-10-09  Jim Meyering  <meyering@fb.com>

	bootstrap: update to latest from gnulib

2013-10-09  Jonathan Liu  <net147@gmail.com>

	dos: improve MBR signature generation
	Using tv_usec in struct timeval from gettimeofday() doesn't provide
	enough precision to fill an unsigned 32-bit integer and isn't really
	random. It it always less than one million when using the GNU C library
	while an unsigned 32-bit integer ranges between 0 and 4294967295.

	In FAT filesystem creation, parted already uses a better random
	generator, so move that code into a common function and use it
	for MS-DOS MBR signature generation.

	* libparted/fs/r/fat/fat.c (_gen_new_serial_number): Remove.
	(fat_create): Use generate_random_uint32 instead of
	_gen_new_serial_number.
	* libparted/labels/dos.c (generate_random_id): Remove.
	(msdos_write): Use generate_random_uint32 instead of
	generate_random_id.
	* libparted/labels/misc.h (generate_random_uint32): New function.
	Created from _gen_new_serial_number in libparted/fs/r/fat/fat.c with
	additional check to avoid returning zero, which may be interpreted
	as no FAT serial number or no MBR signature.

2013-01-06  Jim Meyering  <jim@meyering.net>

	maint: avoid new warning/error with gcc-4.8.0 20130105
	* configure.ac (WERROR_CFLAGS): Disable -Wsuggest-attribute=format.
	It was suggesting to apply the gnu_printf attribute to vsnprintf.

	maint: update all copyright year number ranges
	Run "make update-copyright".

	build: update gnulib submodule to latest

2013-01-02  Jim Meyering  <jim@meyering.net>

	doc: 1MiB-alignment is not enough for cheap flash drives
	* doc/parted.texi: Add an example that aligns to 4GiB, and
	reference Arnd Bergman's LWN article.

2012-10-29  Jim Meyering  <jim@meyering.net>

	tests: make t6003-dm-hide work reliably on F17
	* tests/t6003-dm-hide.sh: Adjust to work reliably on Fedora 17.

2012-10-29  Phillip Susi  <psusi@ubuntu.com>

	libparted: don't probe every dm device in probe_all
	We were probing every dm device.  Only probe dmraid whole disk
	(non-partition) devices instead.  This removes the clutter of
	LVM logical volumes, and dmraid partitions from the list, which
	usually do not make sense to partition.

	* NEWS (Changes in behavior): Mention it.
	* libparted/arch/linux.c (_is_dmraid_device): New function.
	(_dm_is_part): Likewise.
	(_probe_dm_devices): Use the latter.
	* tests/t6003-dm-hide.sh: New test.
	* tests/Makefile.am (TESTS): Add it.

2012-10-29  Phillip Susi  <psusi@ubuntu.com>

	libparted: remove extraneous blkpg add partition ped exception
	_blkpg_add_partition was throwing an exception if it failed to add the
	new partition, in addition to _disk_sync_part_table throwing one, and
	then bailing out.  Instead of bailing out, just log the error for
	reporting later and continue.

	libparted: refactor device-mapper partition sync code
	The device-mapper partition sync code was still using the remove all
	partitions, then add new partitions method.  Refactor to use the same
	algorithm as regular disks: try to remove all, and ignore any that could
	not be removed but have not changed.

2012-10-23  Eric Blake  <eblake@redhat.com>

	build: default to --enable-gcc-warnings in a git tree
	Anyone building from cloned sources can be assumed to have a new
	enough environment, such that enabling gcc warnings by default will
	be useful.  Tarballs still default to no warnings, and the default
	can still be overridden with --disable-gcc-warnings.
	* configure.ac (gl_gcc_warnings): Set default based on environment.

2012-10-17  Brian C. Lane  <bcl@redhat.com>

	tests: cleanup losetup usage
	The unsafe_losetup_ function was failing because losetup didn't
	recognize that the 'private' /dev/loopX devices were the same as
	/dev/loopX, it would fail even if one was in use. Switch to using
	losetup --show which is a cleaner solution.
	Also use sparse file for loop_setup to save space.
	* tests/t-lvm.sh (unsafe_losetup_): Remove function.
	(loop_setup_): Use losetup's --show option instead.
	Use dd with /dev/null, not /dev/zero.
	* tests/t6001-psep.sh: Use loop_setup_ rather than losetup --show.

2012-10-17  Jim Meyering  <jim@meyering.net>

	maint: regenerate .po, .pot files

	maint: use $(AM_V_GEN) to cut down on build noise
	* doc/Makefile.am: Prefix each rule with $(AM_V_GEN).
	* doc/po4a.mk (dist_man_MANS): Likewise.

2012-10-16  Petr Uzel  <petr.uzel@suse.cz>

	partprobe: remove partitions when there is no partition table
	When partprobe detects no partition table on a device, it should
	tell the kernel to drop partitions on that device, but it did not.
	* parted/partprobe.c (process_dev): When ped_disk_probe fails,
	create a dummy (empty) partition table and use that.
	* NEWS (Bug fixes): Mention it.
	Addresses: https://bugzilla.novell.com/783419

2012-10-15  Petr Uzel  <petr.uzel@suse.cz>

	doc: update partprobe manpage
	* doc/C/partprobe.8: Add long options, REPORTING BUGS section
	and adjust DESCRIPTION section because it wasn't quite correct.

	partprobe: remove --no-update long option
	It was deprecated and scheduled for removal in 2009.
	* partprobe/partprobe.c (long_options): Remove "no-update" entry.

	build: .gitignore: ignore tests/fs-resize

2012-10-09  Jim Meyering  <meyering@redhat.com>

	build: do not rely on automake's AM_TESTS_ENVIRONMENT
	* tests/Makefile.am (TESTS_ENVIRONMENT): Rename from
	AM_TESTS_ENVIRONMENT, since it is not honored in automake-1.11.3
	after all.  This reverts commit v3.1-14-g2bd66d7.  For now, I'll
	leave the following commit that made bootstrap.conf require 1.11.2.
	Prompted by a report of test failure from Phillip Susi.

2012-10-09  Gilles Espinasse  <g.esp@free.fr>

	tests: t8001: do not rely on "modprobe loop"
	Remove 'rmmod loop' and 'modprobe loop max_part=7' commands.
	The latter command may fail after the first command has run,
	leaving the machine with no loop support.

	This happens on my chroot, because:
	- rmmod does not depend on the availability of the loop module,
	- modprobe fails, since the kernel compiled inside the chroot
	  is different from the running kernel.

	Instead, rely on t-lvm loop_setup_ to load the loop module, if required.

2012-10-09  Jim Meyering  <meyering@redhat.com>

	tests: improve test for partitionable loop devices
	* tests/init.cfg (require_partitionable_loop_device_): Skip
	when cat fails.

2012-10-06  Jim Meyering  <meyering@redhat.com>

	maint: fix an error in the preceding commit log
	Stefano Lattarini noticed an error in the log for
	commit v3.1-32-g478e472.  Arrange for that error
	to be fixed in the generated ChangeLog file.
	* build-aux/git-log-fix: New file.
	* Makefile.am (gen-ChangeLog): Adjust rule to use it.

	tests: stop using private "dev" directory for losetup
	Something about Fedora 17's losetup changed so that using a private
	dev directory no longer worked.  Now, simply use /dev/ directly.
	* tests/t-lvm.sh: Don't use $G_dev_.  Not needed, and actually
	caused the t6000-dm root-only test to fail on Fedora 17.
	Also, redirect less to /dev/null: that helps diagnose failure.

2012-10-03  Bob Beers  <bob.beers.gmail.com>  (tiny change)

	doc: libparted/disk.c: correct doxygen comment typo
	* libparted/disk.c: s/PedPartition/PedDisk/

2012-09-29  Jim Meyering  <meyering@redhat.com>

	tests: clean up tests
	Use warn_ and $ME_ in place of warn and $ME; remove definitions of
	the latter two.  Remove unused code.
	* tests/lvm-utils.sh: Remove file.  All functions were either unused
	or duplicated/better in t-lvm.sh.
	* tests/Makefile.am (EXTRA_DIST): Remove it.
	* tests/t-local.sh (scsi_debug_setup_): Use echo 1>&2, not warn_, to
	emit to log file only, not console.  The diagnostic it emitted (in
	verbose mode) was more "informational" than a warning.
	* tests/t9030-align-check.sh: Use warn_, not warn.
	* tests/t-lvm.sh: Likewise, and use fail_, not error (undefined!).
	* tests/t-lib-helpers.sh (device_mapper_required_): Use t-lvm.sh
	and an explicit lvm_init_root_dir_ in place of lvm-utils.sh.

2012-09-29  Roderick W. Smith  <rodsmith@rodsbooks.com>

	add support for a new Linux-specific GPT partition type code
	* NEWS: Describe the new Linux-specific partition type code
	and the new msftres flag that can be used to override this type
	code, should it be necessary.
	* doc/parted.texi: Describe of the new msftres flag.
	* include/parted/disk.in.h [_PedPartitionFlag]: Add
	PED_PARTITION_MSFT_DATA.
	* libparted/disk.c: Add check for PED_PARTITION_MSFT_DATA, with
	return of "msftdata", to ped_partition_flag_get_name()
	* libparted/labels/gpt.c (PARTITION_LINUX_DATA_GUID): Define.
	[_GPTPartitionData]: New member, "int msftdata".
	(_parse_part_entry): Set the msftdata flag if and only if the
	PARTITION_BASIC_DATA_GUID type code is in use;
	(gpt_partition_new): Use the PARTITION_LINUX_DATA_GUID
	type as the default type code
	(gpt_partition_set_system): Set the PARTITION_BASIC_DATA_GUID type
	code on partitions on which the msftdata flag is set and set
	PARTITION_LINUX_DATA_GUID as the type by default.
	Clear the msftdata flag in most tests in gpt_partition_set_flag()
	(gpt_partition_set_flag): Add test for PED_PARTITION_MSFT_DATA, which
	sets msftdata and other flags appropriately
	(gpt_partition_get_flag): Add test for the PED_PARTITION_MSFT_DATA
	item that returns the status of the msftdata flag
	(gpt_partition_is_flag_available): Add test for
	PED_PARTITION_MSFT_DATA item to
	* tests/t0220-gpt-msftres.sh: Accommodate the fact that now,
	partition table listings include "msftdata" for file systems
	of type NTFS and FAT*.
	For more discussion and justification, see
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10456

2012-09-20  Jim Meyering  <meyering@redhat.com>

	tests: mac: exercise the just-fixed bug
	* tests/t0350-mac-PT-increases-sector-size.sh: New test.
	* tests/Makefile.am (TESTS): Add it.

2012-09-20  Brian C. Lane  <bcl@redhat.com>

	mac: don't let larger partition-table-specified block size evoke UB
	For example, in reading a MAC partition table on a 512-byte sector-size
	disk, _disk_analyse_block_size could find reason to ask if it's ok to
	increase that to e.g., 2048.  Upon a positive reply, we would read 2048
	bytes into a 512-byte buffer.

	* libparted/labels/mac.c (mac_read): If needed, reallocate "buf"
	to accommodate a new, larger sector size.
	* NEWS (Bug fixes): Mention it.

2012-09-20  Jim Meyering  <meyering@redhat.com>

	tests: avoid syntax-check failure for reversed compare args
	* tests/t0203-gpt-create-on-min-sized-device.sh: Reverse args,
	so that any diff output (upon failed test) looks sensible.

2012-09-12  Jim Meyering  <meyering@redhat.com>

	tests: show that small dev now evokes "mklabel gpt" diagnostic
	* tests/t0203-gpt-create-on-min-sized-device.sh: New test.
	* tests/Makefile.am (TESTS): Add it.

	gpt: when "mklabel gpt" fails, always provide a diagnostic
	* libparted/labels/gpt.c (gpt_alloc): When rejecting a device because
	it is too small, give a diagnostic, as is done in every other failure
	path through this function.

	gpt: permit "mklabel gpt" on a 67-sector device
	* libparted/labels/gpt.c (gpt_alloc): Correct checks in order to
	allow creation of a GPT partition table on a 67-sector device.
	The computation of the "data_end" sector number was one too low.
	Whereas there are two sectors at the beginning of the disk (pMBR
	and the GPT header sector), there is only one at the end: the
	backup GPT header.  That (67) is the size of the smallest GPT
	partition table, allowing for *no* partition table sectors.

	tests: update t7000-scripting.sh to avoid new FP
	* tests/t7000-scripting.sh: Use -34s as the endpoint, not -1s,
	to avoid a spurious difference.  Also, remove quoting artifacts.

2012-09-12  Davidlohr Bueso  <dave@gnu.org>

	gpt: require first_usable_LBA <= last_usable_LBA
	When verifying GPT header integrity, ensure that the
	first usable LBA is no larger than the last usable LBA.
	* libparted/labels/gpt.c (_header_is_valid): Reject a header
	with last_usable < first_usable.

2012-09-12  Jim Meyering  <meyering@redhat.com>

	tests: clarify a comment: _reading_ gpt tables on tiny devices
	* tests/t0203-gpt-tiny-device-abort.sh: Clarify.

	maint: remove unnecessary wcslen use
	* parted/strlist.c (gettext_to_wchar): Tighten up test for
	mbsrtowcs failure and remove unnecessary wcslen use.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	maint: tighten per version requirement
	* bootstrap.conf ($buildreq): Require Perl >= 5.6 (not merely >= 5.5),
	because that's the minimal version required by modern Automake and
	Autoconf.

	maint: make Autoconf version requirement consistent
	* bootstrap.conf ($buildreq): Require Autoconf >= 2.63, not >= 2.61,
	for consistency with what is done in AC_INIT in configure.ac

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	build: require Automake >= 1.11.6
	Now that we use AM_TESTS_ENVIRONMENT, we should require at least
	Automake >= 1.11.2; but since all the Automake version until 1.11.5
	are vulnerable to CVE-2012-3386:

	    <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>

	it's even better to require 1.11.6.

	* configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.6.
	* bootstrap.conf ($buildreq): Likewise.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	tests: remove unused AM_TESTS_ENVIRONMENT entries
	Probably a copy&paste errors, likely from the TESTS_ENVIRONMENT
	definition in the 'tests/Makefile.am' in GNU coreutils.

	* tests/Makefile.am (AM_TESTS_ENVIRONMENT): Don't define nor export
	any of the variables PREFERABLY_POSIX_SHELL, REPLACE_GETCWD, CC,
	MAKE, PERL.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	tests: prefer AM_TESTS_ENVIRONMENT over TESTS_ENVIRONMENT
	The latter should be reserved for user overrides.

	* tests/Makefile.am (TESTS_ENVIRONMENT): Rename ...
	(AM_TESTS_ENVIRONMENT): ... like this.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	build: enable subdir-objects Automake option globally
	That option is enabled unconditionally in Automake-NG, and enabling
	it also for mainline Automake will help to ensure no unexpected
	incompatibilities is introduced in a potential port to Automake-NG.

	Moreover, if we have a source file 'sub/foo.c', having it compiled
	in 'sub/foo.o' rather than in 'foo.o' is undeniably cleaner and more
	natural.

	* configure.ac (AM_INIT_AUTOMAKE): Add 'subdir-objects'.
	* libparted/fs/Makefile.am (AUTOMAKE_OPTIONS): No need to declare
	'subdir-objects' explicitly now.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	build: prefer pattern rules over suffix rules
	That is acceptable, because the GNU parted build system already
	requires GNU make anyway: the $(subst ...) built-in is used in the
	common recipe for the 'ss-1024', 'ss-2048' and 'ss-4096' targets
	in Makefile.am.

	* include/parted/Makefile.am (.in.h.h): Rename ...
	(%.h: %.in.h): ... as this pattern rule.
	(SUFFIXES): Delete, no more needed.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	build: don't list files with unknown suffix in _SOURCES
	While this works with mainline Automake (which blindly treats source
	files with an unknown extension as if they were header files), it is
	undocumented (albeit admittedly unlikely to change).  Moreover, it no
	longer works with Automake-NG (and that's by design), so the use of
	such feature would make a port to Automake-NG more difficult.

	* libparted/labels/Makefile.am (liblabels_la_SOURCES): ... don't
	list 'pt-limit.gperf' here; rather ...
	(EXTRA_DIST): ... list 'pt-limit.c' and 'pt-limit.gperf' here.
	(EXTRA_DIST, BUILT_SOURCES): Enhance few comments.

2012-08-30  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)

	build: prefer $(AM_CPPFLAGS) over $(INCLUDES)
	The latter is obsolete, and might be removed in future Automake versions.
	Moreover, it's already been removed in Automake-NG, so its use would make
	a port to Automake-NG more difficult.

	* parted/Makefile.am (INCLUDES): Rename ...
	(AM_CPPFLAGS): ... like this.
	* partprobe/Makefile.am: Likewise.
	* libparted/fs/Makefile.am: Likewise.
	* libparted/Makefile.am: Likewise.
	* libparted/labels/Makefile.am: Likewise.

2012-08-28  Jim Meyering  <meyering@redhat.com>

	build: update gnulib, bootstrap and init.sh

	maint: don't prohibit strncpy just yet
	* cfg.mk (local-checks-to-skip): Add sc_prohibit_strncpy,
	so that we do not yet enable the strncpy prohibition.
	There are many uses, and it will be a lot of work to remove
	all of them.

	maint: avoid new syntax-check failure re @xref
	* doc/parted.texi: Adjust @xref usage: it must be used only
	at start of sentence.
	* doc/parted-pt_BR.texi: Likewise.

2012-06-09  Jim Meyering  <meyering@redhat.com>

	tests: add a test to exercise just-fixed code
	* tests/print-max.c: Extend to provide coverage of
	ped_disk_get_max_supported_partition_count, too.
	* tests/t9021-maxima.sh (max_n_partitions): New function, with
	naively hard-coded max-number-of-partitions-per-partition-table-type
	values.
	Use it to ensure that each expected value matches the actual one.
	* cfg.mk: Exempt this test's use of error from the syntax-check
	for unmarked diagnostics.

2012-06-09  Richard W.M. Jones  <rjones@redhat.com>

	gpt: fix endianness bug in gpt_get_max_supported_partition_count
	* libparted/labels/gpt.c (gpt_get_max_supported_partition_count):
	Take endianness of pth->FirstUsableLBA into account (64-bit,
	little endian) when calculating the maximum number of partitions.
	* NEWS (Bug fixes): Mention it.

2012-03-26  Jim Meyering  <meyering@redhat.com>

	tests: remove bogus envvar setting from t0300-dos-on-gpt.sh
	* tests/t0300-dos-on-gpt.sh: Remove envvar setting that effectively
	disabled testing(only in this test) of simulated sector sizes smaller
	than 4KiB.
	Also, use a much smaller backing file.

2012-03-24  Brian C. Lane  <bcl@redhat.com>

	tests: add t0301-overwrite-gpt-pmbr.sh
	Make sure parted checks the PMBR before the GPT partition table.

	* NEWS: Update with new GPT behavior.
	* tests/overwrite-gpt-pmbr.sh: New test.
	* tests/Makefile.am (TESTS): Add it.

2012-03-24  Brian C. Lane  <bcl@redhat.com>

	libparted: check PMBR before GPT partition table
	The UEFI spec requires that a valid GPT disk label have a PMBR
	partition. This moves the PMBR check to before the GPT check,
	exiting gpt_probe with a 0 if the PMBR is not valid.

	The previous behavior would cause problems in the following situation:
	 1. format a disk as GPT
	 2. re-format it as MSDOS using tools that don't understand GPT

	Subsequent operations with parted would then complain about the invalid
	PMBR, but would not allow the disk to be used as an msdos disk. This
	change causes parted to recognize the msdos partition table.

	* libparted/labels/gpt.c (gpt_probe): Move _pmbr_is_valid test.
	Reported by Chris Murphy in http://bugzilla.redhat.com/805272

2012-03-02  Jim Meyering  <meyering@redhat.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 3.1
	* NEWS: Record release date.

	maint: bump library version to 2.0.0
	* libparted/Makefile.am (CURRENT): Increment, since I removed
	ped_realloc.

	maint: update README-release to reflect we now have two libraries
	* README-release: Two sets of library version triples to adjust.
	* bootstrap: Tiny fix from gnulib.

	lib-fs-resize: remove unused probe-related code
	* libparted/fs/r/hfs/probe.c: Remove probe-related functions.
	There are not used.
	* libparted/fs/r/fat/fat.c: Likewise.
	* libparted/fs/r/hfs/probe.h: ...and declarations.

2012-02-26  Jim Meyering  <meyering@redhat.com>

	libparted: avoid unwarranted failed assertion during mklabel
	This could happen when running "parted -s $dev mklabel $type" for
	nearly any $type, assuming the underlying disk's sector size is
	larger than 512 bytes.  This particular failure was noticed by
	running tests/t9050-partition-table-types.sh with a simulated
	sector size of 1024, as is done as part of a top-level "make check",
	but so far, this failure has shown up only on RHEL-6.2.
	That test attempts to exercise an ugly part of partition table
	creation: during creation, parted checks for an existing
	partition table by iterating through its list of known types and
	attempting to read the disk, looking for a preexisting table.
	Knowing this, the test takes all pairs of partition table types,
	<A,B> and first creates a type of type A, and then creates on top
	of that (erasing the original) a table of type B.
	* libparted/labels/mac.c (_disk_analyse_ghost_size): Remove bogus
	assertion.  If the number of the sector with a matching signature
	is too large, simply reject it by returning 0.
	* NEWS (Bug fixes): Mention this.

2012-02-25  Jim Meyering  <meyering@redhat.com>

	doc: improve NEWS
	* NEWS: Expand/adjust wording in two entries.

2012-02-21  Jim Meyering  <meyering@redhat.com>

	tests: sanitize PATH; do not discard mkswap output
	* tests/init.cfg (sanitize_path_): New function, from coreutils.
	Use it.
	* tests/t9050-partition-table-types.sh: Do not discard mkswap output
	and diagnostics.  This test would fail (e.g., on OpenSUSE 12.1), when
	run with PATH not including /sbin.  Reported by Bruno Haible.

2012-02-18  Jim Meyering  <meyering@redhat.com>

	tests: skip failing use of mkfs.hfs unless using newer, fixed version
	The old, segfaulting version does not recognize the -v option, while
	the new one does.  Use that to skip the test when it seems that
	fsck.hfs is broken.
	* tests/t3000-resize-fs.sh: Skip part of this root-only test
	when fsck.hfs is the always-segfaulting version.

	build,test: update gnulib, bootstrap and init.sh
	* bootstrap: Update.
	* tests/init.sh: Update.
	* gnulib: Update.
	* doc/po4a.mk: Updating gnulib pulls in newer syntax-check rules,
	including one that rejects @lower_case@ variables in Makefiles.
	Fix the sole violation: s/@mandir@/$(mandir)/

	build: avoid non-srcdir build failure
	* libparted/fs/Makefile.am: s!fsresize.sym!$(srcdir)/fsresize.sym!

2012-02-10  Jim Meyering  <meyering@redhat.com>

	maint: placate syntax-check wrt tests/fs-resize.c
	* tests/fs-resize.c (main): Remove unused #includes.
	Do use set_program_name, to placate syntax-check.

	doc: mention HFS+/FAT file system resizing in NEWS
	* NEWS (New features): Mention it.

	tests: test FAT and HFS file system resizing
	* tests/t3000-resize-fs.sh: New test.
	* tests/Makefile.am (TESTS): Add it.
	(check_PROGRAMS): Add fs-resize.
	(fs_resize_LDADD): Define, so it links with both libraries.

2012-02-10  Christoph Hellwig  <hch@lst.de>

	tests: add FS-resize test driver
	* tests/fs-resize.c: New file, to test FAT/HFS resizing.

2012-02-10  Jim Meyering  <meyering@redhat.com>

	lib-fs-resize: use linker script to expose only selected functions
	* libparted/fs/Makefile.am (libparted_fs_resize_la_LDFLAGS): Define.
	(EXTRA_DIST): Distribute the new file.
	(libparted_fs_resize_la_DEPENDENCIES): Make the library depend on it.
	* libparted/fs/fsresize.sym: New file.

	maint: remove r/hfs/DOC,HISTORY,TODO; add VERSION for new library

	lib-fs-resize: rewrite ped_file_system_clobber
	Before, it would probe for an existing file system type and then,
	according to what it found, call the corresponding <FS_TYPE>_clobber
	function.  Now that we have restored only HFS and FAT FS-writing
	support, only those few types have a corresponding _clobber function.
	We would obviously fail to clear common types of file systems, and even
	if we were to restore all previous _clobber functions, none of those
	were able to handle sector sizes larger than 512.  Not worth it.
	* libparted/fs/r/filesys.c: Include pt-tools.h.
	(MIN): Define.
	(ped_file_system_clobber): Rewrite not to use hfs*_clobber or
	fat_clobber.  Instead, simply clear the first three and last two
	sectors of the specified "device".
	* libparted/fs/Makefile.am (INCLUDES): Add
	-I$(top_srcdir)/libparted/labels for new use of a ptt_* function.

	lib-fs-resize: add wrappers for open,close,resize,get_resize_constraint
	* libparted/fs/r/filesys.c: Implement ped_file_system_resize,
	ped_file_system_open, ped_file_system_close and
	ped_file_system_get_resize_constraint.
	* libparted/fs/r/hfs/hfs.c: Give a few functions global scope,
	so we can use them from the above.
	* libparted/fs/Makefile.am: Use automake's subdir-objects option.
	This avoids conflicts with multiple *.o file names
	(e.g., fat.o), now that two directories provide that name.
	(AM_CFLAGS): Disable $(WERROR_CFLAGS), for now.

	maint: update copyrights in r/

2012-02-07  Jim Meyering  <meyering@redhat.com>

	lib-fs-resize: re-add HFS and FAT file-system-related code
	This just adds the code, without hooking it up yet.
	* po/POTFILES.in: Add all libparted/fs/r/**.c files.

	maint: remove now-unused fat-related functions
	* libparted/fs/fat/bootsector.c (fat_boot_sector_generate)
	(fat_boot_sector_write, fat_info_sector_write): Remove functions.
	(fat_boot_sector_set_boot_code): Likewise.
	* libparted/fs/fat/bootsector.h: Remove declarations.
	* libparted/fs/fat/fat.c (fat_set_frag_sectors, fat_free_buffers):
	Remove function.
	* libparted/fs/fat/fat.h: Remove declarations.

	tests: set PARTED_TEST_NAME, for valgrind
	* tests/Makefile.am (PARTED_TEST_NAME): Define.
	* tests/t0211-gpt-rewrite-header.sh: Clarify a comment.

	libparted: gpt: avoid heap-read-overrun when rewriting 9-PTE table
	Now that parted can rewrite a corrupt-or-misaligned 9-PTE table,
	we have to be careful to allocate space for slightly more data
	when the byte-count required for a PTE table is smaller than
	the whole number of sectors would imply.  I.e., when the PTE table
	size is not a multiple of the sector size, there is a fraction of
	that final sector for which we do not read data, but we do write.
	Ensure we have space for the buffer we'll write and that it is
	initialized (to 0's).
	* libparted/labels/gpt.c (gpt_write): Allocate the right amount of
	space.  Use calloc, not malloc+memset.

2012-02-03  Jim Meyering  <meyering@redhat.com>

	maint: adjust the URL that will appear in the generated announcement
	* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE)
	for the first link listed in the generated announcement.
	announce-gen now provides the faster mirror link automatically.

	ui: rewrite disk_print_flags and partition_print_flags
	* parted/parted.c (disk_print_flags): Avoid NULL-dereference on
	failed malloc.  Use xrealloc, not ped_realloc.
	(partition_print_flags): Likewise; nearly identical code.

	tests: avoid relatively harmless new "make syntax-check" failure
	* tests/t0209-gpt-pmbr_boot.sh: Reverse compare arguments.

	libparted: remove ped_realloc, now unused
	* include/parted/parted.in.h (ped_realloc): Remove declaration.
	* libparted/libparted.c (ped_realloc): Remove definition.

2012-02-02  Brian C. Lane  <bcl@redhat.com>

	doc: update parted documentation
	* doc/parted.text: Add disk_set command.

	tests: add test for GPT PMBR pmbr_boot flag
	* tests/t0209-gpt-pmbr_boot.sh: New test
	* tests/Makefile.am: Add new test
	* NEWS: Add information about the GPT PMBR pmbr_boot flag

	tests: update tests for new disk flags output
	* tests/t0010-script-no-ctrl-chars.sh: Updated
	* tests/t0100-print.sh: Updated
	* tests/t0101-print-empty.sh: Updated
	* tests/t0220-gpt-msftres.sh: Updated
	* tests/t0250-gpt.sh: Updated
	* tests/t0280-gpt-corrupt.sh: Updated
	* tests/t2310-dos-extended-2-sector-min-offset.sh: Updated
	* tests/t4000-sun-raid-type.sh: Updated
	* tests/t4100-dvh-partition-limits.sh: Updated
	* tests/t4100-msdos-partition-limits.sh: Updated
	* tests/t4100-msdos-starting-sector.sh: Updated
	* tests/t4200-partprobe.sh: Updated
	* tests/t5000-tags.sh: Updated
	* tests/t6000-dm.sh: Updated
	* tests/t9040-many-partitions.sh: Updated
	* tests/t9041-undetected-in-use-16th-partition.sh: Updated

2012-02-02  Brian C. Lane  <bcl@redhat.com>

	parted: when printing, also print the new disk flags
	This adds a 'Disk Flags:' line the displays the active disk flags.
	In machine mode this is appended to the disk info line, after the
	device model.

	* parted/parted.c (disk_print_flags): New function
	(_print_disk_info): Add Disk Flags information.

2012-02-02  Matthew Garrett  <mjg@redhat.com>

	gpt: add commands to manipulate pMBR boot flag
	Some BIOS systems will only boot from GPT partitions if the boot flag is
	set on the protective MBR partition. This adds the ability to set this
	flag using the disk_set and disk_toggle commands.
	* include/parted/disk.in.h (_PedDiskFlag): Add PED_DISK_GPT_PMBR_BOOT
	* libparted/disk.c (ped_disk_flag_get_name): Add PED_DISK_GPT_PMBR_BOOT
	* libparted/labels/gpt.c (_GPTDiskData): Add pmbr_boot flag.
	(gpt_alloc): Init pmbr_boot to 0.
	(gpt_read_headers): Set pmbr_boot state from PMBR boot flag.
	(_write_pmbr): Add pmbr_boot flag and set PMBR boot flag from it.
	(gpt_write): Pass pmbr_boot flag through to _write_pmbr
	(gpt_disk_set_flag): New function
	(gpt_disk_is_flag_available): New function
	(gpt_disk_get_flag): New function
	(gpt_disk_ops): Add disk_set_flag, disk_get_flag, disk_is_flag_available
	* parted/parted.c (do_disk_set): New function
	(do_disk_toggle): New function
	(_init_commands): Add do_disk_set and do_disk_toggle
	* parted/ui.c (command_line_get_disk_flag): New function
	* parted/ui.h: Add command_line_get_disk_flag prototype.

2012-01-23  Jim Meyering  <meyering@redhat.com>

	tests: create 128 partitions also in the scsi-backed test
	* tests/t9040-many-partitions.sh: Tighten up: use less memory:
	1 sector per partition rather than 256.
	Exec parted just once, not once per partition.
	With that, we can increase the number of partitions to create
	from 60 (which used to take 2.5 minutes on an F12-era kernel)
	to the standard-GPT-header-imposed maximum of 128.
	Suggested by Phillip Susi.

	tests: exercise today's bug fix, creating a GPT table with 128 entries
	* tests/t0212-gpt-many-partitions.sh: New test.
	* tests/Makefile.am (TESTS): Add it.

	libparted: gpt: avoid invalid free with many (~100) partitions
	* parted/parted.c (do_print): Remove invalid free.
	Bug introduced via v1.8.8.1-19-gb56d69c.
	* NEWS (Bug fixes): Mention this.

2012-01-22  Jim Meyering  <meyering@redhat.com>

	tests: test for yesterday's bug fix
	* tests/Makefile.am (TESTS): Add it.
	* tests/t0211-gpt-rewrite-header.sh: New test.

	libparted: gpt: rewrite even a 9-partition-entry table properly
	The vast majority of GPT partition tables have 128 PTEs (partition
	table entries.  However, zfs-related ones have only 9, and when
	rewriting one (which can happen only in interactive mode), parted
	would fail to write the full PTE array whenever the PTE array size
	was not a multiple of the sector size.  This fixes the same type
	of bug as v3.0-45-gce85c51.
	* libparted/labels/gpt.c (gpt_write): When computing how many sectors
	to write for the PTE array, round up rather than truncating.  This
	matters only when n_PTEs * 128 is not a multiple of the sector size.
	For details on how to reproduce see the test or
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10691/focus=10695
	* NEWS (Bug fixes): Mention it.

2012-01-21  Jim Meyering  <meyering@redhat.com>

	maint: clean-up preparing for bug fix
	* libparted/labels/gpt.c (gpt_write): Rename local:
	s/ptes_size/ptes_bytes/; declare as size_t, not "int".
	Move decls "down".

2012-01-19  Phillip Susi  <psusi@cfl.rr.com>

	libparted: raise dos partition limit from 16 to 64
	* NEWS (Bug fixes): Mention it.
	* libparted/labels/dos.c (MAX_TOTAL_PART): s/16/64/
	* tests/t9042-dos-partition-limit.sh: s/13/61/ (MAX_TOTAL_PART-3)
	(adjust/factor some of the logic - jmm)

2012-01-18  Phillip Susi  <psusi@cfl.rr.com>

	libparted: enforce dos partition limit
	The msdos partition table claimed a maximum partition count of 16
	but would allow you to go beyond that.  This resulted in the kernel
	not being informed of those partitions.  Corrected to enforce the
	limit.

	* NEWS (Bug fixes): Mention it.
	* libparted/labels/dos.c (next_primary): Return -1 upon failure.
	(next_logical): Stop no later than MAX_TOTAL_PART.
	Throw exception and return -1 upon failure.
	(msdos_partition_enumerate): Convert a negative partition number
	return value from either of the above two to failure (return 0).
	* tests/t9042-dos-partition-limit.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

2012-01-13  Jim Meyering  <meyering@redhat.com>

	build: revert the recent "fix" to avoid make warnings about linux.lo
	It avoided the warning, but introduced a real problem
	when building from a clean directory.
	The real solution will have to wait, since it appears to
	depend on a fix in automake.

	This reverts commit a3c351c2d1cf2c0000bbc681959695c612bd19a0.

2012-01-13  Jim Meyering  <meyering@redhat.com>

	build: don't use -version for convenience libraries
	Don't use -release, either.  This avoids warnings from libtool.
	* libparted/fs/Makefile.am (libfs_la_LDFLAGS): Remove.

	build: use LT_INIT, to make bootstrap run libtoolize
	* configure.ac: Use LT_INIT, so that bootstrap runs libtoolize,
	which creates build-aux/ltmain.sh.

2012-01-12  Jim Meyering  <meyering@redhat.com>

	maint: remove useless BUILD_LINUX conditional
	* configure.ac (BUILD_LINUX): Don't set it.
	* libparted/Makefile.am (BUILD_LINUX): Remove useless use.

2012-01-12  Jim Meyering  <meyering@redhat.com>

	maint: avoid long-standing warnings from make:
	  Makefile:1274: warning: overriding recipe for target `linux.lo'
	  Makefile:1267: warning: ignoring old recipe for target `linux.lo'

	* libparted/Makefile.am (EXTRA_DIST): Rename from
	EXTRA_libparted_la_SOURCES.

2012-01-12  Jim Meyering  <meyering@redhat.com>

	libparted: provide a new convenience function: ptt_geom_clear_sectors
	* libparted/labels/pt-tools.c (ptt_geom_clear_sectors): New function.
	* libparted/labels/pt-tools.h: Declare it.

2012-01-11  Jim Meyering  <meyering@redhat.com>

	maint: remove "MAINTAINERCLEANFILES = Makefile.in" from Makefile.am's
	* debug/Makefile.am: As above.
	* debug/test/Makefile.am: Likewise.
	* doc/C/Makefile.am: Likewise.
	* doc/pt_BR/Makefile.am: Likewise.
	* include/Makefile.am: Likewise.
	* include/parted/Makefile.am: Likewise.
	* libparted/Makefile.am: Likewise.
	* libparted/fs/Makefile.am: Likewise.
	* libparted/tests/Makefile.am: Likewise.
	* partprobe/Makefile.am: Likewise.
	* doc/Makefile.am: Likewise, for mdate-sh and texinfo.tex.

2012-01-10  Keshav P R  <the.ridikulus.rat@gmail.com>

	build: insert -I$(top_builddir)/include before -I$(top_srcdir)/include
	everywhere, for those who perform non-srcdir builds from a pristine
	cloned directory.  There is no problem when building from a tarball,
	since that includes include/parted/*.h files under $(top_srcdir).
	* libparted/Makefile.am: Insert it.
	* libparted/fs/Makefile.am: Likewise.
	* libparted/labels/Makefile.am: Likewise.
	* libparted/tests/Makefile.am: Likewise.
	* parted/Makefile.am: Likewise.
	* partprobe/Makefile.am: Likewise.
	* tests/Makefile.am: Likewise.

2012-01-10  Jim Meyering  <meyering@redhat.com>

	build: .gitignore: ignore more

	maint: hoist libparted/fs/*/Makefile.am into parent Makefile.am
	There was no need to have a separate Makefile.am for each file system
	type, and a good reason *not* to do that (reduce duplication).
	* configure.ac (AC_OUTPUT): Remove Makefiles.
	* libparted/fs/Makefile.am (SUBDIRS): Remove.
	(EXTRA_DIST): List the two non-src files: hfs/DOC hfs/HISTORY.
	(libfs_la_SOURCES): Hoist file names to here from...
	* libparted/fs/amiga/Makefile.am: ...here.
	* libparted/fs/ext2/Makefile.am: Likewise.
	* libparted/fs/fat/Makefile.am: Likewise.
	* libparted/fs/hfs/Makefile.am: Likewise.
	* libparted/fs/jfs/Makefile.am: Likewise.
	* libparted/fs/linux_swap/Makefile.am: Likewise.
	* libparted/fs/nilfs2/Makefile.am: Likewise.
	* libparted/fs/ntfs/Makefile.am: Likewise.
	* libparted/fs/reiserfs/Makefile.am: Likewise.
	* libparted/fs/ufs/Makefile.am: Likewise.
	* libparted/fs/xfs/Makefile.am: Likewise.
	* libparted/fs/*/Makefile.am: Remove files.
	* libparted/fs/amiga/a-interface.c: Now that the .o files are all
	in the same place, rename from interface.c, to avoid collision with
	name of .o file from ext2/interface.c.

	build: correct my typo in preceding commit
	* configure.ac (AC_CONFIG_SRCDIR): Correct preceding commit.
	Keshav's patch was correct, but when I attempted to do the same
	thing manually I wrote .h.in rather than .in.h.

2012-01-10  Keshav P R  <the.ridikulus.rat@gmail.com>

	build: update AC_CONFIG_SRCDIR for non-srcdir-from-clone builds
	* configure.ac (AC_CONFIG_SRCDIR): List parted.h.in, rather than
	the now-generated parted.h, for those who run configure not from
	a distribution tarball, but from a non-srcdir build using a pristine
	clone.

2012-01-09  Jim Meyering  <meyering@redhat.com>

	maint: rename public .h files to .in.h
	Generate .h files from .in.h files, so that we can continue
	to use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST in the primary
	sources, without including them in publicly-installed files.
	Each generated (and later installed) header file gets expansions
	of those macros.
	* include/parted/Makefile.am: New rules.
	* .gitignore: Ignore the generated files.
	* Makefile.am (SUBDIRS): Reorder so we build in include/ before
	libparted, i.e., so that we generate the .h files we'll need.

	parted.h: use _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE in VC'd files
	However, we will replace those strings with their expansions when
	installing them.
	* include/parted/parted.h: Revert part of commit v3.0-83-gd51bfc0.

	tests: root-only test would fail to remove its loop device
	* tests/t8001-loop-blkpg.sh: Ironically, when skipping this test,
	there was a race condition where in more than 7 out of 10 trials,
	this test's "losetup -d $dev" command would fail with "device in use".
	Hence, with enough testing, I would eventually use up all loop devices
	and start getting new test failures due to losetup *creation* failure.

	build: fix "make distcheck" failure
	Ever since "make distcheck" began using sudo (i.e., running "make check"
	as root, and then running it as non-root), the build-after-root would
	often fail due to some derived files being owned by root.
	This change adds a "chown -R $USER ." to restore order.
	* Makefile.am (root-check): Run "chown -R $USER ." after sudo run.
	(root_check): Rename variable from root-check, to avoid a warning
	from automake about non-POSIX variable.

	build: appease gcc's -Werror=suggest-attribute=pure
	* parted/strlist.c (wchar_strcasecmp): Add pure attribute; make static.
	(wchar_strncasecmp): Likewise.
	(wchar_strdup): Likewise.

2012-01-09  Jim Meyering  <meyering@redhat.com>

	build: update to latest from gnulib
	* bootstrap: Update.
	* tests/init.sh: Likewise.
	* gnulib: Update submodule to latest.

	maint: remove two generated files in doc/
	* doc/fdl.texi: Remove file from version control.  It is generated.
	* doc/gendocs_template: Likewise.
	* doc/parted.texi: Add @node ... before inclusion of fdl.texi,
	since fdl.texi dropped that part.
	* doc/parted-pt_BR.texi: Likewise.
	* doc/.gitignore: Update.

	build: accommodate newer bootstrap from gnulib
	* bootstrap.conf (gnulib_tool_option_extras): Add both --symlink
	and --makefile-name=gnulib.mk.  Remove stray use of $bt.
	* lib/Makefile.am: Initialize all of the following so that
	generated code in gnulib.mk may use += to append to those variables:
	AM_CFLAGS, AM_CPPFLAGS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST,
	MAINTAINERCLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES, SUFFIXES,
	noinst_LTLIBRARIES.

2012-01-09  Jim Meyering  <meyering@redhat.com>

	libparted: gpt: a smaller device need not render both headers invalid
	Putting a valid GPT-labeled image on a smaller device, (i.e., one that
	truncates the backup GPT header, but that does not impact the primary
	one) should not render the primary header invalid.
	* libparted/labels/gpt.c (_header_is_valid): Do *not* reject a header
	when its last_usable value is larger than the device length.
	This reverts part of commit v3.0-10-g99f9c6a, "gpt: don't abort for a
	truncated GPT-formatted device".  With this change, running parted in
	interactive mode with such an image/device combination will recognize
	that only the backup header is corrupt, and will offer to correct it.
	Before, it would report that both headers were corrupt.
	* tests/t0203-gpt-shortened-device-primary-valid.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

	gpt: eliminate four PED_ASSERT uses
	* libparted/labels/gpt.c (_parse_header): Convert a few PED_ASSERT
	uses to friendlier 'test-and-return-0's. Reported by Graham Markall
	in http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10653

2012-01-08  Jim Meyering  <meyering@redhat.com>

	libparted: don't use _GL_ATTRIBUTE_CONST in public parted.h, ...
	Instead, use the bare __attribute__((__const__)).
	* include/parted/parted.h (__attribute): Define.
	(ped_get_version): Use open-coded __attribute.
	Prompted by a report from Keshav P R.

	tests: fix misleading mkpart usage
	Using "primary" is fine (and common) as a partition *type* for dos
	partition tables, but with a partition table of type GPT, it is
	downright misleading to specify the partition *name* as "primary".
	* tests/t0220-gpt-msftres.sh: Use "p-name" as partition name,
	rather than misleading "primary".
	* tests/t7000-scripting.sh: Likewise.

2012-01-05  Jim Meyering  <meyering@redhat.com>

	tests: skip loop-partitioning tests when ext_range is < 2
	* tests/init.cfg (require_partitionable_loop_device_): New function.
	* tests/t8001-loop-blkpg.sh: Use it.
	* tests/t8000-loop.sh: Use it.

	libparted: remove _blkpg_get_partition
	[I applied Phillip's initial patch, omitting both my adjustments
	and his own v2 changes.  This addresses both of those omissions. ]
	* libparted/arch/linux.c (_blkpg_get_partition): Remove function
	and sole use, per patch from Phillip Susi.
	(_kernel_get_partition_start_and_length): Adjust formatting,
	remove unnecessary test and correct a diagnostic.

2012-01-05  Phillip Susi  <psusi@cfl.rr.com>

	libparted: avoid the HDIO_GETGEO ioctl when possible
	We were using the long depreciated HDIO_GETGEO ioctl on the
	partition to get its start sector.  Use the new BLKPG_GET_PARTITION
	ioctl instead.  This allows for disks > 2TB and partitioned loop
	devices, which don't support HDIO_GETGEO.  As a fallback when
	BLKPG_GET_PARTITION fails or is not availible, try getting the
	values from sysfs, and finally use BLKGETSIZE64 and HDIO_GETGEO
	as a last resort.

	libparted: remove has_partitions check to allow loopback partitions
	Commit 1b766b69 added the _has_partitions function to check if a device
	was a loop device and if so, skip updating the kernel partition table
	because loop devices did not support partitions.  This function never
	worked anyway, and loop devices now (since linux 3.2) support
	partitions, so remove this crufty code.
	* libparted/arch/linux.c (_has_partitions): Remove function and
	all uses.

	libparted: remove _loop_get_partition_range
	Commit 1eb0cc30 added support for loop devices to be partitioned,
	but it only enabled that support if the kernel parameter max_part
	was non zero.  This parameter just reserves minor numbers for
	partitions in the traditional sequence that hard disks used.
	When it is zero, it is still possible to add partitions, they
	just will get minor numbers from another pool.  Removing this
	check allows partitions to be used on loop devices even when the
	loop module was not loaded with the max_part argument.
	* libparted/arch/linux.c (_loop_get_partition_range): Remove function
	and all uses.

2012-01-05  Jim Meyering  <meyering@redhat.com>

	tests: fix a bug in wait_for_dev_to_disappear_ helper function
	* tests/t-lib-helpers.sh (wait_for_dev_to_disappear_): Correct
	typo: missing expr in subshell.

2012-01-04  Phillip Susi  <phillsusi@gmail.com>

	libparted: linux: exclude floppy from device scan
	Floppies can't be partitioned anyhow, and some people have a
	misconfigured BIOS that thinks there is a floppy when there
	actually isn't, and trying to scan it causes hanging.

2012-01-03  Phillip Susi  <phillsusi@gmail.com>

	tests: try harder to clean up scsi_debug
	Tests were failing because the previous test gave up while trying to
	unload the scsi_debug module.  Try longer to remove it, and then throw
	in a call to udevadm settle for good measure.
	* tests/t-local.sh: Try harder to release resources here, rather than...
	* tests/t9040-many-partitions.sh: ...in this one test.
	* tests/t-local.sh (require_scsi_debug_module_): Now that
	cleanup requires "udevadm settle", add that requirement here:
	call require_udevadm_settle_.

2012-01-01  Jim Meyering  <meyering@redhat.com>

	maint: update all copyright year number ranges
	Run "make update-copyright".

2011-12-14  Phillip Susi  <psusi@cfl.rr.com>

	doc: add NEWS entry for "Add partition separator only when required"

2011-12-12  Phillip Susi  <psusi@cfl.rr.com>

	Add partition separator only when required
	Device mapper type should not automatically
	mean add 'p' before the partition number.  Fall back to
	adding it only if the previous character is a digit.
	This complies with kpartx behavior and linux behavior
	"since the dawn of time".

2011-12-03  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	build: address a new "noreturn" suggestion
	* parted/ui.h (help_msg): Declare as __noreturn__.

	build: configure.ac: use -Wno-format-nonliteral

	build: mark functions with "const" or "pure" attribute, per gcc warnings
	Use _GL_ATTRIBUTE_PURE or _GL_ATTRIBUTE_CONST.  Mark static functions at
	point of definition; extern ones at point of declaration.
	* include/parted/crc32.h:
	* include/parted/device.h: Likewise.
	* include/parted/disk.h: Likewise.
	* include/parted/exception.h: Likewise.
	* include/parted/filesys.h: Likewise.
	* include/parted/geom.h: Likewise.
	* include/parted/natmath.h: Likewise.
	* include/parted/parted.h: Likewise.
	* include/parted/unit.h: Likewise.
	* libparted/arch/linux.c: Likewise.
	* libparted/disk.c: Likewise.
	* libparted/exception.c: Likewise.
	* libparted/fs/amiga/amiga.h: Likewise.
	* libparted/labels/aix.c: Likewise.
	* libparted/labels/bsd.c: Likewise.
	* libparted/labels/dos.c: Likewise.
	* libparted/labels/dvh.c: Likewise.
	* libparted/labels/efi_crc32.c: Likewise.
	* libparted/labels/gpt.c: Likewise.
	* libparted/labels/mac.c: Likewise.
	* libparted/labels/pc98.c: Likewise.
	* libparted/labels/rdb.c: Likewise.
	* libparted/labels/sun.c: Likewise.
	* libparted/unit.c: Likewise.
	* parted/ui.c: Likewise.
	* parted/strlist.c: Likewise.
	* parted/strlist.h: Likewise.
	* libparted/tests/common.h (_implemented_disk_label): Mark as pure.
	* libparted/cs/natmath.c (extended_euclid): Mark as pure.

	build: avoid new float-to-double warnings
	* libparted/timer.c (ped_timer_new_nested): Mark literal floating point
	constants with "f" suffix, since they are compared against "float"s.
	* parted/parted.c (_timer_handler): Likewise.

	build: tweak how bootstrap manages ChangeLog
	* bootstrap.conf: Create ChangeLog only by touching it, so that
	it doesn't ever remove my in-use symlink (w/vc-dwim).

	tests: two more of these: use "compare exp out", not "compare out exp"
	* tests/t7000-scripting.sh: Reverse compare arguments.
	* tests/t2310-dos-extended-2-sector-min-offset.sh: Likewise.

2011-11-29  Jim Meyering  <meyering@redhat.com>

	tests: use "compare exp out", not "compare out exp"
	Likewise, when an empty file is expected, use "compare /dev/null out",
	not "compare out /dev/null". I.e., specify the expected/desired contents
	via the first file name.  Prompted by a suggestion from Bruno Haible
	in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154

	Run these commands:

	    git grep -l -E 'compare [^ ]+ exp' \
	      |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
	    git grep -l -E 'compare [^ ]+ /dev/null' \
	      |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'

2011-11-27  Petr Uzel  <petr.uzel@suse.cz>

	tests: test for partitions on mdraid
	* tests/t6100-mdraid-partitions.sh: New file.
	* tests/Makefile.am: Run this test.

2011-11-26  Petr Uzel  <petr.uzel@suse.cz>

	libparted: use ext_range to find out largest possible partition
	Parted uses /sys/block/DEV/range file to find out how many partitions
	can the blockdevice hold and uses this number in its algorithm
	for informing the kernel about modified partitions. This works
	fine for most devices, however, it fails on partitionable MD arrays,
	because these have 1 in range file. Using ext_range should be safer
	and work for all devices.

	* libparted/arch/linux.c (_device_get_partition_range): Use
	/sys/block/DEV/ext_range instead of range sysfs file
	* NEWS: Mention the change.

	Addresses: http://bugzilla.novell.com/567652

2011-11-26  Petr Uzel  <petr.uzel@suse.cz>

	build: gitignore tests/duplicate
	.gitignore: Add tests/duplicate.

2011-11-11  Jim Meyering  <meyering@redhat.com>

	maint: a little defensive programming in a test script
	* tests/gpt-header-munge: Use "local *F;" to limit scope of
	file handles.

2011-11-10  Jim Meyering  <meyering@redhat.com>

	tests: skip a test if Perl's Digest::CRC module is not installed
	* tests/init.cfg (require_perl_digest_crc_): New function.
	* tests/t0210-gpt-resized-partition-entry-array.sh: Use it.
	Reported by Keshav P R in
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10530/focus=10589

	tests: fix test for udevadm
	* tests/init.cfg (sector_size_): Fix syntax error in test invocation.

	maint: "make distcheck" now runs the root-only tests
	* Makefile.am (root-check): New overridable variable and rule.
	(distcheck-hook): Depend on it.

	build: update gnulib submodule to latest

	maint: adjust the URL that will appear in the generated announcement
	* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE)
	for the first link listed in the generated announcement.
	announce-gen now provides the faster mirror link automatically.
	Remove now-unnecessary release-related URLs.

2011-11-06  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	build: stop distributing gzip'd releases;  xz is enough
	* configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip.
	* NEWS (Build-related): Mention that we're dropping .tar.gz.

2011-11-05  Jim Meyering  <meyering@redhat.com>

	tests: exercise and document the HFS-probe bug fix
	Simply zeroing out the total_blocks and block_size members of the
	on-disk _HfsMasterDirectoryBlock would provoke a failed assertion
	any time parted tried to probe that partition.
	* tests/t2500-probe-corrupt-hfs.sh: New script.
	* tests/Makefile.am (TESTS): Add it.
	* NEWS (Bug fixes): Mention this.

2011-11-05  Brian C. Lane  <bcl@redhat.com>

	libparted: HFS/HFS+ probe: don't let a corrupt FS evoke failed assertion
	* libparted/fs/hfs/probe.c (hfsplus_probe): Add a check on the
	search value and reject it if it is negative.
	(hfsx_probe): Likewise.
	(hfs_and_wrapper_probe): Likewise.
	Reported by Flos Lonicerae in http://bugzilla.redhat.com/714758

2011-11-04  Brian C. Lane  <bcl@redhat.com>

	tests: t9030 wait for partition removal
	The removal of the partition may take enough time that the next
	mkpart will fail.  Wait for it to be removed.

	Remove scsi_debug size and set the end of the partition to 800s so that
	it will fit inside the default scsi_debug size of 8M, even when sector
	size is 4Kb. This prevents failures on machines with limited memory.

	* tests/t9030-align-check.sh: Wait for partition removal and use
	a smaller disk.

2011-11-04  Jim Meyering  <meyering@redhat.com>

	tests: add a helper function
	* tests/t-lib-helpers.sh (wait_for_dev_to_disappear_): New function.

	tests: exercise the "GPT vs other-sized partition entry arrays" fixes
	* tests/t0210-gpt-resized-partition-entry-array.sh: New file.
	* tests/Makefile.am (TESTS): Add it.
	(EXTRA_DIST): Add gpt-header-munge.

	tests: rewrite/complete GPT-munging perl script
	Rewrite and complete this script.
	It was incomplete and buggy.  Now it works.
	* tests/gpt-header-munge: Rename from ...
	* tests/perl-munge-9-PTE-table: ...this.

2011-11-03  Jim Meyering  <meyering@redhat.com>

	gpt: don't misbehave with e.g., a 9-entry partition array
	* libparted/labels/gpt.c (_generate_header): Correct size of
	partition array entries to round up to nearest multiple of
	sector size, so that we set gpt->PartitionEntryLBA correctly
	also when the number of partition entries is not a multiple
	of sector_size / 128.  Problem diagnosed by Robert Herndon
	in http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10173.

2011-11-03  Robert Herndon  <Robert.Herndon@quantum.com>

	gpt: prepare for tables with n_partition_array_entries != 128
	* libparted/labels/gpt.c (gpt_read_PE_array): When computing the size
	of the partition array entry, use the value of "number of partition
	array entries" read from a GPT header, not the default of 128 that we
	use when creating new headers.  Details here:
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10173

2011-11-03  Jim Meyering  <meyering@redhat.com>

	parted: exit nonzero for certain failures already diagnosed as "Error"
	* parted/parted.c (do_print): Do not exit successfully when issuing
	an error about an "unrecognised disk label" or when both GPT primary
	and backup tables are corrupted.
	* tests/t0101-print-empty.sh: Adjust expected exit code to match
	new behavior.
	* NEWS (Bug fixes): Mention this.

	tests: adjust a test to make its failure easier to diagnose
	* tests/t0203-gpt-tiny-device-abort.sh: When failing, also
	emit parted's diagnostics.

2011-11-02  Jim Meyering  <meyering@redhat.com>

	maint: correct two comments in gpt.c
	* libparted/labels/gpt.c (gpt_read_headers): Correct the comment.
	(_header_is_valid): Fix a harmless typo.

2011-11-02  Brian C. Lane  <bcl@redhat.com>

	tests: add new test to check ped_disk_duplicate
	* tests/duplicate.c: New test.
	* tests/t0501-duplicate.sh: New test program.
	* tests/Makefile.am (TEST): Add new test.
	(check_PROGRAMS): Add new test program.

	libparted: copy flags when duplicating GPT partitions
	* libparted/labels/gpt.c (gpt_partition_duplicate): Copy flags to new
	partition.
	* NEWS: Mention this fix.
	Reported by Chris Murphy in https://bugzilla.redhat.com/747497.

2011-11-02  Petr Uzel  <petr.uzel@suse.cz>

	tests: exercise the new feature
	* tests/t0208-mkpart-end-in-IEC.sh: New file.
	* tests/Makefile.am: Add it.

2011-11-02  Petr Uzel  <petr.uzel@suse.cz>

	parted: mkpart: DWIM for IEC ending sector numbers like 2MiB and 9GiB
	Before, if the user specified start and end in mkpart command using
	IEC units, parted created a partition that starts and ends exactly on
	these positions. With such behavior, it is impossible to create
	partitions as follows: 1MiB-2MiB, 2MiB-3MiB - parted would complain
	that it cannot create the second partition, because the first one
	occupied sectors 2048-4096 and the second one sectors 4096-3072,
	so they would overlap at sector 4096.

	With this patch, if the user uses IEC units to specify end of the
	partition, parted creates the partition which ends one sector before
	the specified position.

	See also
	https://lists.gnu.org/archive/html/bug-parted/2011-10/msg00009.html

	* parted/ui.c (command_line_get_sector): Add parameter to retrieve
	raw input from user.
	* parted/ui.h (command_line_get_sector): Adjust prototype of function.
	* parted/parted.c (_adjust_end_if_iec): New function.
	(_strip_trailing_spaces): New function.
	(_string_ends_with_iec_unit): New function.
	(do_mkpart): Call _adjust_end_if_iec(). Use new parameter of
	command_line_get_sector function.
	(do_rescue): Adjust call to command_line_get_sector.
	* bootstrap.conf (gnulib_modules): Add these: c-ctype, c-strcase.
	* tests/t0207-IEC-binary-notation.sh: Adjust to new semantics.
	* NEWS: Mention the changed behavior.

	Notable adjustments:
	- s/isspace/c_isblank/ so that parsing is locale-independent
	- avoid an array-bounds error:
	  * parted/parted.c (_strip_trailing_spaces): Don't deref str[-1]
	  for an empty string.

2011-10-19  Brian C. Lane  <bcl@redhat.com>

	tests: add tests for new pc98 signatures (#646053)
	 * tests/t2201-pc98-label-recog.sh: New file
	 * tests/Makefile.am: Add test

2011-10-19  Brian C. Lane  <bcl@redhat.com>

	libparted: make pc98 detection depend on signatures
	pc98 is not a common disk label. Change pc98_probe to only return true
	if one of the recognized signatures is present.
	Currently these include:

	IPL1
	Linux 98
	GRUB/98

	This prevents false-positive detection on msdos labeled disks.

	* libparted/labels/pc98.c (pc98_probe): Change to require signature
	(pc98_check_ipl_signature): Add more signatures
	(check_partition_consistency): Remove unused function
	Reported by Zach Carter in http://bugzilla.redhat.com/646053

2011-10-15  Stefano Lattarini  <stefano.lattarini@gmail.com>

	tests: use more portable fd redirection in TESTS_ENVIRONMENT
	* tests/Makefile.am (TESTS_ENVIRONMENT): Redirection with `exec 9>&2'
	is not portable to various Korn shells, and to (at least) HP-UX 11
	/bin/sh.  Use a more portable idiom.
	See <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488> for
	lots of discussion.

2011-10-15  Stefano Lattarini  <stefano.lattarini@gmail.com>

	tests: TEST_ENVIRONMENT simplified and made more robust
	The test scripts in tests/ are shell scripts, so the current
	definition of TESTS_ENVIRONMENT, which adaptively run tests using
	either perl or the shell depending on their kind, is overkill.

	Moreover, this change is required in order for the testsuite to
	continue to work with the new testsuite harness that is planned
	to be introduced in Automake 1.12 (which, as of the writing date,
	is still under development and in late alpha state).

	See also related discussion on bug-coreutils:
	  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8887>

	* tests/help-version: Moved ...
	* tests/help-version.sh: ... to this.
	* tests/Makefile.am (TESTS): Update.
	(TESTS_ENVIRONMENT): Remove definition of the `shell_or_perl_' shell
	function, which is not required anymore.
	(SH_LOG_COMPILER): New, define to `$(SHELL)'.

2011-10-14  Richard W.M. Jones  <rjones@redhat.com>

	tests: fix the tests for the case where stdout/stderr is different
	tests/t0000-basic.sh:
	 - More than one bogus ^M[[:space:]]*^M had to be removed, hence
	   use s,,,g sed expression.

	tests/t0203-gpt-tiny-device-abort.sh:
	 - Test was not expecting any output to stderr.  No longer true.

	tests/t1100-busy-label.sh:
	 - Another case of s,,,g as above.

	tests/t7000-scripting.sh:
	 - Only testing output to stdout.  Fold stdout & stderr together
	   and test both.
	 - Another case of s,,,g as above.

	Some root tests still fail even with these fixes.  The failures appear
	to be unrelated to these changes.

2011-10-14  Richard W.M. Jones  <rjones@redhat.com>

	parted: write a few errors and warnings to stderr instead of stdout

	parted: strlist print functions can now send output to any FILE *
	This changes the two strlist print functions so that instead of just
	sending output to stdout, they can send it to any FILE *.  Now the
	caller can send errors to stderr instead of stdout.

2011-10-12  Petr Uzel  <petr.uzel@suse.cz>

	parted: make a warning message more informative
	The following parted message is not very useful:

	  Error: You requested a partition from 2.00MiB to 3.00MiB.
	  The closest location we can manage is 2.00MiB to 3.00MiB.

	Improve the message by including exact geometry (in sectors):

	  ...requested a partition from 2.00MiB to 3.00MiB (sectors 2048..3072).
	  ... location we can manage is 2.00MiB to 3.00MiB (sectors 2049..3072).

	* parted/parted.c (do_mkpart): Include exact partition geometry in
	the warning message.
	* tests/t-lib-helpers.sh (normalize_part_diag_): Adapt to
	handle the new form of the diagnostic.
	* tests/t7000-scripting.sh: Adapt and change the name
	of a temporary file.

2011-10-03  Petr Uzel  <petr.uzel@suse.cz>

	doc: update manpage
	Remove documentation for removed commands, adjust general description to
	match parted's capabilities, add documentation for 'toggle' and
	'align-check' commands. Remove 'KNOWN ISSUES' section since it no longer
	applies.

	tests: verify that 'udevadm settle' is available
	* tests/init.cfg (require_udevadm_settle_): New function.
	* tests/t8001-loop-blkpg.sh: Call it.

2011-10-01  Petr Uzel  <petr.uzel@suse.cz>

	libparted: do not omit last sector when creating full-dev geometry
	Note that ped_constraint_solve_max() is currently not used anywhere.

	* libparted/cs/constraint.c (ped_constraint_solve_max): full_dev now
	really represents whole device.

2011-10-01  Petr Uzel  <petr.uzel@suse.cz>

	maint: unmark PedDeviceType as deprecated
	PedDeviceType was marked as deprecated before parted started using
	git. Since it proved to be useful to differentiate between different
	device types, and nobody seems interested in removing it from the API,
	let's clear the deprecated flag.

2011-10-01  Petr Uzel  <petr.uzel@suse.cz>

	libparted: do not call _device_get_partition_range() twice
	PED_MIN can evaluate its arguments twice.

	* libparted/arch/linux.c (_disk_sync_part_table): Call
	_device_get_partition_range() outside PED_MIN.

2011-10-01  Petr Uzel  <petr.uzel@suse.cz>

	libparted: optimize _disk_sync_part_table
	In _disk_sync_part_table, if the largest partition number (lpn) is 0,
	it does not make sense to go through the loops below.  Return
	immediately instead.
	* libparted/arch/linux.c (_disk_sync_part_table): Return immediately
	if lpn == 0.

	build: ignore more generated files

	parted: remove obsolete comments
	is_start_exact and is_end_exact were removed from the source.
	* parted/parted.c (constraint_from_start_end): Remove obsolete
	documentation of the function.

	libparted: check return value from ped_geometry_init
	If ped_geometry_init() failed in ped_disk_set_partition_geom(),
	then new_geom remains uninitialized, but still later used, which
	leads to unexpected results.
	* libparted/disk.c (ped_disk_set_partition_geom): Check return
	value from ped_geometry_init().

2011-09-30  Petr Uzel  <petr.uzel@suse.cz>

	tests: add test for partitionable loop devices
	* tests/t8001-loop-blkpg.sh: New file.
	* tests/Makefile.am: Add test.

2011-09-29  Petr Uzel  <petr.uzel@suse.cz>

	libparted: improve support for partitions on loopback devices
	Since linux-2.6.26, the kernel allows partitions on loopback devices.
	Implement support for this feature in parted.
	* libparted/arch/linux.c (_sysfs_int_entry_from_dev): New function.
	(_loop_get_partition_range): New function.
	(_device_get_partition_range): Add special handling for loop devices.
	* NEWS: Mention this change.

	libparted: differentiate between plain files and loop devices
	Stop using PED_DEVICE_FILE for loopback devices;
	loopback are significantly different from plain files.
	* include/parted/device.h (PedDeviceType): Add PED_DEVICE_LOOP.
	* libparted/arch/linux.c (_device_probe_type): Detect loopback device.
	* parted/parted.c (do_print): Add "loopback" to list of transports.

	dvh: factor out read_sector and use ptt_read_sector
	* libparted/labels/dvh.c (read_sector): Factor out this function.
	(dvh_probe): Use ptt_read_sector instead of read_sector.
	(dvh_read): Likewise.

2011-09-28  Jim Meyering  <meyering@redhat.com>

	build: update gnulib to latest; adapt use of _GL_ATTRIBUTE_FORMAT
	* libparted/arch/linux.c (_GL_ATTRIBUTE_FORMAT): Define here,
	now that it's no longer defined by gnulib.

	build: avoid new syntax-check failure
	* cfg.mk: Exempt libparted/arch/beos.c from the PATH_MAX check.
	I suspect that this is ok, because parted compiles only on systems
	that define PATH_MAX to something reasonable.

	doc: mention the origin of the other two bugs
	* NEWS: Mention that the other two bugs were introduced long ago.

	tests: test for the nilfs2 bug
	* tests/t4300-nilfs2-tiny.sh: New test.
	* tests/Makefile.am (TESTS): Add it.

	libparted: fix a bug in the nilfs2 probe function
	* libparted/fs/nilfs2/nilfs2.c (nilfs2_probe): Reject this partition
	if we get a negative sb2 offset.  Passing a negative offset to
	ped_geometry_read_alloc would evoke a failed assertion.
	Bug introduced by 2010-07-09 commit d463e7de.
	* NEWS: (Bug fixes): Mention it.
	Reported by Daniel Fandrich in
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10466/focus=10472

2011-06-24  Jim Meyering  <meyering@redhat.com>

	gpt: don't abort for a truncated GPT-formatted device
	This fixes the problem two ways.  The first fix (via gpt_alloc)
	rejects any device that is too small, but it is insufficient.
	Choose a slightly larger truncated device with an otherwise intact
	primary GPT header and you can still trigger the failed assertion.
	To fix it in general, we make _header_is_valid detect the problem.
	* libparted/labels/gpt.c (gpt_alloc): Reject a device that is so
	small that there is no room for a single partition.
	(_header_is_valid): Validate LastUsableLBA here, as well, so that
	we now reject as invalid any GPT header that specifies a
	LastUsableLBA larger than the device size.
	Leave the assertion in _parse_header.
	* tests/t0203-gpt-tiny-device-abort.sh: Test for this.
	* tests/Makefile.am (TESTS): Add it.
	* NEWS: (Bug fixes): Mention it.
	Reported by Daniel Fandrich in
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10466

	libparted: avoid invalid diagnostic in interactive mode
	* libparted/arch/linux.c (linux_read): In interactive mode,
	a truncated device with a preexisting GPT could evoke this:
	  Error: end of file while reading Success
	it should have been like this:
	  Error: end of file while reading /full/name/of/device
	Use %0.0s to discard the strerror argument.

2011-06-22  Brian C. Lane  <bcl@redhat.com>

	tests: add test for value less than 1
	* tests/t9023-value-lt-one.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

	tests: add test for radius divide by 2 fix
	* tests/t9022-one-unit-snap.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

2011-06-22  Brian C. Lane  <bcl@redhat.com>

	libparted: don't allow values less than 1 (#665496)
	When a value < 1 is used there is the possibility that the range can
	overlap sector 0. The user should use smaller units instead. 0 is a
	special case and is still allowed.

	* libparted/unit.c (ped_unit_parse_custom): Throw error if a value
	between 0 and 1 is used.

2011-06-22  Brian C. Lane  <bcl@redhat.com>

	libparted: fix snap radius so that it is using half (#665496)
	The snap radius didn't match the documentation, it has been using +/-
	unit size instead +/- 0.5 * unit (eg. 500KB for a MB unit). This caused
	problems when specifying 1MB, 1GB, etc. as a partition start or end
	resulting in partitions being created that were nowhere near the
	specified size.

	* libparted/unit.c (ped_unit_parse_custom): divide radius by 2
	This addresses http://bugzilla.redhat.com/665496

2011-06-10  Jim Meyering  <meyering@redhat.com>

	maint: prefer AC_PROG_LIBTOOL over slightly deprecated AM_PROG_LIBTOOL
	* configure.ac: Use AC_PROG_LIBTOOL rather than slightly deprecated
	AM_PROG_LIBTOOL.

2011-06-07  H. Peter Anvin  <hpa@zytor.com>

	libparted: simplify kernel version-parsing logic
	* libparted/arch/linux.c: (_get_linux_version): Simplify and add
	an assertion.

2011-06-06  Jim Meyering  <meyering@redhat.com>

	libparted: accommodate two-component linux version number like 3.0
	* libparted/arch/linux.c (_get_linux_version): Also accept 2-component
	version numbers.
	* NEWS: (Bug fixes): Mention it.
	Reported by Richard W.M. Jones.

2011-05-30  Jim Meyering  <meyering@redhat.com>

	post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 3.0
	* NEWS: Record release date.

	maint: placate coverity: don't ignore some return values
	* libparted/cs/constraint.c: Include <assert.h>.
	(ped_constraint_exact): Don't ignore ped_alignment_init's return
	value or that from ped_geometry_init.

	loop: avoid NULL dereference upon failure
	* libparted/labels/loop.c (loop_partition_duplicate): Don't dereference
	NULL upon failure.

	shared library version: increment major: 1.0.0
	* libparted/Makefile.am (CURRENT, REVISION): Update from 0.2.0 to 1.0.0,
	due to removed interfaces.

	build: update gnulib submodule to latest

2011-05-27  Jim Meyering  <meyering@redhat.com>

	doc: update NEWS
	* NEWS (Changes in behavior): Describe the change.
	(Bug fixes): Mention the leak fixes.

	doc: reflect removal of FS-related commands
	* README (WARNING): Say that all FS-manipulation code is now gone.
	* doc/parted.texi (Command explanations): Remove descriptions of and
	any examples or references to the following commands: check, cp,
	mkfs, mkpartfs, move, resize.

	build: remove configure-time options: --disable-fs, --enable-Werror
	* configure.ac: Remove support for --enable-fs and --disable-fs.
	Remove support for --enable-Werror and --disable-Werror.
	* README: Remove paragraph about --disable-fs and
	--enable-discovery-only.
	* libparted/libparted.c: Now that --disable-fs is gone (i.e.,
	ENABLE_FS would be always 1), remove its #ifdefs.

	tests: make t0220 more useful when it fails

	maint: update po/POTFILES.in
	* po/POTFILES.in: Remove file names, to reflect file deletions.

	doc: remove FS-related documentation and other stale bits
	* doc/parted.texi: Remove FS-related documentation and other
	stale bits.

	linux_swap: remove all-but-probe FS-related code

	xfs: remove all-but-probe FS-related code

	jfs: remove all-but-probe FS-related code

	ufs: remove all-but-probe FS-related code

	reiserfs: remove all-but-probe FS-related code

	hfs: remove all-but-probe FS-related code

	ntfs: remove all-but-probe FS-related code

	amiga: build with warning and error options
	* libparted/fs/amiga/Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS)
	and $(WERROR_CFLAGS).

	ext2: remove all-but-probe FS-related code

	fat: remove all-but-probe FS-related code

	remove all top-level FS-op code and the clearfat program

	UI: remove all file-system-aware sub-commands
	Note that we are removing the resize command, even though parted
	appears to be the only free tool that provides the ability to
	resize FAT16 and FAT32 file systems.
	* parted/parted.c (do_mkfs, do_cp, do_mkpartfs): Remove functions.
	(do_move, do_check, do_resize): Likewise.
	(_init_commands): Remove each command-definition clause.
	* parted/parted.c (_partition_warn_loss): Remove now-unused function.
	* include/parted/filesys.h: Remove declarations of now-removed
	FS-munging functions

	tests: t1100: show that adding a partition on a busy device succeeds
	* tests/t1100-busy-label.sh: Demonstrate that adding a partition
	succeeds, even when another on the same device is mounted (active).

	amiga: avoid NULL-deref-on-OOM and an error-path leak
	* libparted/labels/rdb.c (amiga_read): Don't dereference NULL on OOM.
	Don't leak a constraint when failing to add a partition.

	mac: avoid NULL-deref-on-OOM and an error-path leak
	* libparted/labels/mac.c (mac_read): Don't dereference NULL on OOM.
	Don't leak a constraint when failing to add a partition.

	sun: avoid NULL-deref-on-OOM and an error-path leak
	* libparted/labels/sun.c (sun_read): Don't dereference NULL on OOM.
	Don't leak a constraint when failing to add a partition.

	UI: avoid leak when interactive sector selection matches default
	* parted/ui.c (command_line_get_fs_type): Don't leak an input "word".

	UI: plug a leak
	* parted/ui.c (command_line_get_fs_type): Don't leak an FS type name
	string.

	bsd: avoid NULL-deref-on-OOM and an error-path leak
	* libparted/labels/bsd.c (bsd_read): Don't dereference NULL on OOM.
	Don't leak a constraint when failing to add a partition.

	linux: don't leak a FILE* upon /proc read failure
	* libparted/arch/linux.c (_probe_proc_partitions): Call fclose
	upon failure.

	linux: plug a file descriptor leak
	* libparted/arch/linux.c (read_device_sysfs_file): Don't leak a
	file descriptor.

	tests: t1100-busy-label: don't use mkpartfs; rework to use scsi_debug
	* tests/t1100-busy-label.sh: Remove one last use of mkpartfs.
	Use scsi_debug rather than requiring an explicitly-provided device.

2011-05-26  Jim Meyering  <meyering@redhat.com>

	maint: correct coverity-reported "suspicious sizeof"
	* parted/table.c (table_add_row): Use sizeof(*VAR), rather than
	erroneous sizeof(explicit_type) that just happened to be ok.

	maint: remove unreachable code
	* libparted/labels/sun.c (sun_partition_new): Remove unreachable stmt.
	* libparted/labels/pc98.c (pc98_partition_new): Likewise.

	build: update gnulib submodule to latest

2011-05-18  Jim Meyering  <meyering@redhat.com>

	post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 2.4
	* NEWS: Record release date.

	shared library version: increment REVISION
	* libparted/Makefile.am (REVISION): Increment, since there have
	been changes to the library, but no interface addition or removal.
	* README-release: Mention the shared-library version update procedure.

	build: update gnulib submodule to latest

	tests: avoid nasty FP-causing race condition
	* tests/t9040-many-partitions.sh: Remove all partitions before
	exiting -- otherwise, the rmmod-prompted removal of those many
	partitions would continue long after rmmod completion and the
	release of the scsi_debug lock, and thus partition-device removals
	provoked by this test would cause failure in the subsequent test,
	e.g., when the devices for partitions 14,15,16 have just been
	successfully created (verified that they exist), yet the next
	step -- to create a file system on one of them -- fails or is
	erroneously skipped because the device has been removed asynchronously.

	tests: add double quotes around another use of $VERBOSE
	* tests/t-local.sh (scsi_debug_setup_): Quote another $VERBOSE.

	build: list bc as a build-requirement
	* bootstrap.conf (buildreq): Also require "bc", since it's used
	in some of 'make check's tests.

2011-05-17  Jim Meyering  <meyering@redhat.com>

	tests: remove tests that are too FS-centric
	* tests/t2100-mkswap.sh: Likewise.
	* tests/t3000-resize-fs.sh: Remove file, now that all FS-ops are gone.
	* tests/Makefile.am (TESTS): Remove them here, too.

	linux: fix diagnostic about operating on very small file or device
	* libparted/arch/linux.c (init_file): Correct diagnostic.
	Parted would claim that a small-but-non-empty file has zero length.

	bfs: remove unused files

	tests: add double quotes around a use of $VERBOSE
	* tests/t-local.sh (scsi_debug_cleanup_): Add missing double quotes.

2011-05-12  Jim Meyering  <meyering@redhat.com>

	tests: avoid new, spurious test failure
	* tests/t9050-partition-table-types.sh: Use a "device size"
	that is large enough to accommodate 1KiB and 4KiB sectors.
	The original size, 3MiB was too small for a dvh partition
	with PARTED_SECTOR_SIZE=1024.  Increase it to 30MiB.

	tests: adapt t1101-busy-partition not to use mkpartfs
	* tests/t1101-busy-partition.sh: Use mkfs.vfat instead.

2011-05-10  Jim Meyering  <meyering@redhat.com>

	tests: write all pairs of partition table types
	* tests/t9050-partition-table-types.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

	tests: add a NEWS entry and a test to exercise today's bug fix
	* tests/t9041-undetected-in-use-16th-partition: New file.
	* tests/Makefile.am (TESTS): Add it.
	* NEWS (Bug fixes): Describe it.

2011-05-10  Phillip Susi  <psusi@cfl.rr.com>

	linux: also detect "in-use" dmraid and scsi-Nth (N>=16) partitions
	Prior to this change, Parted would fail to detect any in-use
	partition on a dmraid disk, as well as any in-use partition
	numbered 16 or greater on a regular scsi disk.
	This was because assumptions were being made about the device node
	major/minor numbers and how they relate to the partition number.
	These assumptions are invalid for dmraid devices, and for normal
	disks with >= 16 partitions.
	* libparted/arch/linux.c (_partition_get_part_dev): Remove function.
	(_partition_is_mounted): Rewrite to use _partition_is_mounted_by_path
	instead of _by_dev.

2011-05-10  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	tests: avoid subtle shell semantics bug
	This bug was causing some root-only tests to be mistakenly skipped.
	This bash command will always exit successfully,
	i.e., the "return 1" will never happen:
	  bash -c 'f(){ local f=$(false)||return 1; return 0; }; f'
	That's because the assignment always succeeds, and that success
	is what determines the return value, not the $(...) command.
	This is very counter-intuitive, sigh.
	The work-around is to separate the declaration and assignment, as in
	local f; f=$(...) || ...
	* tests/t-local.sh (new_sdX_): Do that.
	(gpt_corrupt_primary_table_): Likewise.

	tests: minor fix; add/adjust comments
	* tests/t1101-busy-partition.sh: Don't ignore failed comparison.
	Add a comment.

2011-04-21  Brian C. Lane  <bcl@redhat.com>

	s390/dasd: avoid buffer overrun upon API mismatch diagnostic
	* libparted/labels/fdasd.c (fdasd_check_api_version): The static
	buffer for the error string was too small.  Double its length.
	This resolves http://bugzilla.redhat.com/693852

2011-04-20  Brian C. Lane  <bcl@redhat.com>

	linux: fix typo in comment: /path%d => /part%d
	* libparted/arch/linux.c (_device_get_part_path): Fix typo in comment.

2011-04-18  Jim Meyering  <meyering@redhat.com>

	linux: don't free invalid pointer upon asprintf failure
	* libparted/arch/linux.c (_device_get_part_path): When asprintf
	fails, it leaves its first argument in an undefined state, and
	hence that pointer must not be freed.  However, here, in two
	places we could potentially free an invalid pointer.  Use
	zasprintf; then the pointer is either NULL or allocated,
	and hence always freeable.

	linux: clean up device naming code (no semantic change)
	* libparted/arch/linux.c (zasprintf): New function.
	(_device_get_part_path): Clean up:
	Use size_t, not "int" for strlen-returned value.
	Combine mostly duplicate snprintf uses.
	Use zasprintf instead of malloc+snprintf.

	don't reference before start of buffer for short device name
	* libparted/arch/linux.c (_device_get_part_path): Avoid invalid
	reference to memory before dev->path when its length is 4 or less.

2011-04-14  Jim Meyering  <meyering@redhat.com>

	maint: s/can not/cannot/ in a comment and documentation
	Without this, a new "make syntax-check" rule would fail.
	* libparted/filesys.c: s/can not/cannot/
	* doc/parted-pt_BR.texi (BIOSes and Firmware): Likewise.

	tests: remove now-unused Makefile rule
	* libparted/tests/Makefile.am (old-init.sh): Remove obsolete rule.

	tests: improve t1101-busy-partition.sh
	* tests/t1101-busy-partition.sh: Fail hard upon timeout while
	waiting for device to appear.

	tests: make the tests in libparted/tests work properly once again
	Since switching to init.sh, the root-only tests did not clean up.
	* libparted/tests/Makefile.am (prereq): Always create a symlink
	to tests/init.sh.
	* tests/init.cfg: Source $abs_top_srcdir/tests-relative names,
	not $srcdir-relative names.  This way, it works also when run
	from libparted/tests/.
	* tests/t-local.sh: Likewise.

	tests: avoid a race condition in the scsi_debug-using tests
	* tests/t-local.sh (new_sdX_): New function.
	(scsi_debug_setup_): Use new_sdX_ to find the just-created device name,
	rather relying on the list of file names in /sys/block/sd* changing.
	Sometimes the list would not change, which would lead to tests failing
	with I/O errors when run in parallel.  Thanks to Brian Lane for the
	tip that /sys/block/sd*/device/model contains "scsi_debug" if there
	is a device created by our "modprobe scsi_debug" command.

2011-03-24  Jim Meyering  <meyering@redhat.com>

	make parted "do what I say" with IEC start and end values like 5GiB
	In a command like this,
	  parted -s -- $dev mklabel gpt mkpart P-NAME 4MB -34s
	parted interprets the "4MB" as merely a suggestion for the starting
	sector number.  It uses half of the MB-units value as a "radius"
	about the sector containing byte 4,000,000, and it may choose some
	other more appropriate sector, based on partition table or alignment
	constraints within the range 3,500,000B..4,500,000B.
	Before, parted handled IEC units, i.e., KiB, MiB, GiB, etc.,
	with identically "helpful" sloppiness, of course honoring the
	power-of-two semantics.
	Now, however if you use IEC units, i.e., KiB, MiB, GiB, etc.,
	the "radius" is taken to be zero, so parted uses precisely
	whatever multiple of a power of two you've specified.
	Hence, adjusting the example above to use MiB, rather than "MB",
	  parted -s -- $dev mklabel gpt mkpart P-NAME 4MiB -34s
	With this change, that is equivalent to the following:
	  parted -s -- $dev mklabel gpt mkpart P-NAME 4194304B -34s
	I.e., it uses the sector containing precisely that byte, and
	does not perform any "extra" adjustment.
	* libparted/unit.c (is_power_of_2): New function.
	(ped_unit_parse_custom): Use it to avoid interpreting a large
	input string as "sloppy" (i.e. large radius) when it uses IEC
	binary notation like 34KiB, 3GiB and 65TiB.
	* tests/t0207-IEC-binary-notation.sh: New test.
	* tests/Makefile.am (TESTS): Add it.
	* doc/parted.texi (unit): Describe the new behavior.
	* NEWS (Changes in behavior): Mention it here, too.

2011-03-20  Jim Meyering  <meyering@redhat.com>

	maint: stop using .x-sc_* files to list syntax-check exemptions
	Instead, use the new mechanism with which you merely use a
	variable (derived from the rule name) defined in cfg.mk to an ERE
	matching the exempted file names.
	* gnulib: Update to latest, to get maint.mk that implements this.
	* .x-sc_GPL_version: Remove file.
	* .x-sc_prohibit_always-defined_macros: Likewise.
	* Makefile.am (EXTRA_DIST): Remove them from here, too.
	* cfg.mk: Define variables to exempt the same files.

2011-03-16  Jim Meyering  <meyering@redhat.com>

	maint: rename a variable
	* libparted/labels/gpt.c (_header_is_valid): Rename a variable,
	and switch to more readable range-checking logic.

	gpt: avoid division by zero
	* libparted/labels/gpt.c (_header_is_valid): Reject as invalid if
	FirstUsableLBA < 3.
	(gpt_get_max_supported_partition_count): Ensure that we don't divide
	by zero: verify that the GPT header is valid before dividing by its
	"size of partition entry".  Under normal circumstances, the on-disk
	PE size field is reasonable because we have just written it.  However,
	there are two ways it can end up zero: we lose the race when some other
	process pokes a 4-byte 0 into just the right location between when
	we write it and when we re-read the value we're about to divide by.
	Then there's the case that I encountered: using an old USB (8MB) key,
	mklabel gpt failed due to division by zero.  The device reported no
	failure when writing the initial header, yet when reading back that
	very same sector (also successful), parted got all 0 bytes.
	* NEWS (Bug fixes): Mention it.

	build: enable compilation warnings also for new nilfs2 subdir
	* libparted/fs/nilfs2/Makefile.am (AM_CFLAGS): Define.

	nilfs2: remove unused nilfs2_clobber function
	* libparted/fs/nilfs2/nilfs2.c (nilfs2_clobber): Remove unused
	function.
	(nilfs2_ops) [clobber]: Always set to NULL.

	maint: avoid shadowing warning
	* parted/parted.c (do_mkpart): Rename inner added_ok to add_ok.

	build: don't let parted_CFLAGS override our AM_CFLAGS setting
	* parted/Makefile.am (parted_CFLAGS): Remove unused (and interfering)
	definition.

	maint: avoid new compiler warnings
	* parted/parted.c (do_print): Remove now-unused "error" label.
	(_print_disk_info): Use one more "const" attribute, to avoid
	compiler warnings.

2011-03-16  Petr Uzel  <petr.uzel@suse.cz>

	tests: do not fail if some utilities are missing
	* tests/t1700-probe-fs.sh: Skip the test if mkfs.ext3 or tune2fs
	is missing or is not in $PATH.

	tests: test 'parted print' with empty disk
	* tests/t0101-print-empty.sh: New test.
	* tests/Makefile.am: Add it.

2011-03-16  Petr Uzel  <petr.uzel@suse.cz>

	parted: rework 'parted print' so that it works with empty disk
	'parted $dev print' on a device without a partition table used to fail
	with an 'unrecognised disk label' error, without printing the following:
	disk model, transport, size, sector size, BIOS geometry
	all of which are available, and do not dependent on the partition table.

	With this patch, parted prints all of this information (BIOS geometry
	only if 'unit cyl' is specified) and reports success even if the disk
	does not have a valid partition table.

	As a side efect, 'parted $dev print devices/all/list' now prints
	information about all the devices, even if $dev does not have a
	partition table.

	* parted/parted.c (_print_disk_info): New function.
	(do_print): Do not immediately fail if the partition table is not
	recognized, but print disk information and report success instead.
	* NEWS (Changes in behavior): Mention it.

2011-03-16  Petr Uzel  <petr.uzel@suse.cz>

	parted: factor out disk geometry printing into separate function
	* parted/parted.c (_print_disk_geometry): New function.
	(do_print): Use _print_disk_geometry.

2011-03-05  Brian C. Lane  <bcl@redhat.com>

	Remove PED_ASSERT action argument
	The action argument was a leftover from when the PED_ASSERT macro was
	last changed. This removes that argument from the macro and from all
	occurrences of it.

2011-03-05  Brian C. Lane  <bcl@redhat.com>

	Remove PED_ASSERT from dos geometry checking
	The CHS geometry values are calculated based on the existing partition
	information. The values can't always be calculated, and the partition
	may be corrupt so instead of throwing an assertion just return 0 and
	carry on.

	I left the logic for the PED_ASSERT checks the same so that it is clear
	that the logic has not changed, it just returns 0 now.

	* libparted/labels/dos.c (probe_partition_for_geom): remove PED_ASSERT

2011-03-05  Jim Meyering  <meyering@redhat.com>

	tests: add a minimal nilfs2 test
	* tests/t1700-probe-fs.sh: Adapt to also test nilfs2.

2011-03-03  Jim Meyering  <meyering@redhat.com>

	tests: rename a test script, before extending it to handle nilfs
	* tests/t1700-probe-fs.sh: Rename from ...
	* tests/t1700-ext-probe.sh: ...this.
	* tests/Makefile.am (TESTS): Rename it here, too.

2011-02-26  Jiro SEKIBA  <jir@unicus.jp>

	libparted: add nilfs2 module
	* libparted/fs/nilfs2/Makefile.am: New file.
	* libparted/fs/nilfs2/nilfs2.c: New file.
	(is_valid_nilfs_sb, nilfs2_probe, nilfs2_clobber): New functions.
	(ped_file_system_nilfs2_init, ped_file_system_nilfs2_done): Likewise.
	(nilfs2_ops, nilfs2_type): Define.
	* libparted/fs/Makefile.am (SUBDIRS): Add nilfs2.
	* configure.ac (AC_OUTPUT): Add the new Makefile.
	* libparted/libparted.c: Declare and use the _init and _done functions.

	Add a new fs module to provide following:
	- probe nilfs2 filesystem partition
	- clobber nilfs2 filesystem partition

	The is_valid_nilfs_sb function came from the grub nilfs2 module,
	which is written by me and assigned to FSF.

2011-02-25  Jim Meyering  <meyering@redhat.com>

	maint: two files lacked a newline at EOF: add one to each
	* include/Makefile.am: Add newline at end of file.
	* libparted/fs/jfs/Makefile.am: Likewise.

	tests: t3310-flags: check all gpt boolean flags, too
	* tests/t3310-flags.sh: Check gpt as well as msdos flags.
	Parametrize mkpart usage.
	Accommodate gpt-induced difference in parted's print output
	GPT partitions have a name, while msdos ones do not.
	This also fixes the "on_and_off" perl flag extraction regexp,
	which before was using $1 with no corresponding () group.

	tests: prepare t3310-flags to check gpt boolean flags, too
	* tests/t3310-flags.sh: Put a loop around the body of the test,
	and factor out the partition table name.

	tests: remove useless commands
	* tests/t3310-flags.sh: Remove useless exp-manipulating commands.

2011-02-25  Brian C. Lane  <bcl@redhat.com>

	gpt: add legacy_boot partition flag
	Add support for the Legacy BIOS Bootable flag in the GPT
	Attribute field.  This is used by software like syslinux to
	determine which partition to boot when in BIOS mode.

	See Page 105, Table 19 Bit 2 of the UEFI Spec 2.3 book.

	* doc/C/parted.8: Document legacy_boot.
	* doc/parted.texi: Document legacy_boot.
	* include/parted/disk.h: Add PED_PARTITION_LEGACY_BOOT flag.
	* libparted/disk.c (ped_partition_flag_get_name): Add legacy_boot flag.
	* libparted/labels/gpt.c (_parse_part_entry):
	(_partition_generate_part_entry, gpt_partition_new):
	(gpt_partition_set_flag, gpt_partition_get_flag):
	(gpt_partition_is_flag_available): Add legacy_boot flag support.

2011-02-25  Brian C. Lane  <bcl@redhat.com>

	gpt: add partition attribute bits: NoBlockIOProtocol, LegacyBIOSBootable
	Add NoBlockIOProtocol and LegacyBIOSBootable flags to the GPT partition
	Attributes entry.

2011-02-25  Jim Meyering  <meyering@redhat.com>

	doc: regenerate partprobe .pot and .po files
	* doc/C/po/partprobe.8.pot: Slight syntax update induced by newer tool.
	* doc/pt_BR/partprobe.8.pt_BR.po: Likewise.

	tests: move test_description= variable to a comment
	test-lib.sh-based tests required a test_description= definition.
	When testing switched to init.sh, which by convention uses a brief
	comment on line 2 instead, some instances were not converted.
	* libparted/tests/t1000-label.sh: Put test description on line 2.
	Remove now-unused test_description= definition.
	* libparted/tests/t2000-disk.sh: Likewise.
	* tests/t0220-gpt-msftres.sh: Likewise.

2011-02-23  Jim Meyering  <meyering@redhat.com>

	s390: avoid warnings
	* libparted/labels/vtoc.c (vtoc_read_volume_label): Remove decl
	of unused var.
	* libparted/labels/fdasd.c (fdasd_valid_vtoc_pointer): Return
	a value also when successful.
	* libparted/labels/dasd.c (dasd_alloc_metadata): Initialize "part"
	to NULL solely to avoid a spurious used-uninitialized warning.

2011-02-23  Stephen Powell  <zlinuxman@wowway.com>

	doc: add NEWS entries for s390 fix and improvements

2011-02-23  Stephen Powell  <zlinuxman@wowway.com>

	s390: make DIAG driver work for FBA DASD with block size > 512
	In order to make the DIAG driver work for FBA DASD with a block
	size greater than 512, I had to make a rather awkward patch to
	C function vtoc_read_volume_label in libparted/labels/vtoc.c.
	The "right" logic would be "If this is an FBA DASD device
	using the DIAG driver, and the effective block size used by the
	DIAG driver is greater than 512, then do it this way.  Else,
	do it the normal way."  (Note that when using the FBA driver,
	the effective block size is always 512, regardless of the CMS
	logical block size stored in the volume label.  The DIAG driver,
	on the other hand, honors the CMS logical block size.)

	The problem is that the information needed to make that decision
	has not been provided to the routine (via the parameter list).
	So what I ended up doing is assuming the normal way, then if
	I don't find a recognized volume label header (VOL1, LNX1,
	or CMS1, in EBCDIC), then I assumed that it must be the special
	case.  So in the special case I end up doing an unnecessary
	read.  It's a kludge, but it works.

2011-02-23  Jim Meyering  <meyering@redhat.com>

	tests: new script to generate 9-pte-GPT-tables

	cleanup: use verify, not PED_ASSERT to check struct sizes
	* libparted/labels/gpt.c: Use compile-time "verify" rather than
	run-time PED_ASSERT to ensure struct sizes are as expected.

2011-02-23  Stephen Powell  <zlinuxman@wowway.com>

	s390: improve/correct DASD support
	The long title would be "corrections to partition size and location
	calculations for type 1 partitions for s390 dasd".

	This could be treated as two separate fixes, one to make corrections
	for LDL formatted disks and one to add support for CMS formatted
	disks.  I see CMS formatted disks as a variant of LDL formatted
	disks, with the additional twist that CMS formatted disks can
	be reserved or recomped, which LDL formatted disks cannot be.
	This affects the size and location of the partition.

	With these patches, parted matches the behavior of the Linux kernel
	in recognizing partitions on CMS- and LDL-formatted disks, as documented
	in the Linux kernel source code in routine fs/partitions/ibm.c.
	Calculation of the metadata has also been changed so that parted will
	show no free space on such a disk.  In some cases there are now two
	non-contiguous metadata extents: one at the beginning of the disk and
	one at the end.

	As before, parted only supports CKD DASD using the ECKD driver.
	FBA DASD and CKD DASD using the DIAG driver are still not supported.

	In my regression testing I have discovered some problems in the area
	of recognizing file system options.  However, since I can duplicate
	these errors on a version of parted which does not contain my changes,
	I have concluded that my changes did not cause this and therefore
	this is an unrelated bug.

2011-02-22  Jim Meyering  <meyering@redhat.com>

	maint: update from gnulib
	* bootstrap: Update from gnulib.
	* tests/init.sh: Likewise.
	* gnulib: Update submodule to latest.

	maint: update copyright year ranges to include 2011
	Run "make update-copyright".

	maint: update copyright date in parted.texi
	* doc/parted.texi: Update copyright date.

2010-12-30  Jim Meyering  <meyering@redhat.com>

	maint: don't hard-code bug-reporting address
	* libparted/exception.c (default_handler): Use PACKAGE_BUGREPORT
	rather than hard-coding bug-parted@...
	* libparted/labels/gpt.c (_parse_header) [DISCOVER_ONLY]: Don't
	mention the bug-reporting address explicitly, since ped_exception_throw
	is about to do just that.

2010-12-16  Jim Meyering  <meyering@redhat.com>

	maint: correct typos in HACKING
	* HACKING: Don't reference grep everywhere.  I copied grep's
	HACKING and forgot to s/grep/parted/ (slightly different for
	the repository, since it's at git.debian.org, not Savannah).
	2010-11-25  Jim Meyering  <meyering@redhat.com>

2010-12-15  Brian C. Lane  <bcl@redhat.com>

	default to 1MiB alignment when possible
	Change the linux_get_optimum_alignment() function to prefer
	aligning partitions to PED_DEFAULT_ALIGNMENT (1MiB), if possible.
	This helps tools like anaconda better support 4k sector drives.

	* include/parted/parted.h (PED_DEFAULT_ALIGNMENT): Define.
	* libparted/arch/linux.c (linux_get_optimum_alignment): Adjust.
	See comments for details.
	* libparted/device.c (ped_device_get_optimum_alignment): Use
	PED_DEFAULT_ALIGNMENT rather than hard-coded 1048576.
	* tests/t9020-alignment.sh: Adjust expectations to match new behavior.
	See http://bugzilla.redhat.com/618255 for details.

2010-11-22  Jim Meyering  <meyering@redhat.com>

	tests: don't rely on "lockfile" program
	* tests/t-local.sh (scsi_debug_acquire_lock_): Use mkdir, rather
	that lockfile.  The latter is not always available.
	(scsi_debug_lock_dir_): Rename, now that it's a dir.
	(scsi_debug_cleanup_): Remove it with rm -rf.
	Fix typo in diag: s/rrmod/rmmod/

	tests: remove vestiges of test-lib.sh
	* tests/t-lib-helpers.sh (require_mdadm_): Remove vestiges of
	test-lib.sh (aka uses of the "say" and "test_done" functions).
	(require_xfs_): Likewise.

	tests: avoid spurious failure
	* tests/t6000-dm.sh: Sanitize directory name, to avoid spurious
	failure due to e.g., mount-related differences.

2010-11-22  Brian C. Lane  <bcl@redhat.com>

	linux: remove DASD restriction on _disk_sync_part_table
	* libparted/arch/linux.c: Include <assert.h>.
	(linux_disk_commit): Assert that _have_blkpg returns true
	and don't skip _disk_sync_part_table for DASD devices.
	Otherwise, when creating a partition on a DASD device,
	new /dev/*[12...] device files would not be created.
	Also, remove obsolete comment about DevFS.
	For details, see http://bugzilla.redhat.com/651478
	and http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10191

2010-11-21  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest
	avoid new syntax-check failures
	* .x-sc_cross_check_PATH_usage_in_tests: New file.
	* .x-sc_bindtextdomain: New file.

2010-11-20  Jim Meyering  <meyering@redhat.com>

	tests: adjust cleanup_ handler to work with init.sh
	* tests/init.cfg (cleanup_, cleanup_fn_, cleanup_final_): Define.
	* tests/t-local.sh (cleanup_final_): Use this to ensure that we
	always release the lock and run rmmod.  Overriding the trap did not
	do the job.
	* libparted/tests/t2100-zerolen.sh: Use cleanup_fn_, not cleanup_.
	* tests/t1100-busy-label.sh: Likewise.
	* tests/t1101-busy-partition.sh: Likewise.
	* tests/t4100-dvh-partition-limits.sh: Likewise.
	* tests/t4100-msdos-partition-limits.sh: Likewise.
	* tests/t6000-dm.sh: Likewise.
	* tests/t8000-loop.sh: Likewise.

	tests: t3000-resize-fs.sh: don't expect fs-op warning
	* tests/t3000-resize-fs.sh: Don't expect fs-op warning.
	The testing framework now suppresses it.

	tests: t-lvm.sh (lvm_init_root_dir_): Fix it to use $test_dir_

	tests: remove t-lib.sh
	* tests/t-lib.sh: Remove file.  No longer used.
	* tests/Makefile.am (EXTRA_DIST): Remove t-lib.sh.
	* tests/t-lib-helpers.sh: Don't mention this file name.
	* tests/t-local.sh: Likewise.

2010-11-20  Jim Meyering  <meyering@redhat.com>

	tests: switch from t-lib.sh to init.sh
	* tests/init.cfg: Source t-local.sh.
	* tests/t-local.sh: Replace trap so that we always run
	scsi_debug_cleanup_, regardless of the cleanup_ function.
	Replace each snippet like this:
	-if test "$VERBOSE" = yes; then
	-  set -x
	-  parted --version
	-fi
	-
	-: ${srcdir=.}
	-. $srcdir/t-lib.sh
	+. "${srcdir=.}/init.sh"; path_prepend_ ../parted

	Use this command (LHS elided, because it was too long):
	  git grep -l 'srcdir/t-lib.sh'|xargs perl -p0i -e \
	    's!...!. "\${srcdir=.}/init.sh"; path_prepend_ ../parted\n!'

	* tests/t3310-flags.sh: Adjust manually, since the snippet
	didn't quite match.

2010-11-20  Jim Meyering  <meyering@redhat.com>

	tests: remove test-lib.sh
	* tests/test-lib.sh: Remove file.  No longer used.
	* tests/Makefile.am (EXTRA_DIST): Remove test-lib.sh.
	(old-init.sh): Remove rule and associated uses.
	* tests/lvm-utils.sh (init_root_dir_): Switch to test_dir_,
	since that is now the only variable that remains.

	tests: remove fail=0 initializations
	Now, this is done in init.sh.

	tests: libparted/tests: use init.sh, not test-lib.sh

	tests: make lvm-utils.sh usable also from init.sh-using tests
	* tests/lvm-utils.sh: Use fail_, not error for diagnostics.
	The former also works in init.sh-using scripts.
	(init_root_dir_): Use test_dir_ if $test_dir_rand_ is not set.

	tests: new function required for t2100-zerolen.sh
	* tests/t-lib-helpers.sh (device_mapper_required_): New function.

	tests: convert t5000-tags.sh

	tests: t-lib-helpers.sh: don't discard require_dvhtool_ stderr/stdout

	tests: dvhtool: use skip_, not skip

	tests: t4200-partprobe.sh: convert

	tests: t-lib-helpers.sh (require_dvhtool_): New function.

	tests: convert t4000-sun-raid-type.sh

	tests: move more functions to t-lib-helpers.sh

	tests: convert t7000 to init.sh

	tests: t-lib-helpers: copy emit_superuser_warning from test-lib.sh

	tests: t0000: convert to use init.sh

	tests: convert t1101-busy-partition.sh
	* tests/t1101-busy-partition.sh: Convert from t-lib.sh to init.sh.

	tests: convert t4100-msdos-partition-limits.sh
	* tests/t4100-msdos-partition-limits.sh: Likewise.

	tests: convert t4100-dvh-partition-limits.sh to use init.sh
	* tests/t4100-dvh-partition-limits.sh: Convert.

	tests: convert t4100-msdos-starting-sector.sh
	* tests/t4100-msdos-starting-sector.sh: Use init.sh.

	tests: convert t0220 to use init.sh
	* tests/t0220-gpt-msftres.sh: Convert to use init.sh.

	tests: extract t-lib.sh functions for use via init.sh
	Currently there are three test frameworks in use:
	  - test-lib.sh: old, don't use this framework any more;
	      I found it too hard to use and debug.
	  - t-lib.sh: newer, I had converted most tests to use this
	  - init.sh: newest: successor of t-lib.sh, the master copy
	      of which now resides in gnulib. All new tests should use
	      this framework.
	* tests/t-lib-helpers.sh: New file, extracted from t-lib.sh,
	so that init.cfg can source these functions, too.
	* tests/t-lib.sh: Source it.
	* tests/init.cfg: Source it from here, too.
	* tests/Makefile.am (EXTRA_DIST): Add t-lib-helpers.sh.

	tests: remove unused function: skip_if_

	tests: global subst: s/skip_test_/skip_/
	git grep -l skip_test_|xargs perl -pi -e 's/skip_test_/skip_/'

	maint: remove unused test function
	* tests/t-lib.sh (require_built_): Remove unused function.
	It also happened to use skip_, which we're about to make a function.

	tests: avoid race condition in t3000-resize
	Without the 1-second sleep, this root-only test would
	fail about 50% of the time for me.
	* tests/t3000-resize-fs.sh (device_sectors_required): Sleep
	one more second after ${dev}1 appears, so that subsequent
	commands are more predictable.
	Split a long line.

	tests: t2100-mkswap.sh: convert to init.sh
	* tests/t2100-mkswap: Likewise.

	tests: convert t1100 to use init.sh
	* tests/t1100-busy-label.sh: Convert to use init.sh
	* tests/init.cfg (require_erasable_): New function, mostly
	copied from test-lib.sh.

	tests: init.cfg: copy envvar setings from testlib.sh:
	Unset TERM and CDPATH; sanitize LC_ALL, TZ, LANG, and set
	PARTED_SUPPRESS_FILE_SYSTEM_MANIPULATION_WARNING=1.
	* tests/t1101-busy-partition.sh: Expect no output, now that we set
	PARTED_SUPPRESS_FILE_SYSTEM_MANIPULATION_WARNING=1.

	maint: update init.sh and bootstrap from gnulib
	* tests/init.sh: Update from gnulib.
	* bootstrap: Likewise.

	doc: also mention KiB, MiB, GiB and TiB suffixes
	* doc/parted.texi (unit): Also mention KiB, MiB, GiB and TiB.

2010-11-17  Colin Watson  <cjwatson@ubuntu.com>

	libparted: ignore zero-length devices
	* bootstrap.conf (gnulib_modules): Add xstrtoll.
	* configure.ac: Create DYNAMIC_LOADING output variable.
	* libparted/arch/linux.c (_device_get_length): Return the value of
	PARTED_TEST_DEVICE_LENGTH if set in the environment, strictly for use by
	the test suite.
	(init_generic): If geometry probing fails because the device was
	zero-length, return quietly rather than throwing an exception.  This has
	been observed in the wild with cciss devices, and it's difficult for
	partitioners to tell the difference between that and more serious
	errors.
	* libparted/tests/Makefile.am (TESTS): Add t2100-zerolen.sh.
	(check_PROGRAMS): Add zerolen.
	(zerolen_SOURCES): Add.
	(TESTS_ENVIRONMENT): Add DYNAMIC_LOADING and ENABLE_DEVICE_MAPPER.
	* libparted/tests/t2100-zerolen.sh: New file.
	* libparted/tests/zerolen.c: New file.
	* tests/test-lib.sh (wait_for_dev_to_appear_): New function, copied from
	tests/t-local.sh.
	* NEWS (Bug fixes): Mention it.

2010-11-09  Jim Meyering  <meyering@redhat.com>

	dos: fix a bug affecting very small devices (smaller than 1 cylinder)
	This bug was introduced in commit c79d91ec, "dos: accommodate very
	small devices (useful for testing)".
	* libparted/labels/dos.c (_primary_constraint): The bug was to
	skip setting start_geom for small devices.  That led to a used-
	uninitialized bug in the subsequent ped_constraint_new call.
	The fix is to relax the constraint to use a starting sector of "1",
	if necessary.  Report and diagnosis by Jean-Christian de Rivaz in
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10178
	* NEWS (Bug fixes): Mention it.

2010-10-10  Jim Meyering  <meyering@redhat.com>

	maint: don't use obsolete gnulib modules
	* bootstrap.conf (gnulib_modules): Use calloc-gnu, malloc-gnu
	and realloc-gnu modules, rather than calloc, malloc and realloc.
	The shorter-named modules are now deprecated.

	maint: describe policy on copyright year number ranges
	* README: Mention coreutils' long-standing policy on use of M-N
	ranges in copyright year lists.  Requested by Richard Stallman.

	build: update gnulib submodule to latest, and update bootstrap
	* bootstrap: update from gnulib

2010-08-23  Petr Uzel  <petr.uzel@suse.cz>

	build: suggest libuuid from util-linux-ng package
	* configure.ac: libuuid was moved from e2fsprogs to
	util-linux-ng-2.16.  Because distributions now often
	build e2fsprogs without libuuid support, suggest installing
	libuuid from util-linux-ng if it is missing, not from e2fsprogs.

2010-08-20  Colin Watson  <cjwatson@ubuntu.com>

	libparted: remove limits on loop labels
	There's no reason to impose any particular limit on loop labels, since
	they just represent a single large partition.  Sector counts over 2^32
	are needed for large RAID arrays.  Change the limit to 2^64 since that's
	the upper limit imposed by libparted and it saves us implementing the
	limit functions separately.  This bug appears to have been introduced
	by commit 2dbc645c.

	* libparted/labels/pt-limit.gperf: Change limits on "loop" to 2^64.
	* tests/t9021-maxima.sh: Update for the new loop limit.
	* NEWS (Bug fixes): Mention it.

2010-08-18  Jim Meyering  <meyering@redhat.com>

	avoid non-srcdir "make check" failure
	* tests/Makefile.am (EXTRA_DIST): Add init.cfg.
	The failure was introduced by commit 6f7c0f12.

	build and tests: update bootstrap and init.sh from gnulib
	* tests/init.sh: Update from gnulib.
	* bootstrap: Likewise.

	build: update gnulib submodule to latest

2010-07-20  Hans de Goede  <hdegoede@redhat.com>

	linux: recognize scsi disks with a high major number (128-135)
	* libparted/arch/linux.c (SCSI_BLK_MAJOR): Recognize high major number.

2010-07-17  Jim Meyering  <meyering@redhat.com>

	libparted: avoid regression when processing a whole-disk FAT partition
	Without this change, we would improperly classify a whole-disk partition
	containing a FAT file system as a DOS partition table with no partitions.
	Introduced by commit d732a2b7 on 2008-05-28.
	* libparted/labels/dos.c (maybe_FAT): New function.
	(msdos_probe): Use it.
	Reported by ChenMin in
	http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10115
	* NEWS (Bug fixes): Mention it.
	* tests/t3400-whole-disk-FAT-partition.sh: New file.  Test for the bug.
	* tests/Makefile.am (TESTS): Add it.

2010-07-17  Jim Meyering  <meyering@redhat.com>

	tests: use init.cfg; required for init.sh-using tests
	* tests/init.cfg: New file.
	(require_512_byte_sector_size_): Slightly different function
	than the one in test-lib.sh.

	* tests/init.cfg: New file.

2010-07-17  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	maint: remove trailing blank
	* tests/t1101-busy-partition.sh: Remove trailing blank.

2010-06-30  Otavio Salvador  <otavio@ossystems.com.br>

	tests: update resize-fs to use wait_for_dev_to_appear_
	* t3000-resize-fs.sh: rely on wait_for_dev_to_appear_ to wait for the
	device to be crated.

	tests: rely on require_scsi_debug_module_ to modprobe scsi_debug module
	* t2310-dos-extended-2-sector-min-offset.sh: remove explicit modprobe
	since it is done by require_scsi_debug_module_.
	* t3200-type-change.sh: likewise.
	* t9020-alignment.sh: likewise.
	* t9030-align-check.sh: likewise.
	* t9040-many-partitions.sh: likewise.

2010-06-30  Otavio Salvador  <otavio@ossystems.com.br>

	tests: add one: try to remove a busy partition
	This test tries to reproduce the issue reported in Debian bug #582818[1].

	 1. http://bugs.debian.org/582818

	Basically it does:

	 * create two primary partitions
	 * mount the second one
	 * remove the first (must work)
	 * try to remove the second (must fail)

	* tests/t1101-busy-partition.sh: new file.
	* tests/Makefile.am (TESTS): add the new test in check target.

2010-06-26  Otavio Salvador  <otavio@ossystems.com.br>

	tests: skip loop-clobber-infloop if mkswap cannot be found
	* tests/t0400-loop-clobber-infloop.sh: Skip the test is case of mkswap
	cannot be found.

2010-06-26  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest
	* bootstrap: Update from gnulib.
	* tests/init.sh: Likewise.

2010-06-26  Colin Watson  <cjwatson@ubuntu.com>

	sun: revert "implement disk flag operations"
	This reverts the libparted/labels/sun.c part of
	723ea23c5df68cbe67d1f518ef484f4c77f516fa.  Sun disk labels do
	not appear to be able to handle non-cylinder alignment
	(http://bugs.debian.org/579948).
	* libparted/labels/sun.c: Revert.

2010-06-26  Jim Meyering  <meyering@redhat.com>

	tests: adjust sun-partition-creating test to conform
	* tests/t4000-sun-raid-type.sh: Adjust partition size so the
	end falls on a cylinder boundary.

2010-05-28  Jim Meyering  <meyering@redhat.com>

	maint: update README-release
	* README-release: Update to match the template used for diffutils,
	coreutils, etc.

	maint: add gettext to list of bootstrapped-with tools in announcement
	* cfg.mk (bootstrap-tools): Add gettext to the list.

	post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 2.3
	* NEWS: Record release date.

	doc: regenerate two files using gettext-0.18
	* doc/pt_BR/partprobe.8.pt_BR.po: Regenerate with gettext-0.18.
	* doc/C/po/partprobe.8.pot: Likewise.

	build: require gettext-0.18 after all, because
	since gnulib is pulling in m4/gettext.m4 from 0.18, and there's
	a cross-check between that file and po/Makefile.in.in, it's easiest
	simply to require 0.18 of those who run build tools.  Otherwise,
	requiring 0.17, build-from-git would fail due to the mismatch:
	0.17 in Makefile.in.in and 0.18 in m4/gettext.m4.
	* configure.ac (AM_GNU_GETTEXT_VERSION): Require gettext 0.18.

	build: update gnulib submodule to latest

	maint: use the do-release-commit-and-tag module from gnulib
	* bootstrap.conf (gnulib_modules): Add do-release-commit-and-tag.

2010-05-28  Petr Uzel  <petr.uzel@suse.cz>

	doc: fix a typo
	* doc/parted.texi: s/onstraints/constraints/

	parted: do_align_check returns always 1 in interactive mode
	* parted/parted.c (do_align_check): Always return 1 in interactive mode.

2010-05-28  Jim Meyering  <meyering@redhat.com>

	build: really use gettext-0.17
	* configure.ac: Correct previous change to use 0.17, not 0.18,
	since gettext-0.18 is new enough that it makes building from git
	a little too inconvenient.  Spotted by Petr Uzel.

2010-05-26  Petr Uzel  <petr.uzel@suse.cz>

	parted: make align-check work in interactive mode
	* parted/parted.c (do_align_check): rework the function so that
	it reports partition alignment in interactive mode as described in
	documentation.

	parted: initialize align_type to default value
	* parted/parted.c (do_align_check): Initialize align_type to
	default alignment; this prevents reading of uninitialized memory
	later in command_line_get_align_type()

	parted: plug memory leak
	* parted/parted.c (_done_messages): Free unit_msg.

2010-05-26  Jim Meyering  <meyering@redhat.com>

	tests: avoid spurious failure of the root-only many-partitions test
	* tests/t9040-many-partitions.sh: When creating a scsi_debug
	device, honor the block size suggested by the PARTED_SECTOR_SIZE
	environment variable, and thus required in expected output.

	build: update gnulib submodule to latest

	maint: remove useless definitions
	* libparted/fs/xfs/platform_defs.h [__sparc__] (O_DIRECT):
	Remove now-unneeded definition.
	* parted/table.c (wchar_t): Remove definition.
	* parted/strlist.c (wchar_t): Likewise.
	* .x-sc_prohibit_always-defined_macros: New file.
	Exempt two files from this syntax-check rule.
	* Makefile.am (EXTRA_DIST): Add it here.

	maint: update helper scripts
	* tests/help-version: Update from coreutils.
	* bootstrap: Update from gnulib.
	* tests/init.sh: Likewise.

	build: use gettext-0.17
	* configure.ac: Use gettext-0.17.
	* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext.
	since the latter drags in a depedency on gettext 0.18.

2010-05-25  Jim Meyering  <meyering@redhat.com>

	fix typo in comment

2010-05-10  Jim Meyering  <meyering@redhat.com>

	libparted: fail (don't just warn) upon failure to inform kernel of...
	partition change(s).
	* libparted/arch/linux.c (_disk_sync_part_table): Throw an error, not
	merely a warning.  When this fails, it indicates that the kernel has
	not been informed, and that must translate to an error, since doing
	otherwise would violate the contract of ped_disk_commit_to_os.
	Suggested by Hans De Goede.

2010-05-06  Jim Meyering  <meyering@redhat.com>

	tests: make the new many-partitions test fail if it takes "too long"
	* tests/t9040-many-partitions.sh: Fail if creating 60 partitions
	takes more than a minute.

	maint: use latest bootstrap script from gnulib
	* bootstrap: Sync from gnulib.

2010-05-06  Hans de Goede  <hdegoede@redhat.com>

	gpt: recognize microsoft recovery GUID
	Microsoft advices creating recovery partitions with a GUID of
	de94bba4-06d1-4d40-a16a-bfd50179d6ac, see:
	http://technet.microsoft.com/en-us/library/dd744301%28WS.10%29.aspx

	This patch makes parted recognize this guid (using the DIAG flag).
	* libparted/labels/gpt.c (PARTITION_MSFT_RECOVERY, GPTPartitionData,
	_parse_part_entry, gpt_partition_new, gpt_partition_set_system,
	gpt_partition_set_flag, gpt_partition_get_flag,
	gpt_partition_is_flag_available): Support microsoft recovery GUID.
	* NEWS (New features): Add it.

2010-05-06  Hans de Goede  <hdegoede@redhat.com>

	msdos: recognize id 27 as a diagnostics (recovery) partition type
	msdos partitiontable partition id 27 is recommended by microsoft for
	use as id for recovery partitions, see:
	http://technet.microsoft.com/en-us/library/dd744364%28WS.10%29.aspx
	http://bugzilla.redhat.com/show_bug.cgi?id=534066

	* libparted/labels/dos.c (PARTITION_MSFT_RECOVERY): Define.
	(raw_part_parse): Recognize id 27
	(msdos_partition_set_system): Recognize id 27

2010-05-06  Jim Meyering  <meyering@redhat.com>

	tests: add one: create 60 partitions on a scsi device
	* tests/t9040-many-partitions.sh: New test.
	* tests/Makefile.am (TESTS): Add it.
	(TESTS_ENVIRONMENT): Export AWK to test scripts.
	Inspired by the report of a many-partition test
	taking far longer on RHEL5 than on RHEL4 in
	http://bugzilla.redhat.com/589117

2010-05-05  Jim Meyering  <meyering@redhat.com>

	doc: update NEWS
	* NEWS (Bug fixes): Mention the ext2 2TiB FS-creation bug.

	build: update gnulib submodule to latest

2010-05-05  Martin Poole  <mpoole@redhat.com>

	ext2: don't overflow when creating a partition of size 2TiB or larger
	Without this patch, mkpartfs would succeed in creating an ext2
	partition, but the resulting partition would fail a mkfs.ext2 -f check.
	* libparted/fs/ext2/parted_io.c (do_read): Avoid overflow 32-bit
	sector count overflow for a partition of size 2TiB or larger.
	(do_write): Likewise.
	See http://bugzilla.redhat.com/584057#c16 a reproducer.

2010-04-30  Hans de Goede  <hdegoede@redhat.com>

	_device_unregister: check for unregistering the same device twice
	_device_unregister() can get called 2 times for the same device if
	a libparted user explictly removes the device from the cache using
	ped_device_cache_remove(), it gets called and it then becomes the
	user's responsibility to free the PedDevice by calling
	ped_device_destroy(). ped_device_destroy() will then call
	_device_unregister() a second time with the same device, so if the
	device is not found in the list, do nothing.

	* libparted/device.c(_device_unregister): Check for unregistering
	the same device twice.
	Reported by Jan Stodola in <http://bugzilla.redhat.com/568346>.

2010-04-30  Jim Meyering  <meyering@redhat.com>

	tests: avoid root-only/XFS limit test failure on 32-bit system
	* tests/t4100-msdos-partition-limits.sh: Due to an inherent XFS
	limitation on 32-bit systems, this test would fail a set-up
	file creation step for simulated sector sizes of 4K and up.
	Skip this test in those cases.
	Upon dd failure, propagate its diagnostic to output, to make this
	sort of problem easier to diagnose.
	* tests/t4100-dvh-partition-limits.sh: Likewise.

2010-04-30  Jim Meyering  <meyering@redhat.com>

	libparted: avoid race in informing the kernel of partition table changes
	When sync'ing a partition table change using the latest
	code, sometimes we'd get an unwarranted failure like this:

	    Warning: Partition(s) 1 on /dev/sdd have been written, but we
	    have been unable to inform the kernel of the change, probably because
	    it/they are in use.  As a result, the old partition(s) will remain in
	    use.  You should reboot now before making further changes.

	To be precise, when running the partition-resizing root-only test
	in a loop:

	    for i in $(seq 240); do make -C tests check VERBOSE=yes \
	    TESTS=t3000-resize-fs.sh >& log.$i && printf . || echo $i $?; done

	I would typically see about 50% of them fail on a Fedora 13 system.
	It was obvious that this was due to a race condition when I found that
	modifying that tests' parted...resize invocation to go via strace changed
	the timing enough to make the test pass every time.

	The fix is to retry the partition-removal step upon any EBUSY failure,
	currently for up to 1 second (retrying up to 100 times, sleeping 10ms
	after each failure).

	* libparted/arch/linux.c (_disk_sync_part_table): Allocate "ok" using
	calloc, now that its initial values matter.
	Retry each removal upon EBUSY-failure.
	* bootstrap.conf (gnulib_modules): Use gnulib's usleep module.

2010-04-30  Jim Meyering  <meyering@redhat.com>

	libparted: variable renaming, minor "goto" reorg
	* libparted/arch/linux.c (_disk_sync_part_table): Rename local array:
	s/rets/ok/, for readability.
	Use only a single label, "cleanup:", rather than two: free_rets
	and free_errnums.

	libparted: remove now-worse-than-useless _kernel_reread_part_table
	Now that we're using BLKPG properly, there's no point in using the
	less-functional BLKRRPART ioctl to make the kernel reread the partition
	table.
	More importantly, this function would fail when any partition is in
	use, in spite of our having carefully vetted them via BLKPG ioctls.
	* libparted/arch/linux.c (_kernel_reread_part_table): Remove function.
	(linux_disk_commit): Don't call it.

2010-04-29  Jim Meyering  <meyering@redhat.com>

	tests: correct a root-only test
	* tests/t2310-dos-extended-2-sector-min-offset.sh: Don't hard-code
	"/dev/sdd5" in expected output.

	maint: avoid code duplication
	* libparted/labels/dos.c (clear_flags): New function.
	Factored (5 times) out of ...
	(msdos_partition_set_flag): ...here.  Use the new function.

2010-04-29  Hans de Goede  <hdegoede@redhat.com>

	dos: add a partition flag for diagnostics / recovery partitions
	msdos partition tables can contain diagnostics partitions (often used
	nowadays as system recovery partitions).  For some users of libparted
	(i.e., anaconda) it is useful to know if a dos partition is a regular
	partition or a diagnostic partition.  For example, see
	<http://bugzilla.redhat.com/534066>.

	* include/parted/disk.h(_PedPartitionFlag): Add PED_PARTITION_DIAG
	* libparted/disk.c(ped_partition_flag_get_name): Add PED_PARTITION_DIAG
	* libparted/labels/dos.c: Add support for PED_PARTITION_DIAG flag
	* doc/parted.texi (set): Document it.

2010-04-28  Jim Meyering  <meyering@redhat.com>

	tests: distribute new file, init.sh
	* tests/Makefile.am (EXTRA_DIST): Add init.sh.

	tests: add help-version test (from coreutils)
	* tests/help-version: New file
	* tests/Makefile.am (TESTS_ENVIRONMENT): Pass built_programs and VERSION
	to test scripts -- both are required by help-version.
	(TESTS): Add help-version.

	ui: make --help tell where to report bugs
	* parted/ui.c (help_msg): Tell where to report bugs.

	tests: use gnulib's init.sh
	* tests/init.sh: New file, from gnulib.

	tests: rename generated init.sh to old-init.sh
	* tests/Makefile.am (old-init.sh): Rename from init.sh.
	* libparted/tests/Makefile.am: Likewise.
	* tests/test-lib.sh: Rename sole use.
	* .gitignore: Rename here, too.

	build: update gnulib submodule to latest

	tests: improved portability
	* tests/test-lib.sh: Don't use test's -a option.

	maint: remove empty lines at end of file
	This lets one more "syntax-check" test pass.
	Run this command:
	  git ls-files|grep -v gnulib|xargs perl -pi -0777 -e 's/\n\n+$/\n/'

	maint: pass newer "make syntax-check" tests from gnulib
	* cfg.mk (local-checks-to-skip): Add these, to pass "make syntax-check"
	sc_error_message_uppercase, sc_error_message_period.
	* libparted/fs/ext2/ext2.h: Remove "#if HAVE_INTTYPES_H" guard.

	tests: test all boolean flags
	* tests/t3310-flags.sh: New test, suggested by Hans De Goede.
	* tests/Makefile.am (TESTS): Add it.

2010-04-27  Jim Meyering  <meyering@redhat.com>

	doc: use a valid http:.../AUTHORS URL
	* debug/clearfat/clearfat.c (AUTHORS): Point to the git repo.
	* parted/parted.c (AUTHORS): Likewise.
	* partprobe/partprobe.c (AUTHORS): Likewise.

	* parted/parted.c: Include "version.h".
	(_version): Use Version, not VERSION.

2010-04-27  Jim Meyering  <meyering@redhat.com>

	ui: get version number from a separately-compiled file
	* parted/Makefile.am (version.c, version.h): Generate.
	(parted_LDADD): Add libver.a.
	(noinst_LIBRARIES, nodist_libver_a_SOURCES): Define.
	(BUILT_SOURCES): Initialize and append.
	(MAINTAINERCLEANFILES): Update.
	* parted/parted.c: Include "version.h".
	(_version): Use the new global variable, Version, not VERSION.

2010-04-23  Jim Meyering  <meyering@redhat.com>

	libparted: _disk_sync_part_table: allow interactive ignore
	* libparted/arch/linux.c (_disk_sync_part_table): Change diagnostic
	so that it makes it clear what failed.  Let an interactive "ignore"
	cause the function to succeed.

	tests: remove partition explicitly before mklabel, to avoid new failure
	* tests/t3000-resize-fs.sh: Before, mklabel was sufficient to clear
	the partition table in preparation for the next iteration in this test.
	However, with recent BLKRRPART/BLKPG changes that "mklabel" would evoke
	a warning.  Remove the sole partition to avoid that.

	libparted: linux_disk_commit: don't ignore _disk_sync_part_table failure
	* libparted/arch/linux.c (linux_disk_commit):
	When calling _disk_sync_part_table, always return its result.

	libparted: _disk_sync_part_table: always return 0 upon failure
	* libparted/arch/linux.c (_disk_sync_part_table):
	Return 0 (not 1) upon failure.

2010-04-23  Colin Watson  <cjwatson@ubuntu.com>

	dos: always allow at least two sectors for extended boot record
	Unless specifically told otherwise, the Linux kernel considers extended
	boot records to be two sectors long, in order to "leave room for LILO".
	When using anything other than cylinder alignment, libparted was only
	allowing one sector in the minimum extended partition geometry, which in
	some situations (e.g. following Phillip Susi's patch to reintroduce
	BLKPG) could confuse the kernel into thinking that the EBR and the first
	logical partition overlapped.

	* libparted/labels/dos.c (_get_min_extended_part_geom): Allow at least
	two sectors for the extended boot record.

2010-04-23  Jim Meyering  <meyering@redhat.com>

	tests: test for new 2-sector minimum ext-logical-separation
	* tests/t2310-dos-extended-2-sector-min-offset.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

	dos: accommodate very small devices (useful for testing)
	* libparted/labels/dos.c (_primary_constraint): Don't pass a negative
	"device_length" to ped_geometry_init when the underlying device
	has fewer sectors than a "cylinder".

	libparted: allocate storage for diagnostic only when needed
	* libparted/arch/linux.c (_disk_sync_part_table): Rename local:
	s/parts/bad_part_list/
	Allocate space for it only if needed.
	Use malloc rather than ped_malloc.
	Move decl of FD down to first use.

	libparted: adjust code formatting

	libparted: reword a diagnostic

2010-04-23  Phillip Susi  <psusi@cfl.rr.com>

	libparted: improve BLKPG error checking
	This patch cleans up the BLKPG code that the previous patch put back
	to perform proper error checking and in the event that some partitions
	are in use, they can not be modified in the running kernel using BLKPG.
	Warn the user that this is the case and advise them to reboot, just like
	we do when BLKRRPART fails for the same reason, unless the partition in
	question is unchanged.

	libparted: reenable use of BLKPG ioctls
	This patch effectively reverses commit 1d8f9bec which removed the code
	using the new BLKPG ioctls instead of the old BLKRRPART ioctl to update
	the in-kernel partition table.  The reason for this is because BLKRRPART
	fails if any partition on the disk is in use, but the BLKPG ioctls allow
	you to manipulate the other partitions on the disk without requiring a
	reboot.  Also BLKRRPART requires that the kernel understand the
	partition table on the disk, which may not always be the case.

2010-04-23  Hans de Goede  <hdegoede@redhat.com>

	linux: detect dm_task_run failure
	We were checking for a return value of < 0 for dm_task_run errors, but
	dm_task_run returns 0 on error (and 1 on success). Thanks to Joe Jin
	for spotting this, see Red Hat bug 582907.

	* libparted/arch/linux.c(_dm_remove_map_name, _dm_is_part,
	_dm_remove_parts, _dm_add_partition): dm_task_run returns 0 on error.

2010-04-21  Jim Meyering  <meyering@redhat.com>

	tests: test for palo and prep interaction
	* tests/t3300-palo-prep.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

2010-04-21  Hans de Goede  <hdegoede@redhat.com>

	dos: fix prep / palo flag handling
	Setting the prep flag was not clearing the palo flag and vice versa
	* libparted/labels/dos.c (msdos_partition_set_flag): Fix prep / palo
	flag handling.

2010-04-21  Jim Meyering  <meyering@redhat.com>

	tests: remove unnecessary (duplicate) local var assignment
	* tests/t9021-maxima.sh: Remove duplicate ss=$sector_size_.

2010-04-21  Colin Watson  <cjwatson@ubuntu.com>

	maint: make PED_ASSERT and PED_DEBUG if-safe
	Constructions such as:

	  if (foo)
	    PED_DEBUG (0, "foo");
	  else
	    PED_DEBUG (0, "not foo");

	did not compile reliably, depending on the configuration.  Make this
	work.

	* include/parted/debug.h [DEBUG && __GNUC__ && !__JSFTRACE__]
	(PED_DEBUG): Remove trailing semicolon.
	[!DEBUG] (PED_ASSERT): Use do-while rather than while.
	[!DEBUG] (PED_DEBUG): Likewise.

2010-04-17  Jim Meyering  <meyering@redhat.com>

	doc: add HACKING
	* HACKING: New file.  Copied from coreutils, with s/coreutils/parted/
	and a few minor edits.

2010-04-16  Petr Uzel  <petr.uzel@suse.cz>

	.gitignore: ignore index files generated by ctags and cscope

2010-04-16  Petr Uzel  <petr.uzel@suse.cz>

	libparted: add support for Linux software RAID arrays (mdraid)
	Recognize MD devices, so "parted -s /dev/md0 print" now prints
	"Model: Linux Software RAID Array (md)" instead of
	"Model: Unknown (unknown)".

	* include/parted/device.h (PedDeviceType): Add PED_DEVICE_MD.
	* libparted/arch/linux.c (MD_MAJOR): New define.
	* libparted/arch/linux.c (_device_probe_type): Recognize MD array.
	* libparted/arch/linux.c (linux_new): Handle MD array.
	* parted/parted.c(do_print): Add "md" to the list of available
	transports.
	* NEWS (New features): Mention it.

2010-04-13  Jim Meyering  <meyering@redhat.com>

	tests: propagate recent improvements to copied-from code
	* tests/t1700-ext-probe.sh: Fix typo s/2>1/2>&1/ and use
	a tighter regexp also in the preceding loop.
	Noted by Colin Watson.

2010-04-13  Colin Watson  <cjwatson@ubuntu.com>

	maint: constify ped_device_get_constraint interface
	* include/parted/device.h (ped_device_get_constraint): Constify "dev"
	parameter.
	* libparted/device.c (ped_device_get_constraint): Likewise.

2010-04-13  Colin Watson  <cjwatson@ubuntu.com>

	libparted: uninit_bg and flex_bg features should indicate ext4
	According to tune2fs(8), the uninit_bg and flex_bg features are only
	supported by ext4, so libparted should treat their presence as
	indicating ext4.  Reported by C de-Avillez in
	https://bugs.launchpad.net/ubuntu/+source/parted/+bug/561599.

	* libparted/fs/ext2/ext2_fs.h: Define EXT4_FEATURE_RO_COMPAT_GDT_CSUM
	and EXT4_FEATURE_INCOMPAT_FLEX_BG.
	* libparted/fs/ext2/interface.c (_ext2_generic_probe): Test for
	EXT4_FEATURE_RO_COMPAT_GDT_CSUM and EXT4_FEATURE_INCOMPAT_FLEX_BG when
	probing for ext4.
	* tests/t1700-ext-probe.sh: Test for this.
	* NEWS (Bug fixes): Mention this.

2010-04-09  Colin Watson  <cjwatson@ubuntu.com>

	libparted: fix diagnostics about exceeding partition limits
	* libparted/labels/pt-tools.c (ptt_partition_max_start_len): Use the
	correct value in the diagnostics that print the upper bound on
	partition size and largest starting sector number.  Before, each
	would use UINT32_MAX.  Now each prints the partition-table-specific
	limit.

2010-04-06  Hans de Goede  <hdegoede@redhat.com>

	libparted: add test for /dev/mapper symlink issue
	Sometimes, libparted operates on device mapper files with a path of
	/dev/mapper/foo.  With newer lvm versions /dev/mapper/foo is a symlink
	to /dev/dm-#. However some storage administration programs (anaconda,
	for example) may do the following:
	1) Create a ped_device for /dev/mapper/foo
	2) ped_get_device resolves the symlink to /dev/dm-#, and the path
	   in the PedDevice struct points to /dev/dm-#
	3) The program does some things to lvm, causing the symlink to
	   point to a different /dev/dm-# node
	4) The program does something with the PedDevice, which results
	   in an operation on the wrong device

	Newer libparted versions do not suffer from this problem, as they
	do not canonicalize device names under /dev/mapper. This test checks
	for this bug.

	* libparted/tests/symlink.c: New test which tests for this issue.
	* libparted/tests/t3000-symlink.sh: New file.
	* libparted/tests/Makefile.am: Include the new files.  Run the new test.

2010-04-06  Hans de Goede  <hdegoede@redhat.com>

	libparted: don't canonicalize /dev/mapper paths
	Besides fixing the issue displayed by libparted/tests/symlink.c,
	this has the added advantage that the output of parted p on one of these
	devices now says:
	"Disk /dev/mapper/BigVol2-lv_iscsi_disk2: 34.4GB"

	Which is a lot more user friendly then the output before this patch:
	"Disk /dev/dm-6: 34.4GB"

	* libparted/device.c (ped_device_get): Don't canonicalize names
	that start with "/dev/mapper/".
	* NEWS (Bug fixes): Mention it.
	Thanks to Ales Kozumplik for the analysis.
	Details in <http://bugzilla.redhat.com/577824>.

2010-03-30  Colin Watson  <cjwatson@ubuntu.com>

	doc: add @dircategory to Info documentation
	The Texinfo documentation says that Info files should use @dircategory,
	and suggests consulting the Free Software Directory to select a category
	name.  The directory places Parted under "System administration".

	* doc/parted.texi: Add `@dircategory System administration'.

2010-03-30  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	tests: disable new texinfo-acronym syntax-check from gnulib
	* cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.

	maint: avoid using test's -o and -a operators: they are not portable
	* tests/lvm-utils.sh: Don't use test ... -o.
	* configure.ac: Don't use test ... -a.

	maint: remove unneeded #include
	* libparted/disk.c: Don't include "intprops.h".  It was unused.

	build: prepare for gnulib's updated lib-ignore
	* parted/Makefile.am (parted_LDFLAGS): Now that we're using
	gnulib's newer lib-ignore, add $(IGNORE_UNUSED_LIBRARIES_CFLAGS).

2010-03-30  Colin Watson  <cjwatson@ubuntu.com>

	tests: distribute a few more tests and documentation files
	* debug/test/Makefile.am (noinst_SCRIPTS): Add test_fs_hfs and
	test_fs_hfsplus.
	* libparted/fs/hfs/Makefile.am (EXTRA_DIST): Add DOC and HISTORY.
	* tests/Makefile.am (TESTS): Add t3200-type-change.sh.

2010-03-16  Jim Meyering  <meyering@redhat.com>

	build: avoid warning from bootstrap about obsolete strdup module
	* bootstrap.conf (gnulib_modules): Use the strdup-posix module,
	rather than the "strdup" one.

2010-03-11  Jim Meyering  <meyering@redhat.com>

	tests: reenable a "bsd" partition table test
	* libparted/tests/common.c (_implemented_disk_label): Remove "bsd" from
	the list of not-implemented-yet partition table types, since it appears
	to pass the tests.

	libparted: remove "HIGHLY EXPERIMENTAL" warning for >512B-sector devices
	* libparted/arch/linux.c (_device_set_sector_size): Remove the
	"HIGHLY EXPERIMENTAL" warning, now that support for >512-byte sectors
	seems to be usable.  Suggested by Colin Watson.
	* NEWS (Changes in behavior): Note this

2010-03-02  David Cantrell  <dcantrell@redhat.com>

	libparted: msdos_partition_is_flag_available: fix hidden on extended
	Since the hidden flag cannot be set on extended partitions,
	msdos_partition_is_flag_available() should return 0 for hidden on
	extended partitions. Also change msdos_partition_get_flag()
	to always return 0 for hidden on extended partitions.
	* libparted/labels/dos.c (msdos_partition_is_flag_available):
	Return 0 for hidden on extended partitions.
	* libparted/labels/dos.c (msdos_partition_get_flag):
	Always return 0 for hidden on extended partitions.
	* NEWS (Bug fixes): Mention it.
	Reported by Flóki Pálsson in http://bugzilla.redhat.com/567118
	Patch forwarded by Hans De Goede.

2010-03-02  Petr Uzel  <petr.uzel@suse.cz>

	tests: skip tests that require mkfs.hfs, when it is unavailable
	t3000-resize-fs.sh would fails if mkfs.hfs is not installed.
	* tests/t-lib.sh (require_hfs_): New function.
	* tests/t3000-resize-fs.sh: Use require_hfs_.

2010-02-28  Jim Meyering  <meyering@redhat.com>

	tests: convert more tests to the newer infrastructure
	* tests/t1700-ext-probe.sh: Convert from test-lib.sh to t-lib.sh.
	* tests/t2200-dos-label-recog.sh: Likewise.
	* tests/t2300-dos-label-extended-bootcode.sh: Likewise.

2010-02-26  Colin Watson  <cjwatson@ubuntu.com>

	libparted: don't export linux_get_*_alignment functions
	These functions are only used in libparted/arch/linux.c or via
	linux_dev_ops, so do not export them.

	* libparted/arch/linux.c (linux_get_minimum_alignment): Declare static.
	(linux_get_optimum_alignment): Likewise.

2010-02-26  Petr Uzel  <petr.uzel@suse.cz>

	Add support for ATA over Ethernet (AoE) devices
	Recognize AoE Devices, so "parted -s /dev/etherd/eX.Y" now
	prints "Model: ATA over Ethernet Device (aoe)" instead of
	"Model: Unknown (unknown)".

	* include/parted/device.h(PedDeviceType): Add PED_DEVICE_AOE.
	* libparted/arch/linux.c(AOE_MAJOR): New define.
	* libparted/arch/linux.c(_device_probe_type): Recognize AoE devices.
	* libparted/arch/linux.c(linux_new): Handle AoE devices.
	* parted/parted.c(do_print): Add "aoe" to the list of available
	transports.
	* NEWS (New features): Mention it.

2010-02-26  Jim Meyering  <meyering@redhat.com>

	post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 2.2
	* NEWS: Record release date.

2010-02-26  Curtis  Gedak  <gedakc@gmail.com>

	dos: set HFS/HFS+ partition identifier to proper value
	The correct value for an "hfs" partition identifier is 0xAF.
	Previously the partition identifier was incorrectly set to 0x83.
	* libparted/labels/dos.c (PARTITION_HFS): Define.
	(msdos_partition_set_system): Use it.

2010-02-26  Jim Meyering  <meyering@redhat.com>

	tests: exercise today's HFS partition type fix
	* tests/t2400-dos-hfs-partition-type.sh: New script.
	* tests/Makefile.am: Add it.
	* NEWS (Bug fixes): Mention it.

	tests: gpt-pmbr: don't ignore stdout comparison result
	* tests/t0202-gpt-pmbr.sh: Fail if we get unexpected output.

2010-02-25  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest
	* bootstrap: Copy from gnulib.

	tests: convert t4001 to use the new framework
	* tests/t4001-sun-vtoc.sh: Convert.
	* tests/Makefile.am (TESTS): Add it to the list.

2010-02-25  Karel Zak  <kzak@redhat.com>

	sun: initialize basic partition table fields
	libparted completely ignores basic fields (version, nparts and sanity)
	in the sun VTOC, then for example fdisk prints warnings for such
	partition table:

		# fdisk -lu /dev/sdb
		Detected sun disklabel with wrong version [0x00000000].
		Detected sun disklabel with wrong sanity [0x00000000].
		Detected sun disklabel with wrong num_partitions [0].

	It seems that the current libparted sun support follows old Linux
	kernel code, but the code was changed 3 years ago (see kernel commit
	3961bae0ac030a70ae2e0578270203889021f1a1).

	Note that the number of partitions (nparts) is optional for Linux
	kernel, but fdisk(8) strictly requires SUN_DISK_MAXPARTITIONS (=8)
	there. This patch sets nparts to SUN_DISK_MAXPARTITIONS rather then
	use a real number of partitions.

	* NEWS (Bug fixes): Mention it.
	* libparted/labels/sun.c: Update from kernel.
	* tests/t4001-sun-vtoc.sh: New file.  Test for this.

2010-02-25  Jim Meyering  <meyering@redhat.com>

	tests: wrap the dup-clobber test in a script, ...
	so that its artifacts are created in the usual temporary subdir
	* tests/Makefile.am (TESTS): Remove dup-clobber, and instead...
	Add t0500-dup-clobber.sh.
	* tests/t0500-dup-clobber.sh: New script.

2010-02-23  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	tests: test for the ped_disk_duplicate needs_clobber fix
	* tests/dup-clobber.c: New file.
	Exercise the fix in commit jabb411b, "libparted: copy the
	needs_clobber value in ped_disk_duplicate()".
	* tests/Makefile.am (TESTS, check_PROGRAMS): Add dup-clobber.

2010-02-22  Hans de Goede  <hdegoede@redhat.com>

	libparted: copy the needs_clobber value in ped_disk_duplicate()
	Most duplicate disk_ops use ped_disk_new_fresh, which sets needs_clobber
	to 1. This would lead to clobbering the disk when committing a duplicate
	disk even when the original disk was not made with ped_disk_new_fresh.
	* libparted/disk.c (ped_disk_duplicate): Copy the needs_clobber member.
	* NEWS (Bug fixes): Describe it.

2010-02-22  Curtis Gedak  <gedakc@gmail.com>

	linux: add wait time and retries to kernel partition reread
	Occasionally when using parted with newer GNU/Linux kernels (2.6.31)
	and udev (145), the kernel would fail to reread the partition table.
	This could lead to problems with subsequent actions such as formatting
	the partition.

	Basically this patch increases the retry_count, and adds one sleep(1)
	function call prior to the the last few ioctl() calls.

	This patch might not be a perfect solution to this problem of "failure
	to inform kernel of partition changes", but it does significantly
	reduce the likelihood of encountering the problem.

	Details on the testing results and procedures used can be found at
	the following link:
	https://bugzilla.gnome.org/show_bug.cgi?id=604298#c9

	* libparted/arch/linux.c (_kernel_reread_part_table): Sleep for a
	full second if retry_count makes it down to "3".  Start it at 9
	rather than at 5.
	* NEWS (Bug fixes):

2010-02-20  Jim Meyering  <meyering@redhat.com>

	maint: remove now-unused <partition_table_type>_clobber functions
	All of these functions were rendered unused by commit 376b143045,
	"ped_disk_clobber: change semantics" on 2009-11-13.
	Also, Update each <...>_disk_ops "clobber:" member to be NULL.
	* libparted/labels/aix.c (aix_clobber): Remove function.
	* libparted/labels/bsd.c (bsd_clobber): Likewise.
	* libparted/labels/dasd.c (dasd_clobber): Likewise.
	* libparted/labels/dos.c (msdos_clobber): Likewise.
	* libparted/labels/dvh.c (dvh_clobber): Likewise.
	* libparted/labels/gpt.c (gpt_clobber): Likewise.
	* libparted/labels/loop.c (loop_clobber): Likewise.
	* libparted/labels/mac.c (_clobber_part_map, mac_clobber): Likewise.
	* libparted/labels/pc98.c (pc98_clobber): Likewise.
	* libparted/labels/rdb.c (amiga_clobber): Likewise.
	* libparted/labels/sun.c (sun_clobber): Likewise.
	Suggested by Hans De Goede.

2010-02-13  Jim Meyering  <meyering@redhat.com>

	doc: update release procedure to account for soname version number
	* README-release: Add a step "0", and update step 3 to match reality.

	libparted: set the shared library version number manually
	* libparted/Makefile.am (CURRENT, REVISION, AGE): Define here.
	(libparted_la_LDFLAGS): Use them, rather than using the
	automatically-defined LT_-prefixed variables.
	Stop using the "-release" option.
	Hans De Goede pointed out that the build process was automatically
	changing the shared library name.

2010-02-12  Jim Meyering  <meyering@redhat.com>

	gpt: clean-up wrt write_back (no semantic change)
	* libparted/labels/gpt.c (gpt_read): Initialize write_back to 0
	once again, and set it to 1 on the sole path that requires that.

2010-02-10  Jim Meyering  <meyering@redhat.com>

	gpt: "read-only" operation could clobber the pMBR in another way
	A read-only operation like "parted $dev print" would overwrite $dev's
	pMBR when exactly one of the primary and backup tables was corrupt.
	* libparted/labels/gpt.c (gpt_read): Clear "write_back" in those
	two cases.  Hans De Goede spotted this bug by inspection.
	* NEWS (Bug fixes): Mention it.
	* tests/t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh: New test.
	* tests/Makefile.am (TESTS): Add
	t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh.

	tests: factor utility functions into "library"
	...since we're about to use them from a second test.
	* tests/t-local.sh (peek_, poke_, gpt1_pte_name_offset_): New functions.
	(gpt_corrupt_primary_table_, gpt_restore_primary_table_): New functions.
	* tests/t0280-gpt-corrupt.sh: Remove local copies of those functions.
	Use the new ones.

2010-02-10  Hans de Goede  <hdegoede@redhat.com>

	dasd: don't dereference a NULL pointer in dasd_read
	* libparted/labels/dasd.c (dasd_read): Avoid NULL pointer dereference.

	parted: change default alignment to "optimal"
	* NEWS (Changes in behavior): Mention it.
	* parted/parted.c: Change --align default value to optimal.
	* tests/t2100-mkswap.sh: Adjust for alignment changes where necessary.
	* tests/t0220-gpt-msftres.sh: Likewise.
	* tests/t0280-gpt-corrupt.sh: Likewise.
	* tests/t2200-dos-label-recog.sh: Likewise.
	* tests/t2300-dos-label-extended-bootcode.sh: Likewise.
	* tests/t3000-resize-fs.sh: Likewise.
	* tests/t4100-msdos-partition-limits.sh: Likewise.
	* tests/t4100-msdos-starting-sector.sh: Likewise.
	* tests/t5000-tags.sh: Likewise.
	* tests/t8000-loop.sh: Likewise.
	* tests/t9021-maxima.sh: Likewise.

2010-02-10  Hans de Goede  <hdegoede@redhat.com>

	parted: change warnings when initial constrained mkpart fails
	In do_mkpart we first try to create a partition using a constraint
	derived from the user input intersected with the devices alignment
	needs. And if that fails we try again without any constraint.

	However the warning given when this happens only takes into account
	the user not getting what he asked for, while the alignment might be
	a problem too (or even the only problem). So this patch adds a check
	to see if the user really did not get what he asked before giving that
	warning, and adds a new check + warning to see if the created partition
	is properly aligned.
	*parted/parted.c (do_mkpart,do_mkpartfs): change warnings when initial
	constrained mkpart fails.

2010-02-10  Hans de Goede  <hdegoede@redhat.com>

	parted: honor --align option also in mkpartfs, resize and print cmds
	* parted/parted.c (do_mkpartfs,do_print,do_resize): Honor --align.

	linux: handle incomplete topology information
	The topology information returned by libblkid is not always complete
	(as the kernel does not always have complete information).
	This patch makes the linux_get_*_alignment() alignment functions handle
	this. The algorithm used for linux_get_optimum_alignment is:
	1) Always use the reported aligment offset as offset
	2a)If optimal io size is present in the topology info use that as grain
	2b)If optimal io size is not present in topology info and aligment
	   offset is 0 and minimum io size is a power of 2, use the device.c
	   default optimal alignment (grain 1MiB).
	2c) If neither 2a and 2b, use the minimum io size, or if that is not
	   defined, use the physical sector size as grain (iow the minimum
	   alignment).
	The algorithm used for linux_get_minimum_alignment is:
	1) Always use the reported aligment offset as offset
	2) Use the minimum io size, or if that is not defined the physical
	   sector size as grain.
	* libparted/arch/linux.c (linux_get_*_alignment): Handle incomplete
	topology information.

	libparted: Give device_get_*_alignment sane defaults
	When the topology info is incomplete or non existent, return something
	more sensible than NULL (which ends up being interpreted as
	PedAlignmentAny in most cases). The default minimum alignment aligns to
	physical sector size, the default optimal alignment is 1 MiB, which is
	what vista and windows 7 do.
	* libparted/device.c (device_get_*_alignment): Add default aligments.
	* NEWS (New features): Mention it.

	linux: correct phys_sector_size setting
	1) Use the logical sector size as physical sector size instead of 512
	   when not compiled with libblkid support, this fixes problems
	   with logical sector size > physical sector size.
	2) blkid_topology_get_physical_sector_size() returns 0 when it fails
	   to determine the physical sector size, handle this.
	* libparted/arch/linux.c (_device_set_sector_size): Correct
	phys_sector_size setting.
	* NEWS (Bug fixes): Mention it.

2010-02-09  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	doc: NEWS: mention the install-related bug fix
	* NEWS (Bug fixes): Mention the fix.

	gpt: read-only operation could clobber MBR part of hybrid GPT+MBR table
	* libparted/labels/gpt.c (gpt_read): Fix a bug introduced by me in
	commit 7f753b1b, "gpt: rewrite GPT header-reading code".
	Set write_back=0 in one more code path.
	* tests/Makefile.am (TESTS): Add t0205-gpt-list-clobbers-pmbr.sh.
	* tests/t0205-gpt-list-clobbers-pmbr.sh: New test.
	* NEWS (Bug fixes): Mention this.
	Reported by aix27249 in
	http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/250

2010-02-08  Peter Breitenlohner  <peb@mppmu.mpg.de>

	do not install the test programs disk and label

2010-02-04  Otavio Salvador  <otavio@ossystems.com.br>

	Fix minor spelling errors
	This fixes minor spelling errors in the source code. Basically:

	 s/informations/information/g
	 s/prefered/preferred/g

2010-02-04  Jim Meyering  <meyering@redhat.com>

	tests: avoid another spurious test failure with newer xfsprogs
	* tests/t4100-msdos-partition-limits.sh: Likewise.

	tests: avoid spurious test failure with newer xfsprogs
	* tests/t4100-dvh-partition-limits.sh: Use mkfs.xfs' -f (force)
	option.  It is required at least for xfsprogs-3.1.0.

2010-01-31  Hans de Goede  <hdegoede@redhat.com>

	build: fix check-other-sector_sizes
	"make check-other-sector_sizes" was running tests of 512-byte sectors
	four times, rather than simulating larger sector-sizes for the latter
	three iterations.
	* Makefile.am (ss-1024 ss-2048 ss-4096): Fix the typo (missing "subst").

2010-01-31  Jim Meyering  <meyering@redhat.com>

	tests: adjust t9021-maxima not to fail with 2048-byte sectors
	* tests/t9021-maxima.sh: At 10,000*512 bytes, the backing file
	was too small to support a test simulating a sector size of 2048 bytes.
	Use 10,000*$sector_size bytes instead.

	build: avoid -Wshadow warnings
	* parted/parted.c (do_print): Avoid two shadowing warnings.

2010-01-29  Hans de Goede  <hdegoede@redhat.com>

	linux: remove PED_DEVICE_FILE check from _device_set_sector_size
	_device_set_sector_size is never called for devices with a type of
	PED_DEVICE_FILE.
	* libparted/arch/linux.c (_device_set_sector_size): Remove
	PED_DEVICE_FILE check.

	linux: remove unused blkpg.h header file
	* libparted/arch/linux.c: Don't include blkpg.h.
	* libparted/arch/blkpg.h: Deleted.
	* libparted/Makefile.am (libparted_la_SOURCES): Remove arch/blkpg.h.

	linux: use blkid_topology_get_physical_sector_size
	The official 2.17 release of util-linux-ng, has added a function to
	get the physical sector size.  Use that instead of getting the
	minimum io size.
	* libparted/arch/linux.c (_device_set_sector_size): Use
	blkid_topology_get_physical_sector_size.

2010-01-18  Jim Meyering  <meyering@redhat.com>

	maint: remove unreachable code
	* parted/parted.c (do_print): Remove unreachable ped_disk_destroy call.

2010-01-15  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	dos: don't leak a constraint upon partition-add failure
	* libparted/labels/dos.c (read_table): Free constraint upon failure.

	gpt: don't leak a constraint upon partition-add failure
	* libparted/labels/gpt.c (gpt_read): Free constraint upon failure.

	gpt: do not leak a GPT header on an error path
	* libparted/labels/gpt.c (gpt_write): Avoid a leak by freeing the
	header buffer after pth_get_raw call where it's used, but before
	checking whether that pth_get_raw call succeeded.
	Avoid another leak in identical just 10 lines down.
	Add "FIXME: caution..." comments to warn about the duplication.

	libparted: remove unreachable code
	* libparted/labels/gpt.c (gpt_write): Remove dead code.
	* libparted/labels/bsd.c (bsd_partition_new): Likewise.
	* libparted/disk.c (_ped_disk_alloc): Likewise.

	libparted: avoid double-free on an OOM failure path
	* libparted/disk.c (ped_disk_check): Don't double-free "fs_size".

2010-01-08  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	maint: update old_NEWS_hash
	* cfg.mk (old_NEWS_hash): Update for GFDL license update.

	maint: update all GFDL licenses to version 1.3
	* NEWS: Use 1.3, not 1.2.
	* doc/API: Use 1.3, not 1.1.
	* doc/FAT: Likewise.
	* doc/USER.jp: Likewise.
	* doc/fdl.texi: Likewise.
	* doc/parted-pt_BR.texi: Likewise.
	* doc/parted.texi: Likewise.

	maint: update all FSF copyright year lists to include 2010
	Run this command: make update-copyright

	maint: record update-copyright options for this package
	* cfg.mk: Next time, just run "make update-copyright".

2009-12-31  Jim Meyering  <meyering@redhat.com>

	maint: newer gnulib; don't hard-code my GPG key ID
	* cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it.
	* gnulib: Update to latest.

2009-12-20  Jim Meyering  <meyering@redhat.com>

	maint: make build-aux/gnu-web-doc-update work
	* cfg.mk (manual_title): Define.
	* doc/parted.texi (Concept index): Rename from "Index".
	Remove @ifnotplaintext..@end around its menu entry.

	post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 2.1
	* NEWS: Record release date.

	doc: NEWS: mention the flag-truncation fix
	* NEWS (Bug fixes): Mention it.

2009-12-19  Hans de Goede  <hdegoede@redhat.com>

	dos: honor cylinder alignment disk flag when allocating metadata
	* libparted/labels/dos.c (add_startend_metadata): Honor cylinder
	alignment flag.

2009-12-18  Hans de Goede  <hdegoede@redhat.com>

	libparted: push/pop update mode around ped_disk_set_flag
	Disk flags can change how the metadata gets allocated, so push/pop
	update mode around ops->disk_set_flag, so that the metadata gets
	re-allocated.
	* libparted/disk.c (ped_disk_set_flag): push/pop update mode.

	linux: fix use-after-free in devicemapper code
	* libparted/arch/linux.c (_dm_add_partition): Fix use of dm_task
	information after freeing it.

2009-12-18  Hans de Goede  <hdegoede@redhat.com>

	ui: Do not truncate flag names when printing
	The partition_print_flags() function was truncating the flag names,
	but these are translated strings, and thus can contain multibyte
	characters. Truncating multibyte chars in a non multibyte aware way
	is not good and was causing issues when printing tables in Russian:
	http://bugzilla.redhat.com/show_bug.cgi?id=543029

	Since the truncating does not seem to make sense at all this patch
	simply removes it (it was likely an attempt to stay within 80 chars
	when printing, but as one partition can have multiple flags set this
	won't work)

	* parted/parted.c (partition_print_flags): Don't truncate flag names.

2009-12-16  Jim Meyering  <meyering@redhat.com>

	libparted: plug a leak in mac_write
	* libparted/labels/mac.c (mac_write): Free mac_driverdata.

	maint: use "int", not "bool" for value returned by ped_device_write
	* libparted/labels/gpt.c (gpt_write): Correct type of local.
	* libparted/labels/mac.c (mac_clobber): Likewise.
	* libparted/labels/sun.c (sun_write): Likewise.

	libparted: plug a leak in mac's write_block_zero
	* libparted/labels/mac.c (write_block_zero): Don't leak a
	1-sector-sized buffer.

	dos: remove unreachable code
	* libparted/labels/dos.c (msdos_partition_new): Remove dead code.

	libparted: plug a leak in gpt_probe
	* libparted/labels/gpt.c (gpt_probe): Avoid a leak when dev->length
	is one sector or smaller.

2009-12-14  Jim Meyering  <meyering@redhat.com>

	maint: improve dist-check.mk rules
	* dist-check.mk (null_AM_MAKEFLAGS): Remove LIBTOOL.  Adding it was
	erroneous, since it is required when building from a distribution
	tarball of a libtool-using project.  Reported by Ralf Wildenhues.
	(my-distcheck): Reorganize to use a subshell and set -e, so that
	failures propagate "out".  Without this change, setting LIBTOOL=false
	would cause a failure that would then be ignored, probably due to a
	problem in $(install-transform-check).

	maint: dist-check.mk adapt to parted-specific details
	* dist-check.mk (built_programs): Use parted/, not src/.
	(install-transform-check): Search sbin/, not /bin.
	Expect man pages to be in man8/*.8.

2009-12-13  Jim Meyering  <meyering@redhat.com>

	maint: sync dist-check.mk from coreutils
	* dist-check.mk: Sync from coreutils.
	* gnulib: Update to latest.

	maint: sync dist-check.mk from coreutils
	* dist-check.mk: Sync from coreutils.
	* gnulib: Update to latest.

2009-12-12  Jim Meyering  <meyering@redhat.com>

	build: distribute gperf-generated file, pt-limit.c
	* libparted/labels/Makefile.am (EXTRA_DIST): Distribute the
	gperf-generated file, pt-limit.c, so that people don't need to
	run gperf at build-from-tarball time.

	ui: mkpart: avoid double free
	* parted/parted.c (do_mkpart): This function frees "part_name"
	immediately after the final use, but also upon e.g., ped_disk_commit
	failure.  Set part_name to NULL after the first free, to make
	the second a no-op after the first.

2009-12-11  Jim Meyering  <meyering@redhat.com>

	build: update spec: gperf is a new build-requirement
	* parted.spec.in (BuildRequires): Add gperf.
	Reported by Jeff Darcy.

	build: update gnulib submodule to latest

	tests: ensure that parted can partition a loop device
	* tests/t8000-loop.sh: Reverse sense of tests, now that
	partitioning a loop device succeeds again.
	* NEWS (Bug fixes): Mention it.

2009-12-11  Hans de Goede  <hdegoede@redhat.com>

	linux: treat loopback devices as files
	We cannot do partition related ioctl's on loopback devices,
	so treat them as files.
	* libparted/arch/linux.c (LOOP_MAJOR): Define.
	* libparted/arch/linux.c (_device_probe_type): Treat loopback
	devices as files.
	Reported by Josef Bacik in http://bugzilla.redhat.com/546622

2009-12-10  Hans de Goede  <hdegoede@redhat.com>

	libparted: missing pop update mode in ped_disk_delete_all error path
	* libparted/disk.c(ped_disk_delete_all): Add missing update mode pop
	call in error path.

	libparted: make pop/push update mode propagate sanity check errors
	Sanity check errors indicate something is really really wrong, still
	sometimes they happen, when they happen it helps a lot in debugging
	them when the libparted caller immediately errors out at the first
	moment, rather then slugging along until things crash somewere.
	* libparted/disk.c(_disk_push_update_mode,_disk_pop_update_mode):
	Change return value from void to int, and return 0 when the sanity
	check calls fail.
	* libparted/disk.c(*): Update all _disk_push_update_mode /
	_disk_pop_update_mode callers to propagate the return value.

2009-12-10  Joel Granados Moreno  <jgranado@redhat.com>

	libparted: add missing update mode pop in duplicate error path
	* libparted/disk.c(ped_disk_duplicate): Add missing update mode
	pop call in error path.

	gpt: Add support for appletv partitions
	* include/parted/disk.h(PedPartitionFlag): Add
	PED_PARTITION_APPLE_TV_RECOVERY.
	* libparted/disk.c(ped_partition_flag_get_name): Handle
	PED_PARTITION_APPLE_TV_RECOVERY.
	* libparted/labels/gpt.c(PARTITION_APPLE_TV_RECOVERY_GUID):
	New define.
	* libparted/labels/gpt.c(GPTPartitionData): Add atvrecv member.
	* libparted/labels/gpt.c(_parse_part_entry, gpt_partition_new,
	gpt_partition_set_system, gpt_partition_set_flag,
	gpt_partition_get_flag, gpt_partition_is_flag_available):
	Handle atvrecv / PARTITION_APPLE_TV_RECOVERY_GUID.

	build: don't install s390 dasd internal headers into /usr/include
	* include/parted/Makefile.am (partedinclude_HEADERS):
	Remove $(S390_HDRS).
	(noinst_HEADERS): Put them here instead.

2009-12-10  Hans de Goede  <hdegoede@redhat.com>

	ui: add --align command-line option to specify mkpart alignment
	The new --align command-line option can have the following values:
	none:     Use the minimum alignment allowed by the disk type
	cylinder: Align partitions to cylinders (the default)
	minimal: Use minimum alignment as given by the disk topology information
	optimal: Use optimum alignment as given by the disk topology information

	Note the "minimal" and "optimal" values will use layout information
	provided by the disk to align the logical partition table addresses
	to actual physical blocks on the disks.  The "minimal" value is the
	minimum aligment needed to align the partition properly to physical
	blocks, which avoids performance degradation.  Whereas the "optimum"
	alignment align's to a multiple of the physical block size in a way
	that guarantees optimal performance.

	The "minimal" and "optimal" values are useful only when parted is
	compiled with libblkid >= 2.17 and running on a kernel >= 2.6.31,
	otherwise they are equivalent to --align=none.

	* parted/parted.c (ALIGNMENT_ enum values): New enum.
	(options, options_help): Add --align option.
	(align_args, align_types, alignment): New global variables.
	(do_mkpart): Honor aligment variable.
	(_parse_options): handle --align option.
	* bootstrap.conf (gnulib_modules): Add argmatch.
	* NEWS: Mention the new --align option.
	* doc/parted.texi: Document --align option.
	* doc/C/parted.8: Likewise.

2009-12-10  Hans de Goede  <hdegoede@redhat.com>

	NEWS: update with libblkid and kernel requirements for alignment funcs
	* NEWS: Change the note for the align-check command to also reference
	libblkid, add a note to the libparted alignment functions NEWS entry
	about libblkid and kernel requirements.

	NEWS: Add new disk flag functions to NEWS
	* NEWS: Add new disk flag functions.

	msdos, sun: implement disk flag operations
	* libparted/labels/dos.c (DosDiskData): New struct.
	* libparted/labels/dos.c (msdos_alloc, msdos_duplicate, msdos_free):
	Handle per disk DosDiskData.
	* libparted/labels/dos.c (msdos_disk_set_flag, msdos_disk_get_flag,
	msdos_disk_is_flag_available): New functions.
	* libparted/labels/sun.c (sun_disk_set_flag, sun_disk_get_flag,
	sun_disk_is_flag_available): New functions.

2009-12-10  Hans de Goede  <hdegoede@redhat.com>

	libparted: add disk flag functions and PED_DISK_CYLINDER_ALIGNMENT flag
	Sometimes we want to be able to set flags at the disk level rather then
	at the parition level, to influence how new partitions will be created
	for example.  This patch adds functions to do this (modelled after the
	partition flag functions), and adds a PED_DISK_CYLINDER_ALIGNMENT flag.

	This flag (which defaults to true) controls if disk types for which
	cylinder alignment is optional do cylinder alignment when a new
	partition gets added. This flag is available for msdos and sun
	disklabels (for sun labels it only controls the aligning of the end of
	the partition).
	* include/parted/disk.h (PedDiskFlag): New type
	* include/parted/disk.h (ped_disk_set_flag, ped_disk_get_flag,
	ped_disk_is_flag_available): new functions and PedDiskOps members
	* include/parted/disk.h (ped_disk_flag_get_name,
	ped_disk_flag_get_by_name, ped_disk_flag_next): new functions
	* libparted/disk.c (ped_disk_set_flag, ped_disk_get_flag,
	ped_disk_is_flag_available, ped_disk_flag_get_name,
	ped_disk_flag_get_by_name, ped_disk_flag_next): new functions

2009-12-10  Hans de Goede  <hdegoede@redhat.com>

	dasd: fix leak in dasd_free
	* libparted/labels/dasd.c (dasd_free): Free disk_specific data.

2009-12-09  Jim Meyering  <meyering@redhat.com>

	build: update gnulib submodule to latest

	build: make it clear which sector size is in use upon test failure
	* Makefile.am (ss-1024 ss-2048 ss-4096): New targets.
	Before this, top-level "make check" would lead to four separate
	runs through all the regression tests, one for each of the following
	simulated sector sizes: 1024 2048 4096, and one more for the native
	(usually 512), and it was not easy to tell which sector size was
	in use for a failing test.  Now, we still perform exactly the same
	tests, but the sector size is now part of each target name.

2009-12-08  Jim Meyering  <meyering@redhat.com>

	tests: exercise the new interfaces
	* tests/print-max.c: New file.
	* tests/t9021-maxima.sh: New file.
	* tests/Makefile.am (TESTS): Add t9021-maxima.sh.
	(check_PROGRAMS): Add print-max.

	libparted: new interfaces: max start sector, max partition length
	* libparted/disk.c (ped_disk_max_partition_start_sector): New function.
	(ped_disk_max_partition_length): New function.
	* include/parted/disk.h: Declare them.
	* NEWS (New features): Mention them.

	libparted: factor out duplication, hook up new APIs
	* include/parted/disk.h [struct _PedDiskOps]:
	(max_length, max_start_sector): New members.
	* libparted/labels/pt-common.h: New file.
	* libparted/labels/Makefile.am (liblabels_la_SOURCES): Add it.
	* libparted/labels/dos.c: Include "pt-common.h".
	(msdos_partition_check): Remove function.
	(msdos_disk_ops): Remove factored out initializers.
	* libparted/labels/gpt.c: Likewise.
	* libparted/labels/dvh.c: Likewise.
	* libparted/labels/aix.c:
	(aix_disk_ops, aix_partition_check): Likewise.
	* libparted/labels/bsd.c:
	(bsd_disk_ops, bsd_partition_check): Likewise.
	* libparted/labels/dasd.c:
	(dasd_disk_ops, dasd_partition_check): Likewise.
	* libparted/labels/loop.c:
	(loop_disk_ops, loop_partition_check): Likewise.
	* libparted/labels/mac.c:
	(mac_disk_ops, mac_partition_check): Likewise.
	* libparted/labels/pc98.c:
	(pc98_disk_ops, pc98_partition_check): Likewise.
	* libparted/labels/rdb.c:
	(amiga_disk_ops, amiga_partition_check): Likewise.
	* libparted/labels/sun.c:
	(sun_disk_ops, sun_partition_check): Likewise.
	* libparted/labels/gpt.c (NULL_IF_DISCOVER_ONLY): Remove definition,
	now that it's in pt-common.h.

	libparted: use gperf-generated lookup function
	* libparted/labels/pt-tools.c (ptt_partition_max_start_len):
	Rewrite to use the gperf-generated look-up function.
	(ptt_partition_max_start_sector): New function.
	(ptt_partition_max_length): New function.
	* libparted/labels/pt-tools.h: Declare them.
	* libparted/labels/Makefile.am (GPERF, GPERF_OPTIONS): Define.
	(BUILT_SOURCES): Define.
	(liblabels_la_SOURCES): Append pt-limit.gperf.
	(pt-limit.c): New rule.
	(MAINTAINERCLEANFILES): Remove useless definition.
	(DISTCLEANFILES): Set to $(BUILT_SOURCES).
	* libparted/labels/pt-limit.gperf: New file.
	* cfg.mk (bootstrap-tools): Mention gperf.
	* bootstrap.conf (buildreq): Require gperf-3.0.3.

	pc98: avoid segfault with simulated large sectors
	The pc98 partition table is by no means ready for >512-byte sectors,
	but at least it now gets past mklabel.  E.g., this usage no longer
	provokes double-free and read-uninitialized errors:
	dd if=/dev/zero of=F bs=512 count=1 seek=10000
	PARTED_SECTOR_SIZE=4096 valgrind ../parted/parted -s F mklabel pc98
	* libparted/labels/pc98.c (pc98_write): Rewrite to avoid
	invalid access with >512-byte sectors.

	libparted: ptt_read_sectors: new function
	* libparted/labels/pt-tools.c (ptt_read_sectors): New function.
	(ptt_read_sector): Rewrite to use it.
	* libparted/labels/pt-tools.h: Declare it.

2009-12-03  Jim Meyering  <meyering@redhat.com>

	mac: hook up the partition_check function for this partition table type
	* libparted/labels/pt-tools.c (ptt_partition_max_start_len): Define
	for MAC partition tables.  They too have 32-bit-limited partition
	starting sector number and partition length (in sectors).
	* libparted/labels/mac.c (mac_partition_check): Use
	ptt_partition_max_start_len.

2009-11-30  Jim Meyering  <meyering@redhat.com>

	tests: exercise new align-check command
	* tests/t9030-align-check.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

2009-11-30  Jim Meyering  <meyering@redhat.com>

	ui: new command: align-check TYPE N
	e.g.,
	  parted -s /dev/sda align-check min 1 && echo partition 1 is min-aligned
	  parted -s /dev/sda align-check opt 2 && echo partition 2 is opt-aligned

	* parted/parted.c:
	* parted/ui.c:
	* parted/ui.h:
	* NEWS (New features): Mention it.
	* doc/parted.texi (align-check): Describe it.

2009-11-30  Jim Meyering  <meyering@redhat.com>

	tests: correct a comment
	* tests/t9020-alignment.sh: Correct a comment.

2009-11-27  Jim Meyering  <meyering@redhat.com>

	libparted: ped_disk_clobber_exclude: remove now-unused function
	I see no utility in ped_disk_clobber_exclude (just a thin wrapper
	around ped_disk_clobber), so am removing the interface.
	* include/parted/disk.h (ped_disk_clobber_exclude): Remove prototype.
	* libparted/disk.c (ped_disk_clobber_exclude): Remove function.
	Now that all callers use NULL as 2nd argument, replace each call
	with one to ped_disk_clobber.
	* scripts/data/abi/baseline_symbols.txt: Remove it.

	Reviewed-by: Karel Zak <kzak@redhat.com>

2009-11-27  Jim Meyering  <meyering@redhat.com>

	ped_disk_clobber: change semantics
	Why?  Because if we're going to clobber a partition table,
	it is wasteful and error prone to try to interpret as a partition
	table whatever existing data there may be.  It may be corrupt, or
	a mix of two or more types.  It is far cleaner just to zero out
	the key sectors.

	The previous mechanism was like this:
	for each partition table type, T,
	    # See if the device has a partition of type T.
	    # If so, run the partition-table-specific code to clear it.
	    if t->ops->probe (dev)
	      t->ops->clobber (dev)
	Instead, simply zero out the first few and last few sectors.
	Except for GPT, for which we exempt the first sector (the pMBR).
	In order to zero out even the bits DASD uses for its identifying
	strings, we have to clobber at least the 8.5KiB at the beginning
	of the disk, so round up to 9KiB.
	* libparted/disk.c: Include "labels/pt-tools.h".
	(find_disk_type): New helper function.
	(ped_disk_clobber_exclude):

	Reviewed-by: Karel Zak <kzak@redhat.com>

2009-11-27  Jim Meyering  <meyering@redhat.com>

	dasd: allow the use of a *regular* backing file
	Before this change, dasd partition tables had to be associated with
	very specialized block devices available only on IBM s390 systems.
	This made testing especially hard.  Not only did you need access
	to one of those relatively uncommon systems, but you also needed
	access to a spare block device.  In addition, many of Parted's
	tests may be run as a non-privileged user, using regular files,
	and those tests would fail when run on an s390.

	This change makes it so you may now write a DASD partition table
	to a regular backing file, just as you may with any other supported
	partition table type.  However, note that even now, DASD support
	is conditionally compiled and hence enabled only when compiling
	for an s390 target.

	* libparted/arch/linux.c (_device_set_sector_size) [__s390__]:
	Allow operation on a device of type PED_DEVICE_FILE, as well as
	those of type PED_DEVICE_DASD.
	* libparted/labels/fdasd.c: Include <parted/device.h>.
	(fdasd_get_geometry): Add a new "dev" parameter, required for
	dev-phys-sector_size, which is needed in order to initialize
	the "anc" structure without using the device-specific ioctls.
	When file descriptor "f" refers to a regular file, initialize
	"anc", "dasd_info", etc. from other sources (fstat and dev->).
	Update all callers to reflect added parameter.
	(fdasd_check_api_version): Skip ioctl-calling tests when "f" is
	a regular file.
	* include/parted/fdasd.h: Update fdasd_get_geometry prototype.
	* libparted/labels/dasd.c (dasd_probe): Also allow PED_DEVICE_FILE.
	(dasd_alloc_metadata): Initialize arch_specific->real_sector_size,
	which is used in calculating vtoc_end.

	Reviewed-by: Karel Zak <kzak@redhat.com>

2009-11-27  Jim Meyering  <meyering@redhat.com>

	loop: simplify/correct loop_clobber
	Before, it would clear a sector only if it recognized its own
	signature.  In addition, it would continue clearing subsequent
	sectors as long as loop_probe succeeded.  Now we simply clear
	the first sector.
	* libparted/labels/loop.c (loop_clobber): Simplify.

	Reviewed-by: Karel Zak <kzak@redhat.com>

2009-11-26  Jim Meyering  <meyering@redhat.com>

	tests: indicate that we expect t3200-type-change to fail, for now
	* tests/Makefile.am (TESTS): Move t3200-type-change.sh to ...
	(XFAIL_TESTS): ...here.

2009-11-24  Jim Meyering  <meyering@redhat.com>

	tests: correct t3200-type-change.sh
	* tests/t3200-type-change.sh: The initial version was incomplete.

	tests: provide a new function: fail_
	* tests/t-lib.sh (fail_): New function.

	tests: t0001-tiny.sh: avoid spurious failure when run as root.
	* tests/t0001-tiny.sh: Control characters were getting in the way.
	Filter them out.

2009-11-23  Jim Meyering  <meyering@redhat.com>

	dasd: avoid NULL-dereference via disk->type->ops->partition_check
	Commit f387fee8 added the new ops->partition_check() function,
	and a <type>_partition_check function for each partition table
	format _except_ dasd.  This change adds one for dasd, too.
	* libparted/labels/dasd.c: Include "pt-tools.h".
	(dasd_partition_check): New function.
	* libparted/labels/pt-tools.c (ptt_partition_max_start_len): Add "dasd"
	to the list of partition table type names for which the 32-bit
	limits on starting sector and partition length apply.
	Correct a comment.
	Considering the 32-bit fields in "struct fdasd_hd_geometry",
	it is safe to assume that larger offset or size is not possible.

2009-11-18  Jim Meyering  <meyering@redhat.com>

	build: "make stable" emitted an invalid gnupload command
	* cfg.mk (gnu_ftp_host-stable): Rename from gnu_ftp_host-major.

2009-11-17  Jim Meyering  <meyering@redhat.com>

	test for partition-type-changing bug
	* tests/t3200-type-change.sh: New file.
	* tests/Makefile.am (TESTS): Add it.

2009-11-13  Jim Meyering  <meyering@redhat.com>

	gpt: greatly simply gpt_clobber; minor semantic change, too
	* libparted/labels/gpt.c (gpt_clobber): Don't bother to read and
	parse existing headers.  Instead, simply clear three sectors:
	the pMBR, the primary header (LBA1), and the last sector.
	There is no point in clearing what the primary header says is the
	AlternateLBA, since once the primary header and the last sector
	are cleared, there is no risk of any tool using it by mistake.

	tests: t0000-basic.sh: minor correction
	* tests/t0000-basic.sh: When zeroing out the first sector,
	use dd's conv=notrunc.  Otherwise, we'd also truncate the
	backing file size to 4KiB.

	linux_read: give a proper diagnostic for an "end of file" error
	Before today's gpt_probe bug fix, its test case would provoke
	an invalid diagnostic.  This makes the diagnostic useful.
	* libparted/arch/linux.c (linux_read): When hitting EOF while reading,
	diagnose it properly, rather than via strerror(0) (i.e., "Success").

	gpt_probe: don't attempt to read beyond end of a very small disk
	* libparted/labels/gpt.c (gpt_probe): Don't try to read the
	2nd sector if that's beyond the end of the disk.
	* tests/t0001-tiny.sh: New test, to expose the above boundary-case bug.
	Part of the msdos-partition-creation process involves probing for
	other types of partition tables.  Probing for gpt would evoke a
	nonsensical diagnostic.
	* tests/Makefile.am (TESTS): Add t0001-tiny.sh.

	dvh: replace open-coded dvh_clobber with equivalent, shorter code
	* libparted/labels/dvh.c (dvh_clobber): Simply use ptt_clear_sectors.

	tests: weaken t0202-gpt-pmbr to assume a preexisting GPT table
	* tests/t0202-gpt-pmbr.sh: Lay down an initial GPT table before
	writing to the MBR, so this test passes with the new semantics.

	tests: rewrite t0202 to use new framework
	* tests/t0202-gpt-pmbr.sh: Rewrite.

	ped_disk_type_get_next: fix a const-correctness bug
	* libparted/disk.c (ped_disk_type_get_next): Make param const.
	* include/parted/disk.h (ped_disk_type_get_next): Update prototype.

2009-11-12  Hans de Goede  <hdegoede@redhat.com>

	NEWS: mention recent changes

2009-11-12  Jim Meyering  <meyering@redhat.com>

	maint: more const-correctness fixes

2009-11-12  Hans de Goede  <hdegoede@redhat.com>

	dasd: fix ped_disk_new_fresh to not read old data from disk
	dasd_write(), was reading the volume label from the disk (trough
	fdasd_check_volume()) and later writing it back again, this is fine for
	existing dasd labels, but when creating a fresh label, this would
	also cause the old volume label to be re-used, and if the old label
	was corrupt, it would cause fdasd_check_volume() and thus dasd_write()
	to fail.  Reported here: http://bugzilla.redhat.com/533808

	* libparted/arch/linux.c: include fdasd.h.
	(init_dasd): Do BIODASDINFO ioctl, and store the dasd devno in
	arch_specific.
	(init_dasd): Remove dead (never reached) code.
	* libparted/arch/linux.h (struct _LinuxSpecific): Add devno member.
	* libparted/labels/dasd.c (DasdDiskSpecific): add vlabel member.
	(dasd_alloc): Init DasdDiskSpecific.vlabel for fresh disks
	(dasd_read): Store read vlabel in DasdDiskSpecific.vlabel.
	(dasd_write): Write DasdDiskSpecific.vlabel instead of on disk vlabel.

2009-11-10  Jim Meyering  <meyering@redhat.com>

	build: avoid s390-specific compilation failiure
	* libparted/labels/vtoc.c (vtoc_volume_label_init): Don't use
	strncpy to copy 84 bytes into a 4-byte field.  Instead, use
	memcpy to copy "sizeof *vlabel" bytes into the "vlabel".

	maint: fix s390-specific const correctness problems
	* libparted/labels/vtoc.c (vtoc_error, vtoc_ebcdic_enc):
	(vtoc_ebcdic_dec): Declare parameters to be const, as required.
	* libparted/labels/fdasd.c (fdasd_error): Likewise.
	* include/parted/vtoc.h (vtoc_ebcdic_enc, vtoc_ebcdic_enc): Update
	prototypes.

	gpt: fix a bug in the new PE-array CRC checks on big-endian systems
	* libparted/labels/gpt.c (check_PE_array_CRC, gpt_read): Always
	convert the PartitionEntryArrayCRC32 to CPU endianness before
	comparing with a just-computed CRC.

2009-11-08  Jim Meyering  <meyering@redhat.com>

	build: use gnulib's canonicalize-lgpl module
	Replace Parted's private version of canonicalize_file_name.
	* libparted/device.c: Include <stdlib.h>.
	(canonicalize_file_name) [!HAVE_CANONICALIZE_FILE_NAME]:
	Remove definition.
	* bootstrap.conf (gnulib_modules): Add canonicalize-lgpl.

2009-11-07  Jim Meyering  <meyering@redhat.com>

	libparted: linux: don't deref NULL upon failed malloc or realloc
	* libparted/arch/linux.c (_read_fd): Handle allocation failure.

	build: update gnulib submodule to latest

	maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exit
	Convert all uses automatically, via these two commands:
	git grep -l '\<exit *(1)'|xargs --no-run-if-empty \
	  perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/'
	git grep -l '\<exit *(0)'|xargs --no-run-if-empty \
	  perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/'
	* libparted/fs/fat/table.c (fat_table_get): Use symbolic exit codes.
	* libparted/labels/vtoc.c (vtoc_update_format5_label_add): Likewise.
	(vtoc_update_format5_label_del): Likewise.
	(vtoc_update_format7_label_add): Likewise.
	(vtoc_update_format7_label_del): Likewise.
	* m4/parted.m4 (PARTED_CHECK_LIBPARTED): Likewise.
	* parted/parted.c (do_quit): Likewise.
	* parted/strlist.c (gettext_to_wchar, wchar_to_str): Likewise.
	* parted/ui.c (reset_env, help_msg, non_interactive_mode): Likewise.

2009-11-06  Hans de Goede  <hdegoede@redhat.com>

	dasd: fix unused variable warning
	* libparted/labels/dasd.c (dasd_get_partition_alignment): Fix unused
	variable warning.

	linux: use cached major minor instead of statting the device again
	* libparted/arch/linux.c (_dm_remove_parts): Use cached major/minor
	numbers.

2009-11-06  Hans de Goede  <hdegoede@redhat.com>

	linux: use devicemapper task name instead of device node name
	Use devicemapper task name instead of device node name as basename for
	devicemapper disk partitions.

	This is needed for upcoming lvm changes where the /dev/mapper/foobar
	files are becoming symlinks, so we will end up opening /dev/dm-#,
	and naming our partitions dm-#p1, dm-#p2, instead of foobarp1,
	foobarp2, etc.

2009-11-06  Hans de Goede  <hdegoede@redhat.com>

	linux: use major / minor to specify device mapper device in dm_task
	Use major / minor to specify device mapper device instead of
	dm_task_set_name. This is needed for upcoming lvm changes where the
	/dev/mapper/foobar files are becoming symlinks, so we will end up
	opening /dev/dm-#, and dm-# is not a valid dm_task name.

	This is only needed in this one place, as in the other places where we
	use dm_task_set_name, the name we use was returned by libdevicemapper
	itself in an earlier function call.

2009-11-06  Jim Meyering  <meyering@redhat.com>

	tests: enable the FS-resizing (tests only HFS and FAT)
	* tests/Makefile.am (TESTS): Add t3000-resize-fs.sh.

	maint: remove stray "types and" in the big FS-op warning
	* parted/parted.c (issue_fs_op_warning): Correct grammar in diagnostic.

	tests: convert more tests to new framework
	* tests/t0400-loop-clobber-infloop.sh: Convert.
	* tests/t0010-script-no-ctrl-chars.sh: Likewise.
	* tests/t3000-resize-fs.sh: Likewise, and convert it to use scsi_debug.
	* tests/t-local.sh (require_512_byte_sector_size_): Copy this
	function from test-lib.sh.

2009-11-04  Hans de Goede  <hdegoede@redhat.com>

	dasd: fix disk duplication
	Fix dasd_duplicate and add a dasd_partition_duplicate function.
	* libparted/labels/dasd.c(dasd_partition_duplicate): New function.
	(dasd_duplicate): Don't set the disk_specific pointer to NULL!
	(dasd_duplicate): Copy DasdDiskSpecific from old disk to new disk.

	dasd: set disk_specific->format_type in dasd_alloc
	Set disk_specific->format_type in dasd_alloc, so that the disk
	returned by ped_disk_new_fresh is a valid dasd disk.
	* libparted/labels/dasd.c (dasd_alloc): Set disk_specific->format_type.

2009-11-04  Hans de Goede  <hdegoede@redhat.com>

	dasd: cache real_sector_size in linux_probe
	dasd_alloc was doing an ioctl to get the real sector size for the dasd
	device (we are faking 512 bytes sectors), but when called directly
	from ped_disk_new_fresh(), the device is not open causing this to fail.

	This patch fixes things by caching the real_sector_size in the linux
	arch_specific data and making the dasd label handling use this.
	libparted/arch/linux.c(_device_set_sector_size): Cache real sector size.
	(_device_set_sector_size, init_dasd, linux_new): Only compile dasd code
	on s390 and s390x.

2009-11-04  Hans de Goede  <hdegoede@redhat.com>

	dasd: remove bogus part_info pointer from DasdPartitionData
	The part_info pointer in DasdPartitionData was only used to
	pass fdasd partition_info_t pointers from dasd_write to
	the dasd_write dasd_update_type utility function. Since these
	pointers are not valid outside the lifetime of dasd_write, they
	should not be stored in the longer lived DasdPartitionData.

	* libparted/labels/dasd.c(DasdPartitionData): Remove part_info member.
	(dasd_read): Stop setting DasdPartitionData part_info.
	(dasd_update_type): Add part_info argument to pass fdasd
	partition_info_t pointers from dasd_write.
	(dasd_write): Stop setting DasdPartitionData part_info, pass
	partition_info_t pointers to dasd_update_type as a separate argument.

2009-11-04  Hans de Goede  <hdegoede@redhat.com>

	dasd: clean up anchor handling
	The current dasd label code keeps an fdasd anchor struct in the
	DasdDiskSpecific struct, and fills this during dasd_read. However this
	anchor does not get updated with any future mods, until dasd_write,
	at which points it gets completely re-initialized.

	Since the contents of the anchor saved during read does not get used
	anywhere else, this patch switches to using local anchor structs in
	dasd_read and dasd_write. This will also allow writing a significantly
	simpler duplicate implementation, then the one which is currently
	added to the Fedora package with a patch from Joel Granados (The
	current master dasd_duplicate implementation is not functional).

	This patch also fixes several missing calls to fdasd_cleanup() fixing
	several memory leaks.

	* libparted/arch/linux.h (struct _LinuxSpecific): Drop anchor member.
	* libparted/labels/dasd.c (DasdDiskSpecific): Drop anchor member.
	(dasd_clobber): Add missing fdasd_cleanup().
	(dasd_read, dasd_write): Use local anchor struct instead of a
	dynamically allocated one in DasdDiskSpecific.
	(dasd_read): Don't leak a PedConstraint in 2 error paths.
	(dasd_update_type): Pass in the used anchor as argument.

2009-11-03  Jim Meyering  <meyering@redhat.com>

	tests: distribute new files, t-local.sh and t-lvm.sh
	* tests/Makefile.am (EXTRA_DIST): Add t-local.sh and t-lvm.sh.

	tests: appease "make syntax-check"
	* tests/print-align.c: Include "progname.h".  Call set_program_name.

	tests: t6000-dm.sh: update and adapt to changed LVM2
	* tests/t6000-dm.sh: Rewrite to use new test framework and
	to disable multipath testing, since LVM2 has changed in such
	a way that it no longer works with loop devices.

	tests: do not invoke scsi_debug_setup_ in a subshell
	* tests/t9010-big-sector.sh: Do not invoke scsi_debug_setup_ in
	a subshell, since it sets a variable that cleanup machinery expects
	to see.
	* tests/t9020-alignment.sh: Likewise.

	tests: tweak temporary dirname prefix
	* tests/t-lib.sh (t_): Use "pe-" as prefix, not "gz-".

	tests: update lvm-utils.sh from lvm2
	* tests/lvm-utils.sh: Merge in changes from lvm2.

	tests: adapt/update lvm-related infrasture, too
	* tests/t-local.sh: Source t-lvm.sh.
	* tests/t-lvm.sh: Clone and update of lvm-utils.sh,
	for when we retire that file in favor of this one.

	tests: adapt t8000-loop.sh
	* tests/t8000-loop.sh: Rewrite in new style, and adjust to
	expect new diagnostic.

	tests: print and check partition alignment info, too
	* tests/print-align.c: Print partition alignment info, too
	* tests/t9020-alignment.sh: Check partition alignment too.

	tests: serialize tests that use the scsi_debug module
	* tests/t-local.sh (scsi_debug_lock_file_): New global.
	(scsi_debug_acquire_lock_): New function.
	(scsi_debug_setup_): Call it, to acquire the lock.
	(scsi_debug_cleanup_): Release the lock.

	tests: test the new alignment functions
	* tests/t9020-alignment.sh: New test.
	* tests/Makefile.am (TESTS): Add it to the list.

	tests: factor out some more
	* tests/t-local.sh (require_scsi_debug_module_): New function.
	* tests/t9010-big-sector.sh: Use it.

	tests: perform scsi_debug cleanup automatically...
	...rather than requiring each test to do it.
	* tests/t-lib.sh ($cleanup_eval): New variable.  Initialize.
	(remove_tmp_): Use it.
	* tests/t-local.sh: Record whether modprobe succeeded.
	(cleanup_eval_): Append an invocation of scsi_debug_cleanup_
	so that it is always run.
	(scsi_debug_cleanup_): Run rmmod only if the modprobe succeeded.
	* tests/t9010-big-sector.sh (cleanup_): Remove.

2009-11-02  Jim Meyering  <meyering@redhat.com>

	tests: move scsi_debug framework into shared script
	* tests/t-local.sh (-scsi_debug_cleanup_, wait_for_dev_to_appear_):
	(print_sd_names_, scsi_debug_setup_): New functions, factored out of ...
	* tests/t9010-big-sector.sh: ...this file.

	tests: document and begin to factor out scsi_debug framework
	* tests/t9010-big-sector.sh: Add comments, fix a bug in
	"comm" usage, prepare to factor out scsi_debug framework.