~ubuntu-branches/ubuntu/lucid/grub2/lucid

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
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
2009-10-05  Robert Millan  <rmh.grub@aybabtu.com>

	* configure.ac: Bump version to 1.97~beta4.

2009-10-03  Robert Millan  <rmh.grub@aybabtu.com>

	Resync grub-mkdevicemap in x86_64-efi.

	* conf/x86_64-efi.rmk (sbin_UTILITIES): Enable `grub-mkdevicemap'.
	(grub_mkdevicemap_SOURCES): Add missing `util/deviceiter.c' and
	`util/devicemap.c'.

2009-10-01  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub-editenv.c (create_envblk_file): Write new block with a
	.new suffix and then rename it into place, to ensure atomic
	creation.

2009-09-28  Robert Millan  <rmh.grub@aybabtu.com>

	Do not automatically install headers.

	* Makefile.in (include_DATA): Remove.  Update all users.

2009-09-26  Robert Millan  <rmh.grub@aybabtu.com>

	* conf/common.rmk (pkglib_MODULES): Remove `lua.mod'.
	(lua_mod_SOURCES, lua_mod_CFLAGS, lua_mod_LDFLAGS): Remove.

	* util/osdetect.lua: Remove.
	* script/lua/lauxlib.c: Likewise.
	* script/lua/ldebug.c: Likewise.
	* script/lua/grub_main.c: Likewise.
	* script/lua/lauxlib.h: Likewise.
	* script/lua/ldebug.h: Likewise.
	* script/lua/ltablib.c: Likewise.
	* script/lua/liolib.c: Likewise.
	* script/lua/lstrlib.c: Likewise.
	* script/lua/lualib.h: Likewise.
	* script/lua/ldo.c: Likewise.
	* script/lua/ldump.c: Likewise.
	* script/lua/ldo.h: Likewise.
	* script/lua/loslib.c: Likewise.
	* script/lua/lundump.c: Likewise.
	* script/lua/grub_lib.c: Likewise.
	* script/lua/ldblib.c: Likewise.
	* script/lua/lundump.h: Likewise.
	* script/lua/lmem.c: Likewise.
	* script/lua/grub_lib.h: Likewise.
	* script/lua/lmathlib.c: Likewise.
	* script/lua/lstate.c: Likewise.
	* script/lua/ltm.c: Likewise.
	* script/lua/lvm.c: Likewise.
	* script/lua/lmem.h: Likewise.
	* script/lua/lstate.h: Likewise.
	* script/lua/ltm.h: Likewise.
	* script/lua/ltable.c: Likewise.
	* script/lua/lvm.h: Likewise.
	* script/lua/llex.c: Likewise.
	* script/lua/lgc.c: Likewise.
	* script/lua/grub_lua.h: Likewise.
	* script/lua/loadlib.c: Likewise.
	* script/lua/lfunc.c: Likewise.
	* script/lua/lopcodes.c: Likewise.
	* script/lua/lparser.c: Likewise.
	* script/lua/ltable.h: Likewise.
	* script/lua/llex.h: Likewise.
	* script/lua/lgc.h: Likewise.
	* script/lua/lfunc.h: Likewise.
	* script/lua/lbaselib.c: Likewise.
	* script/lua/lopcodes.h: Likewise.
	* script/lua/lparser.h: Likewise.
	* script/lua/lzio.c: Likewise.
	* script/lua/linit.c: Likewise.
	* script/lua/lobject.c: Likewise.
	* script/lua/llimits.h: Likewise.
	* script/lua/lstring.c: Likewise.
	* script/lua/lzio.h: Likewise.
	* script/lua/lapi.c: Likewise.
	* script/lua/lcode.c: Likewise.
	* script/lua/lua.h: Likewise.
	* script/lua/lobject.h: Likewise.
	* script/lua/lstring.h: Likewise.
	* script/lua/lapi.h: Likewise.
	* script/lua/lcode.h: Likewise.
	* script/lua/luaconf.h: Likewise.

2009-09-26  Colin Watson  <cjwatson@ubuntu.com>

	* docs/grub.texi (Command-line and menu entry commands): Document
	date and echo commands.

2009-09-24  Pavel Roskin  <proski@gnu.org>

	* include/grub/kernel.h (struct grub_module_header): Remove
	`grub_module_header_types'.  Make `type' unsigned.  Make `size'
	32-bit on all platforms.
	* util/elf/grub-mkimage.c (load_modules): Treat `type' as an
	8-bit field.  Use grub_host_to_target32() for `size'.
	* util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
	* util/i386/pc/grub-mkimage.c (generate_image): Likewise.
	* util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.

2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>

	Fix "lost keypress" bug in at_keyboard.

	* term/i386/pc/at_keyboard.c (grub_at_keyboard_checkkey): New function.
	Checks for readyness of input buffer (without flushing it).
	(grub_at_keyboard_term): Use grub_at_keyboard_checkkey() rather
	than grub_at_keyboard_getkey_noblock() for `checkkey' struct member.

2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>

	* util/i386/pc/grub-mkimage.c (generate_image): Enclose BIOS-specific
	size check within GRUB_MACHINE_PCBIOS section.

2009-09-24  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/at_keyboard.h (KEYBOARD_ISREADY): Negate
	return value.
	* term/i386/pc/at_keyboard.c (grub_keyboard_getkey): Negate
	KEYBOARD_ISREADY check.
	(grub_at_keyboard_checkkey): Rename to ...
	(grub_at_keyboard_getkey_noblock): ... this.  Update all users.
	Remove gratuitous cast.

2009-09-23  Colin Watson  <cjwatson@ubuntu.com>

	* configure.ac: Call AC_PROG_MKDIR_P.
	* Makefile.in (docs/stamp-vti): Create docs directory.  Create
	version.texi in $(builddir) rather than $(srcdir).
	(docs/grub.info): Create docs directory.  Prepend $(builddir)/docs
	to makeinfo's @include search path.

2009-09-23  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Cope with `*.dpkg-*'

2009-09-23  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig_lib.in (grub_file_is_not_garbage): Add support
	for `*.dpkg-new'.

2009-09-21  Colin Watson  <cjwatson@ubuntu.com>

	Build info documentation.  Some code borrowed from Automake.

	* configure.ac: Check for makeinfo.
	* Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
	(MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
	docs/version.texi.
	(MOSTLYCLEANFILES): Add vti.tmp.
	(docs/version.texi, docs/stamp-vti): Update automatically.
	(docs/grub.info): Build info documentation.  Use --force and ignore
	errors for now.
	(all-local): Add $(INFOS).
	(install-local): Install info files.
	(uninstall): Uninstall info files.
	* docs/version.texi: Remove from revision control.  This file is
	automatically generated on build now.
	* gendistlist.sh: Add `*.info'.

2009-09-21  Felix Zielcke  <fzielcke@z-51.de>

	* kern/term.c: Fix indentation.

2009-09-21  Felix Zielcke  <fzielcke@z-51.de>

	* util/hostdisk.c: Fix a comment.

2009-09-20  Robert Millan  <rmh.grub@aybabtu.com>

	Fix regression introduced in r2539.

	* term/usb_keyboard.c (USB_HID_DEVICE_TO_HOST): Change from 0x61
	to 0xA1.

2009-09-19  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/30_os-prober.in: Don't throw away stderr from
	os-prober. Under normal operation, it does not print anything to
	stderr; if it does, we need to debug it, and throwing away stderr
	makes that excessively difficult.

2009-09-16  Vladimir Serbinenko  <phcoder@gmail.com>

	* mmap/mmap.c (grub_cmd_badram): Fix off-by-one error.

2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>

	* aclocal.m4 (AC_LANG_PROGRAM): New macro.  Overrides stock
	AC_LANG_PROGRAM from autoconf.
	(grub_ASM_USCORE, grub_PROG_OBJCOPY_ABSOLUTE): Add missing
	prototypes (fixes warning).

	* configure.ac: Add `-Werror' to TARGET_CFLAGS unless
	`--disable-werror' was used.

2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>

	* partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
	uninitialized `lastaddr'.

2009-09-15  Vladimir Serbinenko  <phcoder@gmail.com>

	* partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.

2009-09-14  Colin Watson  <cjwatson@ubuntu.com>

	* commands/test.c (get_fileinfo): Return immediately if
	grub_fs_probe fails.

2009-09-14  José Martínez  <xosemp@gmail.com>

	* commands/acpi.c (grub_cmd_acpi): Fix loading ACPI tables from file.

2009-09-14  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/30_os-prober.in: Cope with Windows 7 in os-prober
	output.

2009-09-13  Robert Millan  <rmh.grub@aybabtu.com>

	* configure.ac: Remove --enable-grub-pe2elf.  Only build
	grub-pe2elf when needed by the build system itself.
	* conf/common.rmk: Remove $(enable_grub_pe2elf) check.

2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>

	* configure.ac: Bump version to 1.97~beta3.
	* docs/version.texi: Likewise.

2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>

	* video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
	mode special handling (grub_vbe_bios_set_dac_palette_width() call)
	from here ...
	* loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
	(grub_linux_setup_video): ... to here (with some adjustments).

2009-09-12  Robert Millan  <rmh.grub@aybabtu.com>

	Fix memory corruption issue (spotted by Colin Watson).

	* kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette): Fix bug
	causing returned size to be stored in an incorrect memory location.
	Fix use of uninitialized value when storing the returned size.

2009-09-12  Yves Blusseau  <blusseau@zetam.org>

	Change clean rules to properly remove files

	* genmk.rb: add new clean rules
	* Makefile.in (clean): add the new targets
	(mostlyclean): likewise

2009-09-11  Colin Watson  <cjwatson@ubuntu.com>

	* include/grub/ntfs.h (struct grub_fshelp_node): Change `size'
	to grub_uint64_t.
	* fs/ntfs.c (init_file): Understand 64-bit sizes for
	non-resident files.

2009-09-11  Colin Watson  <cjwatson@ubuntu.com>

	* configure.ac: Don't look for help2man when cross-compiling.  Fixes
	part of bug #27349.

2009-09-10  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Make the created config mode 400 and
	print a warning if it fails.

2009-09-10  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub.d/40_custom.in: Ask user to type custom entries below
	comment, rather than below 'exec tail' line.

2009-09-10  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/40_custom.in: Make sure that the explanatory text is
	visible in grub.cfg.

2009-09-10  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/40_custom.in: Make it a little clearer how to use this
	file.

2009-09-10  Felix Zielcke  <fzielcke@z-51.de>

	* docs/grub.cfg: Add an example menu entry for memtest86+.

2009-09-09  Felix Zielcke  <fzielcke@z-51.de>

	* config.guess: Update to latest version from config git.
	* config.sub: Likewise.

2009-09-08  Colin Watson  <cjwatson@ubuntu.com>

	* script/sh/execute.c (grub_script_execute_cmdline): Set "?" in
	unknown-command case.  Fixes bug #27320.

2009-09-08  Felix Zielcke  <fzielcke@z-51.de>

	* kern/rescue_parser.c (grub_rescue_parse_line): Only suggest to try
	`help' if the command exists.

2009-09-06  Robert Millan  <rmh.grub@aybabtu.com>

	* INSTALL: Require GCC 4.1.3 or later.

2009-09-06  Yves Blusseau  <blusseau@zetam.org>

	* Makefile.in (RMKFILES): add i386-qemu.rmk
	(MAINTAINER_CLEANFILES): add $(srcdir)/DISTLIST $(srcdir)/config.h.in
	$(srcdir)/stamp-h.in

2009-09-05  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub-probe.c (probe): Comment out buggy codepath, which
	was unexpectedly enabled by Colin Watson's 2009-09-02 fix.  This
	should be re-enabled after 1.97.

2009-09-05  Felix Zielcke  <fzielcke@z-51.de>

	* gendistlist.sh: Add `grub-dumpdevtree' and `*.lua' to the list
	find searches for.

2009-09-04  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
	unnecessary calls to grub_error.

2009-09-04  Colin Watson  <cjwatson@ubuntu.com>

	* NEWS: Mention `keystatus' and Unicode fonts.

2009-09-04  Robert Millan  <rmh.grub@aybabtu.com>

	* configure.ac: Bump version to 1.97~beta2.
	* docs/version.texi: Likewise.

2009-09-03  Colin Watson  <cjwatson@ubuntu.com>

	* configure.ac: By default, GCC 4.4 generates .eh_frame sections
	containing unwind information in some cases where it previously did
	not. Use -fno-dwarf2-cfi-asm if available to restore the old
	behaviour. See http://patchwork.kernel.org/patch/8555/ for related
	discussion.

2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>

	Embedding loadenv module into grub-emu

	* conf/i386-pc.rmk (grub_emu_SOURCES): add lib/envblk.c and
	commands/loadenv.c
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise

2009-09-03  Magnus Granberg  <zorry@ume.nu>

	* aclocal.m4: Add grub_CHECK_PIE. It check if the compiler
	include -fPIE in the default specs.
	* configure.ac: Check if pie_possible is yes and add -fno-PIE
	to TARGET_CFLAGS.

2009-09-03  Felix Zielcke  <fzielcke@z-51.de>

	* INSTALL: Note that GNU Bison 2.3 or later is required.

2009-09-03  Colin Watson  <cjwatson@ubuntu.com>

	* kern/i386/pc/startup.S: Fix typo.

2009-09-02  Vladimir Serbinenko  <phcoder@gmail.com>

	* efiemu/loadcore.c (SUFFIX (grub_efiemu_loadcore_load)): Fix style
	according to GCS.

2009-09-02  Colin Watson  <cjwatson@ubuntu.com>

	* docs/grub.texi (Naming convention): Describe one-based partition
	numbering.
	(Device syntax): Likewise.
	(File name syntax): Likewise.
	(Block list syntax): Likewise.
	(Making a GRUB bootable CD-ROM): Talk about grub.cfg rather than
	menu.lst.
	(File name syntax): Likewise.
	(Command-line and menu entry commands): Document acpi, blocklist,
	crc, export, insmod, keystatus, ls, set, and unset commands.

2009-09-02  Colin Watson  <cjwatson@ubuntu.com>

	* commands/keystatus.c (GRUB_MOD_INIT (keystatus)): Adjust summary
	to avoid implying that only one of --shift, --ctrl, or --alt may be
	used.

2009-09-02  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub-probe.c (probe): Test st.st_mode using S_ISREG macro
	rather than comparing against S_IFREG, which will almost never work.

2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>

	* commands/loadenv.c (check_blocklists): Fix off-by-one error.
	(write_blocklists): Likewise.

2009-09-01  Colin Watson  <cjwatson@ubuntu.com>

	* script/lua/grub_lua.h (fputs): Supply a format string as the first
	argument to grub_printf.

2009-09-01  Felix Zielcke  <fzielcke@z-51.de>

	* genmk.rb: Add quotes around $(TARGET_OBJ2ELF) to cope with
	 non GNU test.

2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>

	* kern/file.c (grub_file_read): Spelling fix

2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
	loading of headers in some cases.

2009-08-30  Robert Millan  <rmh.grub@aybabtu.com>

	* configure.ac: Bump version to 1.97~beta1.
	* docs/version.texi: Likewise.

2009-08-29  Vladimir Serbinenko  <phcoder@gmail.com>

	* include/grub/i386/xnu.h: Add license header.
	include grub/err.h explicitly.

2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub.d/10_freebsd.in: Detect `ufs1' and `ufs2' and map them
	to `ufs' in the vfs.root.mountfrom kernel parameter.

2009-08-29  Robert Millan  <rmh.grub@aybabtu.com>

	* term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.

	[GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
	value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).

	[! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
	`ARRAY_SIZE' macro.

2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>

	* kern/file.c (grub_file_read): Check offset.
	* fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check.
	* fs/jfs.c (grub_jfs_read_file): Likewise.
	* fs/ntfs.c (grub_ntfs_read): Likewise.
	* fs/reiserfs.c (grub_reiserfs_read): Likewise.
	* fs/minix.c (grub_minix_read_file): Correct offset check.
	* fs/ufs.c (grub_ufs_read_file): Likewise.

2009-08-28  Colin Watson  <cjwatson@ubuntu.com>

	* term/i386/pc/console.c (bios_data_area): Cast
	GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR explicitly.

2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>

	1-bit optimised blitters.

	* include/grub/fbblit.h (grub_video_fbblit_replace_32bit_1bit): New
	prototype.
	(grub_video_fbblit_replace_24bit_1bit): Likewise.
	(grub_video_fbblit_replace_16bit_1bit): Likewise.
	(grub_video_fbblit_replace_8bit_1bit): Likewise.
	(grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
	(grub_video_fbblit_blend_XXX888_1bit): Likewise.
	(grub_video_fbblit_blend_XXX565_1bit): Likewise.
	* video/fb/fbblit.c (grub_video_fbblit_replace_32bit_1bit): New
	function.
	(grub_video_fbblit_replace_24bit_1bit): Likewise.
	(grub_video_fbblit_replace_16bit_1bit): Likewise.
	(grub_video_fbblit_replace_8bit_1bit): Likewise.
	(grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
	(grub_video_fbblit_blend_XXX888_1bit): Likewise.
	(grub_video_fbblit_blend_XXX565_1bit): Likewise.
	* video/fb/video_fb.c (common_blitter): Use 1-bit optimised blitters
	when possible.
	* video/video.c (grub_video_get_blit_format): Return
	GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED if bpp = 1.

2009-08-28  Colin Watson  <cjwatson@ubuntu.com>

	* normal/cmdline.c (grub_cmdline_get): Supply a format string as
	the first argument to grub_printf.

2009-08-28  Colin Watson  <cjwatson@ubuntu.com>
2009-08-28  Robert Millan  <rmh.grub@aybabtu.com>

	Add `getkeystatus' terminal method.  Add a new `keystatus' command
	to query it.

	* include/grub/term.h (GRUB_TERM_STATUS_SHIFT,
	GRUB_TERM_STATUS_CTRL, GRUB_TERM_STATUS_ALT): Definitions for
	modifier key bitmasks.
	(struct grub_term_input): Add `getkeystatus' member.
	(grub_getkeystatus): Add prototype.
	* kern/term.c (grub_getkeystatus): New function.

	* include/grub/i386/pc/memory.h
	(GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR): New macro.
	(struct grub_machine_bios_data_area): Define necessary parts of BIOS
	Data Area layout.
	* term/i386/pc/console.c (grub_console_getkeystatus): New function.
	(grub_console_term_input): Set `getkeystatus' member.
	* term/usb_keyboard.c (grub_usb_hid): Macroify HID protocol
	constants.
	(grub_usb_keyboard_getreport): Likewise.
	(grub_usb_keyboard_checkkey): Likewise.
	(grub_usb_keyboard_getkeystatus): New function.
	(grub_usb_keyboard_term): Set `getkeystatus' member.

	* commands/keystatus.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add keystatus.mod.
	(keystatus_mod_SOURCES): New variable.
	(keystatus_mod_CFLAGS): Likewise.
	(keystatus_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add
	commands/keystatus.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.

2009-08-28  Vladimir Serbinenko  <phcoder@gmail.com>

	Split befs.mod and afs.mod into *_be.mod and *.mod

	* conf/common.rmk (grub_probe_SOURCES): Add afs_be.c and befs_be.c.
	(grub_fstest_SOURCES): Likewise.
	(pkglib_MODULES): Add afs_be.mod and befs_be.mod.
	(afs_be_mod_SOURCES): New variable.
	(afs_be_mod_CFLAGS): Likewise.
	(afs_be_mod_LDFLAGS): Likewise.
	(befs_be_mod_SOURCES): Likewise.
	(befs_be_mod_CFLAGS): Likewise.
	(befs_be_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add afs_be.c and befs_be.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* fs/afs_be.c: New file.
	* fs/befs_be.c: New file.
	* fs/afs.c (GRUB_AFS_FSNAME_SUFFIX): New definition.
	(GRUB_AFS_FSNAME): Use GRUB_AFS_FSNAME_SUFFIX.
	(U16): Replaced with ...
	(grub_afs_to_cpu16): ...this. All users updated.
	(U32): Replaced with ...
	(grub_afs_to_cpu32): ...this. All users updated.
	(U64): Replaced with ...
	(grub_afs_to_cpu64): ...this. All users updated.
	(GRUB_AFS_BO_LITTLE_ENDIAN): Remove.
	(GRUB_AFS_BO_BIG_ENDIAN): Likewise.
	(grub_afs_validate_sblock): Check only one endianness.
	(GRUB_MOD_INIT (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
	(GRUB_MOD_INIT (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
	(GRUB_MOD_INIT (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
	(GRUB_MOD_INIT (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.
	(GRUB_MOD_FINI (befs)) [MODE_BIGENDIAN && MODE_BFS]: Rename to ..
	(GRUB_MOD_FINI (befs_be)) [MODE_BIGENDIAN && MODE_BFS]: ... this.
	(GRUB_MOD_FINI (afs)) [MODE_BIGENDIAN && !MODE_BFS]: Rename to ..
	(GRUB_MOD_FINI (afs_be)) [MODE_BIGENDIAN && !MODE_BFS]: ... this.

2009-08-26  Bean  <bean123ch@gmail.com>

	* fs/xfs.c (GRUB_XFS_INO_INOINAG): Replace 1L with 1LL to support
	64-bit number.
	(GRUB_XFS_FSB_TO_BLOCK): Likewise.
	(grub_xfs_inode_block): Change return type to grub_uint64_t.
	(grub_xfs_read_inode): Change type of block to grub_uint64_t.

2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>

	NetBSD memory map support.

	* include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
	(grub_netbsd_btinfo_mmap_header): New structure.
	(grub_netbsd_btinfo_mmap_entry): Likewise.
	* loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.

2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Enable bsd.mod on coreboot.

	* conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
	(bsd_mod_SOURCES): New variable.
	(bsd_mod_CFLAGS): Likewise.
	(bsd_mod_LDFLAGS): Likewise.
	(bsd_mod_ASFLAGS): Likewise.
	* loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
	(grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.

2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Cleanup NetBSD root support.

	* loader/i386/bsd.c (grub_netbsd_boot): Remove call to
	grub_bsd_get_device.
	Fix typo.

2009-08-25  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/00_header.in: Move check for the video backend of
	gfxterm from here ...
	* util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
	a suitable video backend.

2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix breakage in grub-setup.

	* util/i386/pc/grub-setup.c (setup): Use "part_msdos" instead of
	"msdos_partition_map".

2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix breakage in normal/auth.c.

	* normal/auth.c (grub_iswordseparator): New function.

2009-08-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Authentication support.

	* commands/password.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add password.mod.
	(password_mod_SOURCES): New variable.
	(password_mod_CFLAGS): Likewise.
	(password_mod_LDFLAGS): Likewise.
	(normal_mod_SOURCES): Add normal/auth.c.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add commands/password.c and
	normal/auth.c.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* include/grub/auth.h: New file.
	* include/grub/err.h (grub_err_t): New enum value
	GRUB_ERR_ACCESS_DENIED.
	* include/grub/menu.h (grub_menu_entry): New fields 'restricted' and
	'users'.
	* include/grub/normal.h (grub_cmdline_get): New argument 'history'.
	* normal/cmdline.c (grub_cmdline_get): New argument 'history'. All
	users updated.
	* normal/auth.c: New file.
	* normal/main.c (grub_normal_add_menu_entry): Handle --users option.
	(grub_cmdline_run): Don't allow to go to command line without
	authentication.
	* normal/menu.c (grub_menu_execute_entry): Handle restricted entries.
	* normal/menu_entry.c (grub_menu_entry_run): Don't allow editing
	menuentry without superuser rights.
	* normal/menu_viewer.c (grub_menu_viewer_show_menu): Don't exit if
	user isn't a superuser.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	Save space by inlining misc.c functions.

	* kern/misc.c (grub_iswordseparator): Made static.
	* kern/misc.c (grub_strcat): Moved from here ...
	* include/grub/misc.h (grub_strcat): ... here. Inlined.
	* kern/misc.c (grub_strncat): Moved from here ...
	* include/grub/misc.h (grub_strncat): ... here. Inlined.
	* kern/misc.c (grub_strcasecmp): Moved from here ...
	* include/grub/misc.h (grub_strcasecmp): ... here. Inlined.
	* kern/misc.c (grub_strncasecmp): Moved from here ...
	* include/grub/misc.h (grub_strncasecmp): ... here. Inlined.
	* kern/misc.c (grub_isalpha): Moved from here ...
	* include/grub/misc.h (grub_isalpha): ... here. Inlined.
	* kern/misc.c (grub_isdigit): Moved from here ...
	* include/grub/misc.h (grub_isdigit): ... here. Inlined.
	* kern/misc.c (grub_isgraph): Moved from here ...
	* include/grub/misc.h (grub_isgraph): ... here. Inlined.
	* kern/misc.c (grub_tolower): Moved from here ...
	* include/grub/misc.h (grub_tolower): ... here. Inlined.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	* script/sh/function.c (grub_script_function_find): Cut error message
	not to flood terminal.
	* script/sh/lexer.c (grub_script_yylex): Remove command line length
	limit.
	* script/sh/script.c (grub_script_arg_add): Duplicate string.

2009-08-24  Colin Watson  <cjwatson@ubuntu.com>

	* term/usb_keyboard.c (grub_usb_keyboard_getreport): Make
	`report' grub_uint8_t *.
	(grub_usb_keyboard_checkkey): Make `data' elements grub_uint8_t.
	Use a 50-millisecond timeout rather than just repeating
	grub_usb_keyboard_getreport 50 times.
	(grub_usb_keyboard_getkey): Make `data' elements grub_uint8_t.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	Rename *_partition_map to part_*

	* partmap/acorn.c (grub_acorn_partition_map): Set name to 'part_acorn'.
	* partmap/amiga.c (grub_amiga_partition_map): Set name to 'part_amiga'.
	* partmap/apple.c (grub_apple_partition_map): Set name to 'part_apple'.
	* partmap/gpt.c (grub_gpt_partition_map): Set name to 'part_gpt'.
	All users updated.
	* partmap/msdos.c (grub_msdos_partition_map): Set name to 'part_msdos'.
	All users updated.
	* partmap/sun.c (grub_sun_partition_map): Set name to 'part_sun'.
	* util/grub-probe.c (probe_partmap): Don't transform partition name
	to get module name.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix OpenBSD and NetBSD support.

	* include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
	memory address conflict.
	(OPENBSD_MMAP_ACPI): New definition.
	(OPENBSD_MMAP_NVS): Likewise.
	* loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
	and OPENBSD_MMAP_NVS.
	Add memory map terminator
	Explicit cast when calling grub_unix_real_boot.
	(grub_netbsd_boot): Explicit cast when calling grub_unix_real_boot.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	Let user specify NetBSD root device.

	* loader/i386/bsd.c (netbsd_root): New variable.
	(netbsd_opts): New option 'root'.
	(NETBSD_ROOT_ARG): New macro.
	(grub_netbsd_boot): Use 'netbsd_root'.
	(grub_bsd_unload): Free 'netbsd_root'.
	(grub_cmd_netbsd): Fill 'netbsd_root'.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	Support for 64-bit NetBSD.

	* loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
	point when booting non-FreeBSD.

2009-08-24  Vladimir Serbinenko  <phcoder@gmail.com>

	Support --no-smp and --no-acpi for NetBSD.

	* include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
	(NETBSD_AB_NOACPI): Likewise.
	* loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
	(netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.

2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>

	* fs/hfsplus.c (grub_hfsplus_mount): Don't ignore grub_hfsplus_read_file
	errors.
	(grub_hfsplus_btree_iterate_node): Don't ignore grub_hfsplus_read_file
	errors. Call grub_error when needed.

2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>

	* commands/search.c (search_fs): Try searching without autoload first.
	* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Load
	filesystem module explicitly for faster booting.

2009-08-23  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.

2009-08-23  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/30_os-prober.in: Disable os-prober if
	`GRUB_DISABLE_OS_PROBER' was set to true.

2009-08-23  Robert Millan  <rmh.grub@aybabtu.com>

	* partmap/pc.c: Rename to ...
	* partmap/msdos.c: ... this.  Update all users.
	(grub_pc_partition_map): Rename to ...
	(grub_msdos_partition_map): ... this.  Update all users.

	* parttool/pcpart.c: Rename to ...
	* parttool/msdospart.c: ... this.  Update all users.

	* include/grub/pc_partition.h: Rename to ...
	* include/grub/msdos_partition.h: ... this.  Update all users.
	(grub_pc_partition_bsd_entry): Rename to ...
	(grub_msdos_partition_bsd_entry): ... this.  Update all users.
	(grub_pc_partition_disk_label): Rename to ...
	(grub_msdos_partition_disk_label): ... this.  Update all users.
	(grub_pc_partition_entry): Rename to ...
	(grub_msdos_partition_entry): ... this.  Update all users.
	(grub_pc_partition_mbr): Rename to ...
	(grub_msdos_partition_mbr): ... this.  Update all users.
	(grub_pc_partition): Rename to ...
	(grub_msdos_partition): ... this.  Update all users.
	(grub_pc_partition_is_empty): Rename to ...
	(grub_msdos_partition_is_empty): ... this.  Update all users.
	(grub_pc_partition_is_extended): Rename to ...
	(grub_msdos_partition_is_extended): ... this.  Update all users.
	(grub_pc_partition_is_bsd): Rename to ...
	(grub_msdos_partition_is_bsd): ... this.  Update all users.

	* conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
	(amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
	(apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
	(msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
	(sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
	(acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
	(gpt_mod_LDFLAGS): Rename to ...
	(part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
	(part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
	(part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
	(part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
	(part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
	(part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
	(part_gpt_mod_LDFLAGS): ... this.
	(pkglib_MODULES): Prefix partition modules with `part_'.  Rename
	`pcpart.mod' to `msdospart.mod'.
	(pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
	to ...
	(msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
	(msdospart_mod_LDFLAGS): ... this.

2009-08-23  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
	(openbsd_opts): Likewise.
	(netbsd_opts): Likewise.
	(freebsd_flags): Added 0 terminator.
	(openbsd_flags): Likewise.
	(netbsd_flags): Likewise.
	(grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
	(grub_cmd_freebsd): Transformed into extended command.
	(grub_cmd_openbsd): Likewise.
	(grub_cmd_netbsd): Likewise.
	(cmd_freebsd): Changed type to grub_extcmd_t.
	(cmd_openbsd): Likewise.
	(cmd_netbsd): Likewise.
	(GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
	grub_cmd_openbsd as extended commands.
	(GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
	cmd_netbsd and cmd_openbsd

2009-08-22  Vladimir Serbinenko  <phcoder@gmail.com>

	* commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.

2009-08-21  Pavel Roskin  <proski@gnu.org>

	* Makefile.in (install-local): When checking if a file is in the
	build directory, use "test -e" to detect symlinks.

	* Makefile.in (install-local): Remove all files in
	$(DESTDIR)$(pkglibdir) before installing new files there.

2009-08-18  Felix Zielcke  <fzielcke@z-51.de>

	* util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
	grub-mkelfimage.

2009-08-18  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Don't use gfxterm by default if not
	explicitly specified by the user.

2009-08-18  Pavel Roskin  <proski@gnu.org>

	* include/grub/fbfill.h (struct grub_video_fbrender_target): Use
	grub_uint8_t pointer for data.
	* include/grub/fbutil.h (struct grub_video_fbblit_info):
	Likewise.
	* video/fb/fbutil.c: Remove unnecessary casts.

2009-08-17  Michal Suchanek  <hramrach@centrum.cz>

	VBE cleanup.

	* video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
	(grub_vbe_set_video_mode): Save active mode info
	only after setting the mode.
	(grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
	second argument.

2009-08-17  Michal Suchanek  <hramrach@centrum.cz>

	Rename variables for clarity.

	* video/i386/pc/vbe.c (active_mode_info): Renamed to ...
	(active_vbe_mode_info): ... this. All users updated.
	(framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
	All users updated.
	(initial_mode): Rename to ...
	(initial_vbe_mode): ... this. All users updated.
	(mode_in_use): Rename to ..
	(vbe_mode_in_use): ... this. All users updated.
	(mode_list): Rename to ..
	(vbe_mode_list): ... this. All users updated.
	(grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
	'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
	(grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
	'mode_list_size' to 'vbe_mode_list_size'.
	(grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
	'best_mode_info' to 'best_vbe_mode_info' and
	'best_mode' to 'best_vbe_mode'

2009-08-17  Michal Suchanek  <hramrach@centrum.cz>

	Remove duplicate grub_video_fb_get_video_ptr.

	* include/grub/fbutil.h (get_data_ptr): Rename to ...
	(grub_video_fb_get_video_ptr): ... this.
	* include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
	* video/fb/fbutil.c: Add comment about addressing.
	(get_data_ptr): Rename to ...
	(grub_video_fb_get_video_ptr): ... this. All users updated.
	* video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.

2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>

	* fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
	grub_dprintf() that was just added.

2009-08-17  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
	(DEFAULT_VIDEO_MODE): Remove macros.
	(grub_linux_boot): Remove assumption that Linux has FB support,
	and use "text" as default video mode.

2009-08-15  Vladimir Serbinenko  <phcoder@gmail.com>

	* fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
	grub_dprintf.
	* fs/fat.c (grub_fat_read_data): Likewise.

2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
	payload.
	(grub_module): Likewise.

2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
	mbi->cmdline but free playground.

2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>

	Handle group offset on UFS1.

	* fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
	(grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.

2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>

	Split ufs.mod into ufs1.mod and ufs2.mod.

	* conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
	(grub_fstest_SOURCES): Likewise.
	(pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
	(ufs_mod_SOURCES): Remove.
	(ufs_mod_CFLAGS): Likewise.
	(ufs_mod_LDFLAGS): Likewise.
	(ufs1_mod_SOURCES): New variable.
	(ufs1_mod_CFLAGS): Likewise.
	(ufs1_mod_LDFLAGS): Likewise.
	(ufs2_mod_SOURCES): New variable.
	(ufs2_mod_CFLAGS): Likewise.
	(ufs2_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
	* conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
	Likewise.
	(grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
	Likewise.
	* fs/ufs2.c: New file.
	* fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.

2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>

	Framebuffer split.

	* commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
	subsystem at the end.
	* conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
	(video_fb_mod_SOURCES): New variable.
	(video_fb_mod_CFLAGS): Likewise.
	(video_fb_mod_LDFLAGS): Likewise.
	* conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
	video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
	* video/i386/pc/vbeblit.c: Moved from here ...
	* video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
	* video/i386/pc/vbefill.c: Moved from here ...
	* video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
	* video/i386/pc/vbeutil.c: Moved from here ...
	* video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbeblit.h: Moved from here ...
	* include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbefill.h: Moved from here ...
	* include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbeutil.h: Moved from here ...
	* include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbe.h: Moved framebuffer part ...
	* include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
	(GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
	(grub_video_adapter): Added 'get_info_and_fini'.
	(grub_video_get_info_and_fini): New prototype.
	(grub_video_set_mode): make modestring const char *.
	* loader/i386/linux.c (grub_linux_setup_video): Use
	grub_video_get_info_and_fini.
	(grub_linux_boot): Move modesetting just before booting.
	* loader/i386/pc/xnu.c (grub_xnu_set_video): Use
	grub_video_get_info_and_fini.
	* video/i386/pc/vbe.c: Moved framebuffer part ...
	* video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
	* video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
	grub_video_fbstd_colors and grub_video_fb_set_palette.
	(grub_video_vbe_init): Clear 'framebuffer' variable and use
	grub_video_fb_init.
	(grub_video_vbe_fini): Use grub_video_fb_fini.
	(grub_video_vbe_setup): Use framebuffer.render_target instead of
	render_target and use grub_video_fb_set_active_render_target and
	grub_video_fb_set_palette.
	(grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
	(grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
	(grub_video_vbe_adapter): Use framebuffer.
	* video/video.c (grub_video_get_info_and_fini): New function.
	(grub_video_set_mode): Make modestring const char *.
	(GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
	values are already initialised.

2009-08-14  Pavel Roskin  <proski@gnu.org>

	* boot/i386/pc/cdboot.S: Use LOCAL for local labels.  Eliminate
	ABS and APPLE_CC.
	* boot/i386/pc/diskboot.S: Likewise.
	* boot/i386/pc/lnxboot.S: Likewise.  Hardcode the number of code
	sectors allow compilation on MacOSX.
	* conf/i386-pc.rmk: Enable unconditional compilation of
	lnxboot.img.

2009-08-13  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
	* util/grub.d/00_header.in: Enter interruptible sleep if
	GRUB_HIDDEN_TIMEOUT is set.

2009-08-13  Yves Blusseau  <blusseau@zetam.org>

	* include/grub/symbol.h: Add the LOCAL macro.
	* boot/i386/pc/boot.S: Use the LOCAL macro for all labels
	starting with "L_".

2009-08-13  Pavel Roskin  <proski@gnu.org>

	* boot/i386/pc/boot.S: Remove ABS macro, it's not required by
	any modern compilers we support.

	* boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
	Use local labels starting with "L_" so that Apple assembler
	knows they are local.

2009-08-10  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
	(KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
	(bsd_kernel_types): ... this enum.

	* loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
	(grub_cmd_freebsd_module_elf): Abort with "You need to load the
	kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.

	(grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
	(grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
	(GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
	messages.

2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub-dumpdevtree: Moved from here ...
	* util/i386/efi/grub-dumpdevtree: ... to here.
	(hexify): New function.  Converts a string to its hex version.
	Generate hex versions of "efi" and "device-properties" by calling
	hexify() on the ASCII strings rather than by hardcoding numbers.

2009-08-08  Robert Millan  <rmh.grub@aybabtu.com>

	* fs/jfs.c: Update copyright year.

2009-08-08  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/00_header.in: Fix a comment.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.

2009-08-08  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Allow the user to specify the used font
	with GRUB_FONT.

2009-08-08  Pavel Roskin  <proski@gnu.org>

	* include/grub/powerpc/libgcc.h: Export __ashrdi3() if
	available, xfs.mod needs it now.

	* util/grub-mkconfig_lib.in (version_test_numeric): Don't use
	the "g" modifier in sed when the intention is to strip something
	once.  This fixes comparison of kernels with multiple dashes.

	* util/grub-mkconfig.in: Define datarootdir, datadir may depend
	on it.  Add missing space before closing bracket.  Fix
	misleading formatting.

2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>

	* docs/grub.texi: Major overhaul.  Remove all sections that are
	specific to GRUB Legacy, or mostly composed of Legacy-specific
	information.

2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>

	* docs/version.texi: New file.  Provides version information for
	grub.texi.

2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>

	* docs/grub.texi: Update CVS information to SVN.
	Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".

2009-08-07  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Remove a wrong `fi'.

2009-08-07  Felix Zielcke  <fzielcke@z-51.de>

	* fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
	(grub_jfs_uuid): New function.
	(grub_jfs_fs): Set uuid field to grub_jfs_uuid.

2009-08-07  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig_lib.in (font_path): Move the functionality
	of it to ...
	* util/grub-mkconfig.in: ... here.  Prefer unicode.pf2 and
	unifont.pf2 over ascii.pf2.  Export LANG=C in case ascii.pf2 gets used.

2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub.d/10_linux.in (test_numeric): Moved from here ...
	* util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
	Update all users.

	* util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
	not just "vmlinu[zx]".
	Moved from here ...
	* util/grub-mkconfig_lib.in (version_test_gt): ... to here.  Update
	all users.

	* util/grub.d/10_linux.in (find_latest): Moved from here ...
	* util/grub-mkconfig_lib.in (version_find_latest): ... to here.  Update
	all users.

2009-08-07  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub.d/10_freebsd.in: Use an absolute device path for
	`vfs.root.mountfrom'.  Set `vfs.root.mountfrom.options=rw'.

2009-08-06  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
	handling of multiple abstraction modules.

2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>

	Fix a bug resulting in black screen when loading Linux using a
	packed video mode.

	* kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
	function.

	* include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
	(grub_vbe_bios_getset_dac_palette_width): New function.
	(grub_vbe_bios_get_dac_palette_width)
	(grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
	grub_vbe_bios_getset_dac_palette_width()).

	* video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
	check for return status.
	(grub_vbe_get_video_mode_info): When getting information for a packed
	mode (<= 8 bpp), obtain DAC palette width using
	grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
	{red,green,blue}_mark_size.

2009-08-04  Felix Zielcke  <fzielcke@z-51.de>

	* commands/search.c (options): Fix help output to match actual code.

2009-08-02  Vladimir Serbinenko  <phcoder@gmail.com>

	* commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
	of homegrown code.

2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>

	* util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
	on XFS or ReiserFS.

2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>

	Support Apple partition map with sector size different from 512 bytes.

	* partmap/apple.c (grub_apple_header): New field 'blocksize'.
	(apple_partition_map_iterate): Respect 'aheader.blocksize'
	and 'apart.partmap_size'.

2009-08-01  Vladimir Serbinenko  <phcoder@gmail.com>
2009-08-01  Robert Millan  <rmh.grub@aybabtu.com>

	Fix cpuid command.

	* commands/i386/cpuid.c (options): New variable.
	(grub_cmd_cpuid): Return real error.
	(GRUB_MOD_INIT(cpuid)): Declare options.

2009-07-31  Vladimir Serbinenko  <phcoder@gmail.com>

	* partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
	valid.

2009-07-31  Bean  <bean123ch@gmail.com>

	* fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
	log2_inode.
	(grub_fshelp_node): Move inode field to the end.
	(grub_xfs_data): Remove inode field.
	(grub_xfs_inode_block): Calculate inode size using sblock.
	(grub_xfs_inode_offset): Likewise.
	(grub_xfs_read_inode): Calculate inode size using sblock.
	(grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
	(grub_xfs_iterate_dir): Calculate inode size using sblock.
	(grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
	to match inode size.
	(grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
	not accessible when data is null.
	(grub_xfs_open): Likewise.

2009-07-31  Bean  <bean123ch@gmail.com>

	* disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
	Don't change pv->disk if it's already set.

	* disk/raid.c (grub_raid_scan_device): Merge this function into ...
	(grub_raid_register): ... here.
	(grub_raid_rescan): Removed.

	* include/grub/raid.h (grub_raid_rescan): Removed.

	* util/grub-fstest.c: Remove include file <grub/raid.h>.
	(fstest): Replace grub_raid_rescan with module fini function followed
	by init function.

	* util/grub-probe.c: Add include file <grub/raid.h>.
	(probe_raid_level): New function.
	(probe): Detect abstraction by walking the disk device, support two
	level of abstraction (LVM on RAID) when detecting partition map.

2009-07-31  Pavel Roskin  <proski@gnu.org>

	* disk/raid5_recover.c (grub_raid5_recover): Revert conversion
	to grub_zalloc(), it was erroneous.
	Reported by Bean <bean123ch@gmail.com>

2009-07-30  Vladimir Serbinenko  <phcoder@gmail.com>

	* util/i386/pc/grub-setup.c (setup): Check that no partition is in
	embedding zone, not only the first one.

2009-07-29  Joe Auricchio  <jauricchio@gmail.com>

	* term/gfxterm.c (clear_char): New function.
	(grub_virtual_screen_setup): Use clear_char.
	(scroll_up): Likewise.
	(grub_virtual_screen_cls): Likewise.

2009-07-29  Felix Zielcke  <fzielcke@z-51.de>

	* util/deviceiter.c (get_acceleraid_disk_name): New static
	function.
	(grub_util_iterate_devices): Handle Accelraid devices.
	* util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.

2009-07-28  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
	separator for the suggested gfxpayload string (';' collides with the
	parser and needs escaping).

2009-07-28  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
	Clear direction flag before jumping to OS.
	(grub_multiboot2_real_boot): Likewise.

2009-07-28  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-install: Fix parsing of --disk-module
	option.

2009-07-28  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
	when embedding.

2009-07-26  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in (package_version): New variable.
	Use it do display the version.

2009-07-25  Felix Zielcke  <fzielcke@z-51.de>

	* kern/file.c (grub_file_open): Revert to previous check with
	grub_errno.

2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>

	* commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
	from help line. It's out of sync with code.

2009-07-25  Vladimir Serbinenko  <phcoder@gmail.com>

	* kern/parser.c (grub_parser_execute): Fix a bug causing truncated
	entries on failed boot.

2009-07-25  Felix Zielcke  <fzielcke@z-51.de>

	* kern/file.c (grub_file_open): Fix an error check.

2009-07-24  Vladimir Serbinenko  <phcoder@gmail.com>

	* util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
	partition map couldn't be identified.

2009-07-23  Pavel Roskin  <proski@gnu.org>

	* commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
	instead of WORDS_BIGENDIAN.  Use grub_le_to_cpu32(), so that the
	case of little endian words becomes just an optimization.
	Respect const modifier.
	(md5_final): Use code that doesn't depend on endianness.

	* include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
	to avoid loss of upper bits if align is unsigned and shorter
	than addr.

2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>

	UUID support for UFS

	* fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
	(grub_ufs_uuid): New function.
	(grub_ufs_fs): add .uuid

2009-07-21  Pavel Roskin  <proski@gnu.org>

	* kern/dl.c (grub_dl_check_header): Make static.

2009-07-21  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/30_os-prober.in: Remove unused CHAINROOT.  Don't
	add drivemap for Vista.  It breaks Windows 7.

2009-07-21  Vladimir Serbinenko  <phcoder@gmail.com>

	* fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
	128 bytes

2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>

	Add BFS support

	* conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
	(grub_fstest_SOURCES): Likewise.
	(pkglib_MODULES): Add befs.mod.
	(befs_mod_SOURCES): New variable.
	(befs_mod_CFLAGS): Likewise.
	(befs_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(grub_setup_SOURCES): Likewise.
	* fs/befs.c: New file.
	* fs/afs.c (GRUB_AFS_FSNAME): New declaration.
	(GRUB_AFS_SBLOCK_SECTOR): Likewise.
	(GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
	(GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
	(B_KEY_INDEX_ALIGN): New declaration.
	(B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
	(grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
	(grub_afs_btree) [MODE_BFS]: New conditional declaration.
	(grub_afs_sblock) [MODE_BFS]: Remove link_count.
	(grub_afs_validate_sblock) [MODE_BFS]: Support BFS
	(grub_afs_mount) [MODE_BFS]: Likewise.
	(grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
	(grub_afs_fs): Use GRUB_AFS_FSNAME
	(GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
	(GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
	(GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
	(GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this

2009-07-19  Yves BLUSSEAU  <yves.grub-devel@zetam.org>

	* util/getroot.c (find_root_device): Add support for MacOSX.
	* util/hostdisk.c: Likewise.

2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>

	* font/font.c (find_glyph): Check whether a font is present to avoid
	segmentation fault.

2009-07-20  Joe Auricchio  <jauricchio@gmail.com>

	* term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.

2009-07-20  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Trim excessively wordy excuses.

2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>

	Add symlink, mtime and label support to AtheFS.

	* fs/afs.c (grub_afs_sblock): Declare `name' as char.
	(grub_afs_iterate_dir): Handle symlinks.
	(grub_afs_open): Use grub_afs_read_symlink.
	(grub_afs_dir): Likewise.
	Pass mtime.
	(grub_afs_label): New function.
	(grub_afs_fs): Add grub_afs_label.
	(grub_afs_read_symlink): New function.

2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix AtheFS support.

	* fs/afs.c: Fix comments style.
	(grub_afs_blockrun): Declare as packed.
	(grub_afs_datastream): Likewise.
	(grub_afs_bnode): Likewise.
	(grub_afs_btree): Likewise.
	(grub_afs_sblock): Likewise.
	Declare `name' as char.
	(grub_afs_inode): Declare as packed.
	Change void *vnode to grub_uint32_t unused.
	(grub_afs_iterate_dir): Check that key_size is positive.
	(grub_afs_mount): Don't read superblock twice.
	(grub_afs_dir): Don't free node in case of error,
	grub_fshelp_find_file already handles this.
	(grub_afs_open): Likewise.

2009-07-19  Pavel Roskin  <proski@gnu.org>

	* Makefile.in: Remove LIBLZO and enable_lzo.
	* conf/i386-pc.rmk: Remove lzo support.
	* configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
	* include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
	support.
	* kern/i386/pc/lzo1x.S: Remove.
	* kern/i386/pc/startup.S: Remove lzo support.
	* util/i386/pc/grub-mkimage.c: Likewise.

2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>

	* disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
	* fs/xfs.c (grub_xfs_dir): Likewise.
	* fs/afs.c (grub_afs_dir): Likewise.
	* fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
	(grub_iso9660_open): Likewise.
	* fs/jfs.c (grub_jfs_open): Likewise.
	* fs/ext2.c (grub_ext2_dir): Likewise.
	* include/grub/macho.h (grub_macho_fat_arch): Likewise.
	* script/sh/lexer.c (grub_script_yylex): Likewise.

2009-07-16  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Never add "-c" to CFLAGS.

	* configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.

	* configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
	grub_cv_cc_efiemu should be used.

	* configure.ac: Typo fixes.

	* kern/mm.c (grub_zalloc): New function.
	(grub_debug_zalloc): Likewise.
	* include/grub/mm.h: Declare grub_zalloc() and
	grub_debug_zalloc().
	* util/misc.c (grub_zalloc): New function.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
	instead of grub_malloc(), remove unneeded initializations.
	* bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
	* commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
	* commands/parttool.c (grub_cmd_parttool): Likewise.
	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
	* disk/raid5_recover.c (grub_raid5_recover): Likewise.
	* disk/raid6_recover.c (grub_raid6_recover): Likewise.
	* disk/usbms.c (grub_usbms_finddevs): Likewise.
	* efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
	* efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
	(grub_cmd_efiemu_pnvram): Likewise.
	* fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
	* fs/iso9660.c (grub_iso9660_mount): Likewise.
	(grub_iso9660_iterate_dir): Likewise.
	* fs/jfs.c (grub_jfs_opendir): Likewise.
	* fs/ntfs.c (list_file): Likewise.
	(grub_ntfs_mount): Likewise.
	* kern/disk.c (grub_disk_open): Likewise.
	* kern/dl.c (grub_dl_load_core): Likewise.
	* kern/elf.c (grub_elf_file): Likewise.
	* kern/env.c (grub_env_context_open): Likewise.
	(grub_env_set): Likewise.
	(grub_env_set_data_slot): Likewise.
	* kern/file.c (grub_file_open): Likewise.
	* kern/fs.c (grub_fs_blocklist_open): Likewise.
	* loader/i386/multiboot.c (grub_module): Likewise.
	* loader/xnu.c (grub_xnu_create_key): Likewise.
	(grub_xnu_create_value): Likewise.
	* normal/main.c (grub_normal_add_menu_entry): Likewise.
	(read_config_file): Likewise.
	* normal/menu_entry.c (make_screen): Likewise.
	* partmap/sun.c (sun_partition_map_iterate): Likewise.
	* script/sh/lexer.c (grub_script_lexer_init): Likewise.
	* script/sh/script.c (grub_script_parse): Likewise.
	* video/bitmap.c (grub_video_bitmap_create): Likewise.
	* video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
	* video/readers/png.c (grub_png_output_byte): Likewise.
	(grub_video_reader_png): Likewise.

2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>

	Enable all targets that can be built by default

	* configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
	grub-mkfont and grub-fstest if they can be built

2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix hang and segmentation fault in grub-emu-usb

	* disk/scsi.c (grub_scsi_open): return err and not grub_errno
	* util/usb.c (grub_libusb_devices): likewise
	(grub_libusb_init): rename to ...
	(GRUB_MOD_INIT (libusb)):...this
	(grub_libusb_fini): rename to ..
	(GRUB_MOD_FINI (libusb)):...this
	* disk/usbms.c (grub_usbms_transfer): fix retry logic
	* include/grub/disk.h (grub_raid_init): removed, it's useless
	(grub_raid_fini): likewise
	(grub_lvm_init): likewise
	(grub_lvm_fini): likewise
	* util/grub-emu.c (main): don't call grub_libusb_init, it's done
	by grub_init_all

2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix libusb

	* Makefile.in (LIBUSB): new macro
	* genmk.rb (Utility/print_tail): new method
	(Utility/rule): use intermediary variable #{prefix}_OBJECTS
	(top level): call util.print_tail at the end.

2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>

	Make FreeBSD accept zpool.cache

	* loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
	type is /boot/zfs/zpool.cache

2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix 64-bit efiemu

	* include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
	correct wrong typedef
	* efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes

2009-07-15  Pavel Roskin  <proski@gnu.org>

	* include/grub/disk.h (struct grub_disk_dev): Use enum for id.
	* kern/disk.c (struct grub_disk_cache): Likewise.

	* commands/probe.c (options): Typo fix.

	* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
	Increase to 0x5a to accommodate FAT32.  Adjust other offsets
	accordingly.
	Original patch by Yves Blusseau <yves.grub-devel@zetam.org>

	* boot/i386/pc/boot.S (general_error_string): Add DOS newline at
	the end of "Error" to make the message more readable.

	* boot/i386/pc/boot.S (kernel_segment): Remove.
	(copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
	for destination.

	* boot/i386/pc/boot.S (boot_version): Remove.
	* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
	Remove.

	* include/grub/i386/pc/boot.h: Sort all offsets.
	(GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
	(GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
	* boot/i386/pc/boot.S: Assert location of every offset listed in
	include/grub/i386/pc/boot.h.

2009-07-13  Pavel Roskin  <proski@gnu.org>

	* include/grub/i386/coreboot/machine.h: Rename
	GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
	* loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
	multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.

	* kern/dl.c: Force native word size to suppress warnings when
	compiling grub-emu.

	* kern/device.c (grub_device_iterate): Change struct part_ent to
	hold the name, not a pointer to it.  Use one grub_malloc() per
	partition, not two.  Free partition_name if grub_malloc() fails.
	Set ents to NULL only before grub_partition_iterate() is called.

2009-07-11  Bean  <bean123ch@gmail.com>

	* kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
	childname.

2009-07-10  Bean  <bean123ch@gmail.com>
2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>

	* kern/ieee1275/openfw.c (grub_children_iterate)
	(grub_devalias_iterate): Fix size evaluation for property or path
	strings, which was broken since r2132.

2009-07-07  Pavel Roskin  <proski@gnu.org>

	* commands/search.c (search_file): Merge into ...
	(search_fs): ... this.  Accept search type as argument.
	(grub_cmd_search): Pass search type to search_fs().

	* include/grub/util/console.h: New file.
	* util/console.c: Use it instead of grub/machine/console.h.
	* util/grub-emu.c: Likewise.

	* lib/arg.c (find_long_option): Remove.
	(find_long): Add `len' argument, make `s' const char *.
	(grub_arg_parse): Parse long options in place, not in a
	temporary buffer.

2009-07-06  Pavel Roskin  <proski@gnu.org>

	* commands/search.c (search_fs): Fix potential NULL pointer
	dereference.

	* commands/search.c (search_fs): Replace QUID macro with quid_fn
	function pointer.

2009-07-06  Daniel Mierswa  <impulze@impulze.org>

	* commands/search.c (search_fs): Use grub_strcasecmp() for UUID
	comparison.

2009-07-05  Pavel Roskin  <proski@gnu.org>

	* include/grub/i386/linux.h (struct linux_kernel_params):
	Restore padding3, it's still needed.

	* util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
	FreeBSD.
	* util/osdetect.lua: Likewise.

2009-07-05  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.

	* script/lua/grub_lib.c (grub_lua_run): Check input parameter.
	(grub_lua_getenv): Likewise.
	(grub_lua_setenv): Likewise.
	(save_errno): New function.
	(push_result): Likewise.
	(grub_lua_enum_device): Likewise.
	(grub_lua_enum_file): Likewise.
	(grub_lua_file_open): Likewise.
	(grub_lua_file_close): Likewise.
	(grub_lua_file_seek): Likewise.
	(grub_lua_file_read): Likewise.
	(grub_lua_file_getline): Likewise.
	(grub_lua_file_getsize): Likewise.
	(grub_lua_file_getpos): Likewise.
	(grub_lua_file_eof): Likewise.
	(grub_lua_file_exist): Likewise.
	(grub_lua_add_menu): Likewise.

	* script/lua/grub_lua.h (isupper): New inline function.
	(islower): Likewise.
	(ispunct): Likewise.
	(isxdigit): Likewise.
	(strcspn): Change to normal function.
	(strpbkr): New function declaration.
	(memchr): Likewise.

	* script/lua/grub_main.c (scan_str): New function.
	(strcspn): Likewise.
	(strpbrk): Likewise.
	(memchr): Likewise.

	* script/lua/linit.c (lualibs): Enable the string library.

	* util/osdetect.lua: New file.

2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/linux.h (struct linux_kernel_params): Add
	`capabilities' member.

2009-07-02  Pavel Roskin  <proski@gnu.org>

	* genparttoollist.sh: Add missing newline at the end.

2009-07-01  Pavel Roskin  <proski@gnu.org>

	* kern/x86_64/efi/callwrap.S: Add missing newline at the end.

	* util/hostdisk.c (open_device): Remove `const' from
	`sysctl_size', as sysctlbyname() can change it (in this case it
	doesn't actually happen).

	* include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
	using signed long int constants.

	* util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
	constant to avoid a warning on FreeBSD.

	* util/hostdisk.c (device_is_wholedisk): Compile only on systems
	where it's needed.

	* Makefile.in: Install include/grub/machine symlink.

	* Makefile.in: When installing symlinks, use "cp -fR", which
	works on FreeBSD and MacOSX.
	From Yves Blusseau <cl7m42e02@sneakemail.com>

	* kern/dl.c (grub_dl_resolve_symbol): Make static.
	* include/grub/dl.h: Remove grub_dl_resolve_symbol().

	* util/misc.c: Move grub_reboot() and grub_halt() ...
	* util/grub-emu.c: ... here.  Make main_env static.
	* include/grub/util/misc.h: Remove main_env.

	* kern/mm.c: Use correct format to print size_t.

	* include/grub/elf.h: Define Elf_Sword and Elf_Xword.
	* kern/i386/dl.c: Use ELF symbols without "32" or "64".
	* kern/powerpc/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/x86_64/dl.c: Likewise.

2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>

	Fix grub-emu build on sparc64-ieee1275.

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.

2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>

	* util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
	(grub_reboot, grub_halt): New functions.

	* util/i386/pc/misc.c: Delete.  Update all users.
	* util/sparc64/ieee1275/misc.c: Likewise.
	* util/powerpc/ieee1275/misc.c: Likewise.

2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>

	* conf/i386.rmk (setjmp_mod_SOURCES)
	(setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
	* conf/common.rmk (setjmp_mod_SOURCES)
	(setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
	to use $(target_cpu).
	* conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
	(setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Use
	$(target_cpu) for kern/$(target_cpu)/dl.c.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
	$(target_cpu) for kern/$(target_cpu)/dl.c and for
	kern/$(target_cpu)/cache.S.
	* conf/sparc64-ieee1275.rmk: Likewise.

2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
	type to `grub_uint8_t', and adjust `padding9' accordingly.

2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.

	* loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
	assembly in final jump, using register constraints.

	(grub_linux_boot): For text mode, initialize `have_vga' using
	GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).

	Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
	right before the final jump.

	Set `video_mode' to 0x3.

	Document initialization of `video_page', `video_mode' and
	`video_ega_bx'.

2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
	* loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
	and set GRUB_LINUX_FLAG_QUIET appropriately.

2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>

	Fix build on Debian / sparc.

	* configure.ac: Recognize `sparc' target_cpu (as sparc64).

2009-06-28  Pavel Roskin  <proski@gnu.org>

	* kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
	fix a warning.

	* util/grub.d/10_linux.in: Match SUSE style initrd names.

2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
	`err'.

2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>

	Revert r2338.

	* loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
	file can't be opened.  grub_file_open() is already supposed to set
	grub_errno / grub_errmsg appropriately.
	* loader/i386/pc/linux.c (grub_cmd_linux): Likewise.

2009-06-27  Pavel Roskin  <proski@gnu.org>
2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/dl.h: Include grub/elf.h.
	(struct grub_dl): Add symtab field.
	* kern/dl.c [GRUB_MACHINE_QEMU]: Define
	GRUB_MODULES_MACHINE_READONLY.
	(grub_dl_resolve_symbols): Populate mod->symtab, making a copy
	of the header for read-only modules.
	(grub_dl_unload): Free mod->symtab for read-only modules.
	* kern/i386/dl.c: Use mod->symtab.
	* kern/powerpc/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/x86_64/dl.c: Likewise.

	* conf/i386-qemu.rmk: New file.
	* kern/i386/qemu/startup.S: Likewise.
	* kern/i386/qemu/mmap.c: Likewise.
	* boot/i386/qemu/boot.S: Likewise.
	* include/grub/i386/qemu/time.h: Likewise.
	* include/grub/i386/qemu/serial.h: Likewise.
	* include/grub/i386/qemu/kernel.h: Likewise.
	* include/grub/i386/qemu/console.h: Likewise.
	* include/grub/i386/qemu/boot.h: Likewise.
	* include/grub/i386/qemu/init.h: Likewise.
	* include/grub/i386/qemu/machine.h: Likewise.
	* include/grub/i386/qemu/loader.h: Likewise.
	* include/grub/i386/qemu/memory.h: Likewise.

	* conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
	(GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
	[qemu] (pkglib_IMAGES): Add `boot.img'.
	[qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
	[qemu] (boot_img_FORMAT): New variables.
	[qemu] (bin_UTILITIES): Add `grub-mkimage'.
	[qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
	[qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
	[qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
	[qemu] (kernel_img_FORMAT): New variables.

	* configure.ac: Recognise `i386-qemu'.

	* util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
	(for no compression).
	[GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
	a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
	`GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
	`GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
	ifdefs).

2009-06-27  Pavel Roskin  <proski@gnu.org>

	* efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
	read.
	* efiemu/prepare32.c: Likewise.
	* efiemu/prepare64.c: Likewise.

2009-06-26  Pavel Roskin  <proski@gnu.org>

	* include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
	* include/grub/elf.h: Define symbols without "32" or "64" based
	on GRUB_TARGET_WORDSIZE.
	* include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
	* efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
	ELF definitions.
	* efiemu/loadcore64.c: Likewise.
	* loader/i386/bsd32.c: Likewise.
	* loader/i386/bsd64.c: Likewise.
	* kern/dl.c: Remove own ELF definitions.
	* util/i386/efi/grub-mkimage.c: Likewise.

2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>

	* kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
	segment 0x0 unconditionally, because the reference generated by
	GAS is an absolute address.

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
	[! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* commands/search.c (grub_cmd_search): Macroify hardcoded args[]
	indexes.  Check for -f explicitly.
	(search_file): Improve error message.
	(GRUB_MOD_INIT(search)): Add missing `-n' to help output.

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
	(GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-coreboot.rmk: Likewise.

	* kern/i386/pc/startup.S (grub_stop): Remove function.
	* kern/i386/ieee1275/startup.S: Likewise.
	* kern/i386/coreboot/startup.S: Likewise.
	* kern/i386/misc.S (grub_stop): New function.

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* kern/i386/pc/startup.S (real_to_prot): Move from here ...
	* kern/i386/realmode.S (real_to_prot): ... to here.

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
	with `kernel.img'.
	(kernel_elf_SOURCES): Rename to ...
	(kernel_img_SOURCES): ... this.
	(kernel_elf_HEADERS): Rename to ...
	(kernel_img_HEADERS): ... this.  Update all users.
	(kernel_elf_ASFLAGS): Rename to ...
	(kernel_img_ASFLAGS): ... this.
	(kernel_elf_CFLAGS): Rename to ...
	(kernel_img_CFLAGS): ... this.
	(kernel_elf_LDFLAGS): Rename to ...
	(kernel_img_LDFLAGS): ... this.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.

	* util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
	with "kernel.img".

2009-06-21  Pavel Roskin  <proski@gnu.org>

	* loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
	to match nested functions.
	* loader/sparc64/ieee1275/linux.c: Likewise.

	* conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.

2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>

	* configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
	all i386 platforms.

2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>

	Fix asm file handling on ELF, and remove workarounds.

	* genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
	and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
	* kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
	* kern/i386/coreboot/startup.S (ASM_FILE): Likewise.

2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>

	Load BSD ELF modules

	* conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
	and loader/i386/bsd64.c
	* include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
	(FREEBSD_MODTYPE_ELF_MODULE): New definition
	(FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
	(grub_freebsd_load_elfmodule32): New declaration
	(grub_freebsd_load_elfmoduleobj64): Likewise
	(grub_freebsd_load_elf_meta32): Likewise
	(grub_freebsd_load_elf_meta64): Likewise
	(grub_freebsd_add_meta): Likewise
	(grub_freebsd_add_meta_module): Likewise
	* loader/i386/bsd.c (grub_freebsd_add_meta): Make global
	(grub_freebsd_add_meta_module): Likewise and move module-specific
	parts to grub_cmd_freebsd and grub_cmd_freebsd_module
	(grub_cmd_freebsd): Add elf-kernel specific parts
	based on grub_freebsd_add_meta_module
	(grub_cmd_freebsd_module): Add type parsing moved from
	grub_freebsd_add_meta_module
	(grub_cmd_freebsd_module_elf): New function
	(cmd_freebsd_module_elf): New variable
	(GRUB_MOD_INIT): Register freebsd_module_elf
	* loader/i386/bsd32.c: New file
	* loader/i386/bsd64.c: Likewise
	* loader/i386/bsdXX.c: Likewise
	* kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
	(grub_elf64_load): Likewise
	* include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
	All users updated
	(grub_elf64_load_hook_t): Likewise

2009-06-21  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
	variable.
	* util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
	don't write a menu entry for recovery mode.

2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>

	* util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
	after it's no longer needed.

2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/loader.h (grub_linux_prot_size)
	(grub_linux_tmp_addr, grub_linux_real_addr)
	(grub_linux_is_bzimage, grub_linux16_boot): Declare only on
	GRUB_MACHINE_PCBIOS.
	* util/i386/pc/grub-mkimage.c (compress_kernel): Move
	common grub_util_info() call to ...
	(generate_image): ... here.
	Fix use of uninitialized memory, comparison of signed with
	unsigned integers and memory leak.
	Remove bogus module address message.

2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>

	* disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
	grub_raid_register
	* disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise

2009-06-19  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Remove stray AC_MSG_CHECKING.

2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>

	* disk/scsi.c (grub_scsi_open): use continue instead of big if

2009-06-18  Pavel Roskin  <proski@gnu.org>

	* conf/common.rmk: Add fs_file.mod.
	* disk/fs_file.c: New file.
	* include/grub/disk.h (enum grub_disk_dev_id): Add
	GRUB_DISK_DEVICE_FILE_ID.

2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix build with Apple's toolchain. Part 2

	* aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
	a fake start

2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix build with Apple's toolchain. Part 1

	* commands/i386/pc/drivemap_int13h.S: use assembly-time constants
	for long calls
	* configure.ac: remove a leftover AC_MSG_RESULT
	(CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
	Apple's toolchain

2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix warnings

	* fs/ntfscomp.c (decomp_get16): initialize c1 and c2
	(decomp_block): initialize ch
	use grub_memcpy instead of memcpy

2009-06-17  Pavel Roskin  <proski@gnu.org>

	* include/grub/i386/coreboot/console.h: Don't use the i386-pc
	version, use declarations needed to use vga_text as the startup
	console.

	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
	term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
	the kernel.
	* kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
	and grub_at_keyboard_fini(), it's done on module load and
	unload.

2009-06-17  Felix Zielcke  <fzielcke@z-51.de>

	* loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
	file can't be found.
	* loader/i386/pc/linux.c (grub_cmd_linux): Likewise.

2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix newline handling

	* include/grub/script_sh.h (grub_lexer_param): new field was_newline
	* script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
	(grub_script_yylex): don't segfault on unterminated script
	newline terminates command and variable

2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>

	avoid double grub_adjust_range call. Bug reported by David Simner

	* kern/disk.c (grub_disk_write): change to raw disk access before
	calling disk_read

2009-06-17  Colin Watson  <cjwatson@ubuntu.com>

	* util/elf/grub-mkimage.c (usage): Prefix each option line with two
	spaces, for the benefit of help2man.
	* util/i386/efi/grub-mkimage.c (usage): Likewise.

2009-06-16  Pavel Roskin  <proski@gnu.org>

	* kern/i386/halt.c: Include grub/machine/init.h.
	* kern/i386/reboot.c: Include grub/cpu/reboot.h.

2009-06-16  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/30_os-prober.in: Use ${root} in the generated
	drivemap menuentry.

2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>

	* commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
	`echo' command.

2009-06-16  Pavel Roskin  <proski@gnu.org>

	* boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
	boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
	save %dx, we only need %dl and we never change it.
	* boot/i386/pc/cdboot.S: Don't set the root drive.
	* boot/i386/pc/pxeboot.S: Likewise.
	* include/grub/i386/pc/boot.h: Remove
	GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
	GRUB_BOOT_MACHINE_DRIVE_CHECK.
	* include/grub/i386/pc/kernel.h: Remove grub_root_drive.
	* kern/i386/pc/init.c (make_install_device): Remove references
	to grub_root_drive.
	* kern/i386/pc/startup.S: Likewise.
	* util/i386/pc/grub-setup.c (setup): Don't set root_drive.

2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>

	xnu_uuid command

	* commands/xnu_uuid.c: new file
	* conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
	(xnu_uuid_mod_SOURCES): new variable
	(xnu_uuid_mod_CFLAGS): likewise
	(xnu_uuid_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin

2009-06-16  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Avoid '==' in test command, it's not portable.

2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>

	Probe command

	* commands/probe.c: new file
	* conf/common.rmk (pkglib_MODULES): add probe.mod
	(probe_mod_SOURCES): new variable
	(probe_mod_CFLAGS): likewise
	(probe_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise

2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix handling of string like \"hello\" and "a
	b"

	* script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
	(grub_script_yylex): fix parsing of quoting, escaping and newline

2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>

	* loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
	handling

2009-06-13  Jun Inoue  <jun.lambda@gmail.com>

	* util/grub-mkconfig.in: Fix parsing of --output option.

2009-06-12  Pavel Roskin  <proski@gnu.org>

	* Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
	genmk.rb don't need to be generated or installed.

2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>

	* commands/i386/pc/drivemap_int13h.S: add more comments

2009-06-11  Pavel Roskin  <proski@gnu.org>

	* Makefile.in (uninstall): Uninstall manuals.

	* Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
	PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
	and update-grub_lib in two places.
	* conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.

	* disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
	a compiler warning.

	* loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
	`entry_lo' to fix variable shadowing.

2009-06-11  Christian Franke  <franke@computer.org>

	* kern/misc.c (__enable_execute_stack): Add missing return type
	to prevent gcc warning.

2009-06-11  Felix Zielcke  <fzielcke@z-51.de>

	* conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.

2009-06-11  Pavel Roskin  <proski@gnu.org>

	* Makefile.in: Don't rely on any scripts being executable.
	Always use $(SHELL) to run shell scripts.

	* configure.ac: Always define ___main if using -nostdlib.  This
	fixes tests on Cygwin.

2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>

	UDF fix

	* fs/udf.c (grub_udf_read_block): handle the fact that ad->length
	is in bytes and not in blocks

2009-06-11  Pavel Roskin  <proski@gnu.org>

	* kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
	warning.

2009-06-11  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/30_os-prober.in: Fix a comment. Source
	${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
	to set the root device.  Place drivemap command in the generated
	chain entry.

2009-06-11  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Remove host_m32.  Issues with 64-bit utilities
	have long been resolved.

2009-06-11  Colin Watson  <cjwatson@ubuntu.com>

	* util/grub.d/10_linux.in: Capitalise "Linux".

	* util/grub-pe2elf.c (usage): Fix references to grub-editenv.

2009-06-11  Pavel Roskin  <proski@gnu.org>

	* kern/efi/efi.c (grub_exit): Add infinite loop at the end to
	fix a gcc warning and ensure that the function won't ever exit.

	* kern/i386/ieee1275/init.c: Add missing prototype for
	grub_stop_floppy().

	* loader/ieee1275/multiboot2.c [__i386__]: Include
	grub/cpu/multiboot.h.

	* term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
	casts to short - they are not portable and cause warnings.  Fix
	use of uninitialized values in input_buf.  Use ARRAY_SIZE.

2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>

	Drivemap fixes

	* commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
	new function
	(grub_get_root_biosnumber_saved): new variable
	(GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
	(GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
	* commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
	%dx after the call if necessary
	* conf/common.rmk (pkglib_MODULES): remove boot.mod
	(boot_mod_SOURCES): remove
	(boot_mod_CFLAGS): remove
	(boot_mod_LDFLAGS): remove
	* conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
	(boot_mod_SOURCES): new variable
	(boot_mod_CFLAGS): likewise
	(boot_mod_LDFLAGS): likewise
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/i386/pc/biosnum.h: new file
	* lib/i386/pc/biosnum.c: likewise
	* loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
	* loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
	* loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise

2009-06-10  Pavel Roskin  <proski@gnu.org>

	* io/gzio.c (test_header): Don't reuse one buffer for all data.
	Use separate variables.  Read only the file size at the end, but
	not the checksum that we don't use.

	* kern/file.c (grub_file_read): Use void pointer for the buffer.
	Adjust all callers.

	* kern/ieee1275/openfw.c: Remove libc includes.
	* kern/ieee1275/cmain.c: Likewise.
	* include/grub/ieee1275/ieee1275.h: Likewise.

	* kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
	compiler warnings.

2009-06-10  Felix Zielcke  <fzielcke@z-51.de>

	* Makefile.in: Remove all trailing whitespace.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* docs/grub.texi: Likewise.
	* docs/texinfo.tex: Likewise.
	* disk/fs_uuid.c: Likewise.
	* disk/lvm.c: Likewise.
	* disk/scsi.c: Likewise.
	* disk/ata.c: Likewise.
	* disk/ieee1275/ofdisk.c: Likewise.
	* disk/i386/pc/biosdisk.c: Likewise.
	* disk/host.c: Likewise.
	* disk/raid.c: Likewise.
	* disk/efi/efidisk.c: Likewise.
	* disk/usbms.c: Likewise.
	* disk/memdisk.c: Likewise.
	* disk/loopback.c: Likewise.
	* kern/powerpc/dl.c: Likewise.
	* kern/device.c: Likewise.
	* kern/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/ieee1275/ieee1275.c: Likewise.
	* kern/term.c: Likewise.
	* kern/fs.c: Likewise.
	* kern/i386/dl.c: Likewise.
	* kern/i386/pc/startup.S: Likewise.
	* kern/i386/pc/init.c: Likewise.
	* kern/i386/pc/mmap.c: Likewise.
	* kern/i386/pc/lzo1x.S: Likewise.
	* kern/i386/ieee1275/init.c: Likewise.
	* kern/i386/realmode.S: Likewise.
	* kern/i386/tsc.c: Likewise.
	* kern/partition.c: Likewise.
	* kern/corecmd.c: Likewise.
	* kern/file.c: Likewise.
	* kern/efi/efi.c: Likewise.
	* kern/efi/init.c: Likewise.
	* kern/efi/mm.c: Likewise.
	* kern/main.c: Likewise.
	* kern/err.c: Likewise.
	* kern/env.c: Likewise.
	* kern/disk.c: Likewise.
	* kern/generic/millisleep.c: Likewise.
	* kern/generic/rtc_get_time_ms.c: Likewise.
	* kern/misc.c: Likewise.
	* kern/parser.c: Likewise.
	* genmk.rb: Likewise.
	* configure.ac: Likewise.
	* boot/i386/pc/diskboot.S: Likewise.
	* boot/i386/pc/pxeboot.S: Likewise.
	* boot/i386/pc/boot.S: Likewise.
	* boot/i386/pc/lnxboot.S: Likewise.
	* boot/i386/pc/cdboot.S: Likewise.
	* parttool/pcpart.c: Likewise.
	* video/readers/tga.c: Likewise.
	* video/video.c: Likewise.
	* video/bitmap.c: Likewise.
	* lib/envblk.c: Likewise.
	* lib/i386/setjmp.S: Likewise.
	* fs/xfs.c: Likewise.
	* fs/afs.c: Likewise.
	* fs/fat.c: Likewise.
	* fs/ntfs.c: Likewise.
	* fs/udf.c: Likewise.
	* fs/affs.c: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/fshelp.c: Likewise.
	* fs/ext2.c: Likewise.
	* fs/jfs.c: Likewise.
	* fs/reiserfs.c: Likewise.
	* fs/hfsplus.c: Likewise.
	* fs/minix.c: Likewise.
	* fs/cpio.c: Likewise.
	* fs/sfs.c: Likewise.
	* fs/ufs.c: Likewise.
	* efiemu/prepare.c: Likewise.
	* efiemu/loadcore_common.c: Likewise.
	* efiemu/runtime/efiemu.sh: Likewise.
	* efiemu/runtime/efiemu.S: Likewise.
	* efiemu/runtime/efiemu.c: Likewise.
	* efiemu/pnvram.c: Likewise.
	* efiemu/main.c: Likewise.
	* efiemu/i386/pc/cfgtables.c: Likewise.
	* efiemu/i386/loadcore64.c: Likewise.
	* efiemu/i386/loadcore32.c: Likewise.
	* efiemu/loadcore.c: Likewise.
	* efiemu/symbols.c: Likewise.
	* efiemu/mm.c: Likewise.
	* include/grub/autoefi.h: Likewise.
	* include/grub/datetime.h: Likewise.
	* include/grub/term.h: Likewise.
	* include/grub/hfs.h: Likewise.
	* include/grub/lvm.h: Likewise.
	* include/grub/i386/tsc.h: Likewise.
	* include/grub/i386/linux.h: Likewise.
	* include/grub/i386/xnu.h: Likewise.
	* include/grub/i386/efiemu.h: Likewise.
	* include/grub/i386/pc/biosdisk.h: Likewise.
	* include/grub/i386/pc/memory.h: Likewise.
	* include/grub/i386/pc/vbe.h: Likewise.
	* include/grub/parttool.h: Likewise.
	* include/grub/video.h: Likewise.
	* include/grub/memory.h: Likewise.
	* include/grub/fs.h: Likewise.
	* include/grub/partition.h: Likewise.
	* include/grub/xnu.h: Likewise.
	* include/grub/efi/api.h: Likewise.
	* include/grub/efi/pe32.h: Likewise.
	* include/grub/efi/memory.h: Likewise.
	* include/grub/multiboot.h: Likewise.
	* include/grub/usbdesc.h: Likewise.
	* include/grub/multiboot2.h: Likewise.
	* include/grub/acpi.h: Likewise.
	* include/grub/efiemu/efiemu.h: Likewise.
	* include/grub/disk.h: Likewise.
	* include/grub/ieee1275/ieee1275.h: Likewise.
	* include/grub/net.h: Likewise.
	* include/grub/machoload.h: Likewise.
	* include/grub/macho.h: Likewise.
	* include/multiboot.h: Likewise.
	* genmoddep.awk: Likewise.
	* normal/main.c: Likewise.
	* normal/menu_entry.c: Likewise.
	* normal/menu_viewer.c: Likewise.
	* normal/completion.c: Likewise.
	* normal/cmdline.c: Likewise.
	* normal/misc.c: Likewise.
	* normal/datetime.c: Likewise.
	* bus/usb/usbtrans.c: Likewise.
	* bus/usb/ohci.c: Likewise.
	* bus/usb/uhci.c: Likewise.
	* bus/usb/usb.c: Likewise.
	* mmap/efi/mmap.c: Likewise.
	* mmap/i386/pc/mmap_helper.S: Likewise.
	* mmap/i386/pc/mmap.c: Likewise.
	* mmap/i386/mmap.c: Likewise.
	* mmap/i386/uppermem.c: Likewise.
	* mmap/mmap.c: Likewise.
	* commands/acpi.c: Likewise.
	* commands/echo.c: Likewise.
	* commands/blocklist.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/usbtest.c: Likewise.
	* commands/boot.c: Likewise.
	* commands/parttool.c: Likewise.
	* commands/search.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/drivemap.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/i386/pc/acpi.c: Likewise.
	* commands/i386/pc/vbetest.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/test.c: Likewise.
	* commands/efi/acpi.c: Likewise.
	* commands/gptsync.c: Likewise.
	* commands/help.c: Likewise.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* partmap/acorn.c: Likewise.
	* partmap/pc.c: Likewise.
	* partmap/sun.c: Likewise.
	* partmap/gpt.c: Likewise.
	* script/sh/lexer.c: Likewise.
	* script/sh/function.c: Likewise.
	* font/font.c: Likewise.
	* font/font_cmd.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/efi/chainloader.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* loader/macho.c: Likewise.
	* loader/i386/multiboot.c: Likewise.
	* loader/i386/linux.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/multiboot2.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/xnu.c: Likewise.
	* loader/i386/bsd_trampoline.S: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/multiboot_elfxx.c: Likewise.
	* loader/i386/bsd_helper.S: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/linux_trampoline.S: Likewise.
	* loader/i386/xnu_helper.S: Likewise.
	* loader/i386/xnu.c: Likewise.
	* loader/i386/bsd_pagetable.c: Likewise.
	* loader/i386/multiboot_helper.S: Likewise.
	* loader/xnu.c: Likewise.
	* loader/xnu_resume.c: Likewise.
	* io/gzio.c: Likewise.
	* term/efi/console.c: Likewise.
	* term/terminfo.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/usb_keyboard.c: Likewise.
	* term/gfxterm.c: Likewise.
	* aclocal.m4: Likewise.
	* util/lvm.c: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/console.c: Likewise.
	* util/grub-macho2img.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/hostfs.c: Likewise.
	* util/i386/pc/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/i386/efi/grub-mkimage.c: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/raid.c: Likewise.
	* util/resolve.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.
	* util/grub-emu.c: Likewise.
	* util/getroot.c: Likewise.
	* util/hostdisk.c: Likewise.
	* util/usb.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/misc.c: Likewise.

2009-06-10  Felix Zielcke  <fzielcke@z-51.de>

	* gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
	`genparttoollist.sh'.
	(DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
	Add `*.sh' to the list find searches for and change `mdate.sh'
	to `mdate-sh'.

2009-06-10  Pavel Roskin  <proski@gnu.org>

	* include/grub/multiboot2.h: Provide compatibility defines for
	multiboot2.h.
	* include/multiboot2.h: Include stdint.h only if needed, using
	angle brackets.
	* loader/i386/pc/multiboot2.c: Include multiboot2.h after
	grub/multiboot2.h.
	* loader/ieee1275/multiboot2.c: Likewise.
	* loader/multiboot2.c: Likewise.
	* loader/multiboot_loader.c: Likewise.

	* configure.ac: Use -nostdlib when probing for the target.  It
	should not be required to have libc for the target.

	* configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
	they fail without libc headers for the target.
	* include/grub/powerpc/libgcc.h: Use weak attribute for all
	exports.
	* include/grub/sparc64/libgcc.h: Likewise.  Don't use
	preprocessor conditionals.

	* conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
	build system doesn't need to be aware of the tar.c internals.

2009-06-09  Michel Hermier  <michel.hermier@gmail.com>

	* fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.

2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>

	* util/deviceiter.c (grub_util_iterate_devices): Increase number of
	disk limit to 26 for IDE, Virtio, Xen and SCSI.

2009-06-09  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-install.in: Change the error message if UUIDs
	aren't available if ata.mod gets used.

2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>

	* bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
	initialising controller.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.

2009-06-08  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-install.in: Add a parameter --disk-module
	to choose between ata and biosdisk module on i386-pc.

2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>

	* bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
	Subclass and Programming Interface fields in terms of the 3 byte
	Class Code register.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.

	* bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
	interface is OHCI.  Add grub_dprintf for symmetry with
	bus/usb/uhci.c.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
	interface is UHCI.  Add interf variable for programming
	interface.  Print interface with class/subclass.

	* bus/usb/ohci.c: Set interf with correct field.

	* bus/usb/uhci.c: Remove unneeded doubled lines.
	* bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
	Remove whitespace inside comment.

2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
	as fallback an equivalent option without depth.

2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>

	Not fail if unable to retrieve C/H/S on LBA disks

	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
	if unable to retrieve C/H/S on LBA disks

2009-06-08  Pavel Roskin  <proski@gnu.org>

	* fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
	about aliasing.

2009-06-08  Felix Zielcke  <fzielcke@z-51.de>

	* Makefile.in (uninstall): Remove all $lib_DATA files.

2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>

	Bugfix: install on partitionless device

	* util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
	is a whole disk

2009-06-08  Felix Zielcke  <fzielcke@z-51.de>

	* Makefile.in (uninstall): Remove all $include_DATA files.

2009-06-08  Felix Zielcke  <fzielcke@z-51.de>

	* commands/true.c: New file.  Implement the true and false commands.
	* conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
	(true_mod_SOURCES): New variable.
	(true_mod_CFLAGS): Likewise.
	(true_mod_LDFLAGS): Likewise.

2009-06-05  Colin D Bennett  <colin@gibibit.com>

	Optimized font character lookup using binary search instead of linear
	search.  Fonts now are required to have the character index ordered by
	code point.

	* font/font.c (load_font_index): Verify that fonts have ordered
	character indices.
	(find_glyph): Use binary search instead of linear search to find a
	character in a font.

2009-06-05  Michael Scherer  <misc@mandriva.org>

	* fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
	uses case sensitive btree.
	(grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
	only for case insensitive filesystems.

2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>

	* conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
	* conf/common.rmk (search_mod_CFLAGS): likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	* kern/i386/pc/startup.S [APPLE_CC]: block of nops to
	compensate a compiler bug

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	* include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
	instead of '\b'

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Definitions for creating asm symbols with Apple's CC

	* include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
	[APPLE_CC] (VARIABLE): likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Disable lnxboot.img when compiled
	with Apple's CC

	* conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
	pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
	* boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
	[! APPLE_CC] (CODE_LENG): skip
	[! APPLE_CC] (setup_sects): likewise
	[! APPLE_CC]: skip filling

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Address in trampolines based on 32-bit registers when compiled
	with Apple's CC

	* loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
	for addresses
	* loader/i386/linux_trampoline.S [APPLE_CC]: likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Avoid aliases when compiling with Apple's CC for PCBIOS machine

	* kern/misc.c [APPLE_CC] (memcpy): new function
	[APPLE_CC] (memmove): likewise
	[APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
	(memcpy): define alias conditionally on !APPLE_CC
	(memset): likewise
	(abort): likewise
	* include/grub/misc.h (memove): don't define when both GRUB_UTIL and
	APPLE_CC are defined
	* include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
	(grub_assert_fail): make prototype conditional

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Use grub-macho2img when compiling with Apple's CC for PCBIOS machine

	* conf/common.rmk (bin_UTILITIES): add (on false on condition)
	grub-macho2img
	(CLEANFILES): add grub-macho2img
	(grub_macho2img_SOURCES): new variable
	* kern/i386/pc/startup.S (bss_start): new variable
	(bss_end): likewise
	* genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
	* util/grub-macho2img.c: new file

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Use objconv when compiling with Apple's CC

	* conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
	(efiemu64.o): likewise
	(efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
	when compiling with Apple's CC
	(efiemu64_s.o): likewise
	* configure.ac: check for objconv when compiling with Apple's CC
	* genmk.rb: use objconv for modules when compiled with Apple's CC

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Define segment as well as section when compiling with
	Apple's CC

	* efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
	(efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
	(efiemu_convert_pointer): likewise
	(efiemu_set_virtual_address_map): likewise
	(efiemu_convert_pointer): likewise
	(efiemu_getcrc32): likewise
	(init_crc32_table): likewise
	(reflect): likewise
	* include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
	(GRUB_MOD_DEP): likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Allow a compilation without -mcmodel=large

	* kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
	when compiled without -mcmodel=large
	(filter_memory_map): remove memory post 4 GiB when compiled
	without -mcmodel=large
	* configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
	TARGET_CFLAGS when -mcmodel=large isn't supported

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Remove nested functions in efiemu core

	* efiemu/runtime/efiemu.c (reflect): make static instead of nested

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC

	* efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
	temporary storage
	* include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
	using Apple's CC
	(grub_cpu_is_tsc_supported): likewise
	* loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Absolute addressing through constant with Apple's cc

	* kern/i386/pc/startup.S: Define necessary constants
	and address through it when using ABS with Apple's CC
	* boot/i386/pc/diskboot.S: likewise
	* boot/i386/pc/boot.S: likewise
	* boot/i386/pc/lnxboot.S: likewise
	* boot/i386/pc/cdboot.S: likewise
	* mmap/i386/pc/mmap_helper.S: likewise
	* commands/i386/pc/drivemap_int13h.S: likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Check if compiler is apple cc

	* Makefile.in (ASFLAGS): new variable
	(TARGET_ASFLAGS): likewise
	(TARGET_MODULE_FORMAT): likewise
	(TARGET_APPLE_CC): likewise
	(OBJCONV): likewise
	(TARGET_IMG_CFLAGS): likewise
	(TARGET_CPPFLAGS): add includedir
	* configure.ac: call grub_apple_cc and grub_apple_target_cc
	(TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
	Check for linker script only if compiler isn't Apple's CC
	(TARGET_MODULE_FORMAT): set
	(TARGET_APPLE_CC): likewise
	(TARGET_ASFLAGS): likewise
	(ASFLAGS): likewise
	Check for objcopy only if compiler isn't Apple's CC
	Check for BSS symbol only if compiler isn't Apple's CC
	* genmk.rb: adapt nm options if we use Apple's utils
	* aclocal.m4 (grub_apple_cc): new test
	(grub_apple_target_cc): likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Simplify sed expressions and improve awk

	* Makefile.in (install-local): simplify sed expression
	* gencmdlist.sh: likewise
	* genmoddep.awk: avoid adding module as a dependency of itself

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Add missing start symbols

	* boot/i386/pc/boot.S: add start
	* boot/i386/pc/pxeboot.S: likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Fix wrong assumptions with grub-mkimage on EFI

	* i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
	(relocate_addresses): consider both r_addend and value at offset
	(make_mods_section): zerofill modinfo and header
	(convert_elf): write prefix here

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Use .asciz instead of .string

	* i386/pc/diskboot.S: use .asciz instead of .string
	* i386/pc/boot.S: likewise
	* include/grub/dl.h (GRUB_MOD_DEP): likewise
	(GRUB_MOD_NAME): likewise

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	gfxpayload support

	* commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
	* include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
	(grub_video_setup): remove
	(grub_video_set_mode): new prototype
	* loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
	(vid_mode): remove
	(linux_vesafb_res): compile only on PCBIOS
	(grub_linux_boot): support gfxpayload
	* loader/i386/pc/xnu.c (video_hook): new function
	(grub_xnu_set_video): support gfxpayload
	* term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
	(DEFAULT_VIDEO_HEIGHT): likewise
	(DEFAULT_VIDEO_FLAGS): likewise
	(DEFAULT_VIDEO_MODE): new definition
	(video_hook): new function
	(grub_gfxterm_init): use grub_video_set_mode
	* util/grub.d/30_os-prober.in: remove explicit modesetting before
	loading xnu
	* video/video.c (grub_video_setup): removed
	(grub_video_set_mode): new function based on grub_gfxterm_init and
	grub_video_setup

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Avoid calling biosdisk in drivemap

	* commands/i386/pc/drivemap.c (parse_biosdisk): remove
	(revparse_biosdisk): likewise
	(list_mappings): derive name from id directly
	(grub_cmd_drivemap): use tryparse_diskstring

2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Script fixes

	* include/grub/script_sh.h (grub_script_cmdline): remove cmdline
	(grub_lexer_param): add tokenonhold
	(grub_script_create_cmdline): remove cmdline. All callers updated
	(grub_script_function_create): make functionname
	grub_script_arg. All callers updated
	(grub_script_execute_argument_to_string): new prototype
	* kern/parser.c (state_transitions): reorder
	(grub_parser_cmdline_state): fix a bug and make more compact
	* script/sh/execute.c (grub_script_execute_argument_to_string):
	make global
	(grub_script_execute_cmdline): use new format
	* script/sh/function.c (grub_script_function_create): make functionname
	grub_script_arg. All callers updated
	* script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
	(grub_script_yylex): remove
	(grub_script_yylex2): renamed to ...
	(grub_script_yylex): ...renamed
	parse the expressions like a${b}c
	* script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
	(GRUB_PARSER_TOKEN_VAR): remove
	(GRUB_PARSER_TOKEN_NAME): likewise
	("if"): declare as typeless
	("while"): likewise
	("function"): likewise
	("else"): likewise
	("then"): likewise
	("fi"): likewise
	(text): remove
	(argument): likewise
	(script): accept empty scripts and make exit on error
	(arguments): use GRUB_PARSER_TOKEN_ARG
	(function): likewise
	(command): move error handling to script
	(menuentry): move grub_script_lexer_ref before
	* script/sh/script.c (grub_script_create_cmdline): remove cmdline
	argument. All callers updated

2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>

	Prevent GRUB from probing floppies during boot.

	* conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
	* commands/search.c (options): Add --no-floppy.
	(search_fs, search_file, grub_cmd_search): Support --no-floppy.
	* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
	--no-floppy when searching for UUIDs.

2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>

	Simplify the code duplication in commands/search.c.

	* commands/search.c (search_label, search_fs_uuid): Merge into ...
	(search_fs): ... this.  Update all users.

2009-06-03  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.

2009-05-28  Pavel Roskin  <proski@gnu.org>

	* Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
	Remove the original symlink explicitly.

	* fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
	just one slash.  That's how grub_fshelp_find_file() does it.

2009-05-26  Pavel Roskin  <proski@gnu.org>

	* genmk.rb: Avoid shadowing variable `s', rename the outer `s'
	to `str'.

	* util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
	possibly unused.

2009-05-25  Christian Franke  <franke@computer.org>

	* disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
	register.
	(grub_atapi_identify): Add wait after drive select.
	(grub_ata_identify): Do more strict status register check before
	calling grub_atapi_identify ().  Suppress error message if status
	register is 0x00 after command failure.  Add status register
	check after PIO read to avoid bogus identify due to stuck DRQ.
	Thanks to Pavel Roskin for testing.
	(grub_device_initialize): Remove unsafe status register check.
	Thanks to 'phcoder' for problem report and patch.
	Prevent sign extension in debug message.

2009-05-23  Colin D Bennett  <colin@gibibit.com>

	Cleaned up `include/grub/normal.h'.  Grouped prototypes by
	definition file, and functions defined in `normal/menu.c' have had
	their prototypes moved to `include/grub/menu.h' for consistency.

	* include/grub/menu.h (grub_menu_execute_callback): Added; moved
	from normal.h.
	(grub_menu_get_entry): Likewise.
	(grub_menu_get_timeout): Likewise.
	(grub_menu_set_timeout): Likewise.
	(grub_menu_execute_entry): Likewise.
	(grub_menu_execute_with_fallback): Likewise.
	(grub_menu_entry_run): Likewise.

	* include/grub/normal.h: Re-ordered and grouped function
	prototypes by file that the function is defined in.
	(grub_menu_execute_callback): Removed; moved to menu.h.
	(grub_menu_get_entry): Likewise.
	(grub_menu_get_timeout): Likewise.
	(grub_menu_set_timeout): Likewise.
	(grub_menu_execute_entry): Likewise.
	(grub_menu_execute_with_fallback): Likewise.
	(grub_menu_entry_run): Likewise.
	(grub_menu_addentry): Renamed from this ...
	(grub_normal_add_menu_entry): ... to this.

	* normal/main.c (grub_menu_addentry): Renamed from this ...
	(grub_normal_add_menu_entry): ... to this.

	* script/sh/execute.c (grub_script_execute_menuentry): Update
	reference to renamed grub_menu_addentry function.

2009-05-23  Felix Zielcke  <fzielcke@z-51.de>

	* commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.

2009-05-22  Pavel Roskin  <proski@gnu.org>

	* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
	* configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
	NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
	compiling for the i386 targets, but not for the utilities.

	* include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
	to grub_uint8_t.
	(grub_root_drive): Likewise.
	* kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
	remove alignment.
	(grub_root_drive): Change size to byte.
	(grub_start_addr): Remove.
	(grub_end_addr): Likewise.
	(grub_apm_bios_info): Likewise.

2009-05-21  Felix Zielcke  <fzielcke@z-51.de>

	* normal/i386: Remove.
	* normal/powerpc: Likewise.
	* normal/sparc64: Likewise.
	* normal/x86_64: Likewise.

2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>

	* conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
	* loader/i386/linux_trampoline.S: Fix indentation
	* loader/i386/xnu_helper.S: Likewise

2009-05-18  Colin D Bennett  <colin@gibibit.com>

	Display error messages when parsing a Lua statement fails.
	Previously, executing a syntactically invalid statement like
	")foo" or "bar;" would silently fail.

	* script/lua/grub_main.c (handle_lua_error): New function.
	(grub_lua_parse_line): Improved reporting of Lua parser and
	execution errors.

2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>

	Remove -Werror which causes build to fail on some systems

	* conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
	* conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
	* conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise

2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>

	trampoline for linux on 64-bit platform

	* conf/x86_64-efi.rmk (linux_mod_SOURCES): added
	loader/i386/efi/linux_trampoline.S
	* include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
	declaration
	* kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
	here
	* loader/i386/linux_trampoline.S: moved here
	* loader/i386/efi/linux.c (allocate_pages): reserve space for
	trampoline
	(jumpvector): removed
	(grub_linux_trampoline_start): new declaration
	(grub_linux_trampoline_end): likewise
	(grub_linux_boot): use trampoline when on 64-bit platform
	* loader/i386/linux.c: likewise

2009-05-16  Pavel Roskin  <proski@gnu.org>

	* script/lua/grub_lib.c (grub_lua_getenv): Make name and value
	const to avoid a warning.
	(grub_lua_setenv): Likewise.
	* script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
	lmsg to fix a warning.

2009-05-16  Felix Zielcke  <fzielcke@z-51.de>

	* conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
	(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
	* conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
	(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
	* conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
	(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
	* conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
	(setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).

2009-05-16  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.

2009-05-16  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkglib_MODULES): Add lua.mod.
	(lua_mod_SOURCES): New variable.
	(lua_mod_CFLAGS): Likewise.
	(lua_mod_LDFLAGS): Likewise.

	* conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
	(setjmp_mod_SOURCES): New variable.
	(setjmp_mod_CFLAGS): Likewise.
	(setjmp_LDFLAGS): Likewise.

	* normal/i386/setjmp.S: Moved from here ...
	* lib/i386/setjmp.S: ... Moved here
	* normal/x86_64/setjmp.S: Moved from here ...
	* lib/x86_64/setjmp.S: ... Moved here
	* normal/powerpc/setjmp.S: Moved from here ...
	* lib/powerpc/setjmp.S: ... Moved here
	* normal/sparc64/setjmp.S: Moved from here ...
	* lib/sparc64/setjmp.S: ... Moved here

	* include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
	returns_twice in mingw.

	* script/lua/grub_lib.c: New file.
	* script/lua/grub_lib.h: Likewise.
	* script/lua/grub_lua.h: Likewise.
	* script/lua/grub_main.c: Likewise.
	* script/lua/lapi.c: Likewise.
	* script/lua/lapi.h: Likewise.
	* script/lua/lauxlib.c: Likewise.
	* script/lua/lauxlib.h: Likewise.
	* script/lua/lbaselib.c: Likewise.
	* script/lua/lcode.c: Likewise.
	* script/lua/lcode.h: Likewise.
	* script/lua/ldblib.c: Likewise.
	* script/lua/ldebug.c: Likewise.
	* script/lua/ldebug.h: Likewise.
	* script/lua/ldo.c: Likewise.
	* script/lua/ldo.h: Likewise.
	* script/lua/ldump.c: Likewise.
	* script/lua/lfunc.c: Likewise.
	* script/lua/lfunc.h: Likewise.
	* script/lua/lgc.c: Likewise.
	* script/lua/lgc.h: Likewise.
	* script/lua/linit.c: Likewise.
	* script/lua/liolib.c: Likewise.
	* script/lua/llex.c: Likewise.
	* script/lua/llex.h: Likewise.
	* script/lua/llimits.h: Likewise.
	* script/lua/lmathlib.c: Likewise.
	* script/lua/lmem.c: Likewise.
	* script/lua/lmem.h: Likewise.
	* script/lua/loadlib.c: Likewise.
	* script/lua/lobject.c: Likewise.
	* script/lua/lobject.h: Likewise.
	* script/lua/lopcodes.c: Likewise.
	* script/lua/lopcodes.h: Likewise.
	* script/lua/loslib.c: Likewise.
	* script/lua/lparser.c: Likewise.
	* script/lua/lparser.h: Likewise.
	* script/lua/lstate.c: Likewise.
	* script/lua/lstate.h: Likewise.
	* script/lua/lstring.c: Likewise.
	* script/lua/lstring.h: Likewise.
	* script/lua/lstrlib.c: Likewise.
	* script/lua/ltable.c: Likewise.
	* script/lua/ltable.h: Likewise.
	* script/lua/ltablib.c: Likewise.
	* script/lua/ltm.c: Likewise.
	* script/lua/ltm.h: Likewise.
	* script/lua/lua.h: Likewise.
	* script/lua/luaconf.h: Likewise.
	* script/lua/lualib.h: Likewise.
	* script/lua/lundump.c: Likewise.
	* script/lua/lundump.h: Likewise.
	* script/lua/lvm.c: Likewise.
	* script/lua/lvm.h: Likewise.
	* script/lua/lzio.c: Likewise.
	* script/lua/lzio.h: Likewise.

2009-05-16  Bean  <bean123ch@gmail.com>

	* include/grub/kernel.h (grub_module_header_types): Add type
	OBJ_TYPE_CONFIG.

	* kern/main.c (grub_load_config): New function.
	(grub_main): Call grub_load_config to read boot config.

	* grub-mkimage (generate_image): New parameter config_path.
	(options): New option --config.
	(main): Parse --config option, and pass it to generate_image.

2009-05-14  Christian Franke  <franke@computer.org>

	* commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
	This fixes build on Cygwin.

2009-05-14  Pavel Roskin  <proski@gnu.org>

	* commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
	jump.  This saves two bytes, so the typical case of 2 swapped
	drives would fit 32 bytes.

2009-05-13  Pavel Roskin  <proski@gnu.org>

	* loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
	grub_uint32_t to avoid a warning.

	* loader/i386/linux.c (allocate_pages): When assigning
	real_mode_mem, cast through grub_size_t to fix a warning.  The
	code already makes sure that the value would fit a pointer.
	(grub_linux_setup_video): Cast render_target->data to
	grub_size_t to fix a warning.

2009-05-13  Javier Martín  <lordhabbit@gmail.com>

	* commands/i386/pc/drivemap.c: New file - implement drivemap
	command.
	* commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
	* conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.

2009-05-13  Pavel Roskin  <proski@gnu.org>

	* util/i386/pc/grub-setup.c (setup): Remove unused variable
	embedding_area_exists.

2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>

	* util/i386/pc/grub-setup.c (setup): Restructure code flow to make
	it easier to understand / work with.
	Improve warning messages for cases where there's no embedding area,
	or when it is too small (or core.img too large).

2009-05-13  Pavel Roskin  <proski@gnu.org>

	* loader/i386/pc/multiboot2.c: Add necessary includes for
	grub_multiboot2_real_boot().

	* fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
	PX record is always little-endian.  We only need the lower 2
	bytes of the mode.

	* fs/cpio.c: Use the same name "struct head" for tar and cpio to
	facilitate code reuse.
	(grub_cpio_mount): Use "struct head", not a char buffer.  This
	fixes a warning reported by gcc 4.4.

	* kernel/disk.c (grub_disk_read): Use void pointer for the
	buffer.
	(grub_disk_write): Use const void pointer for the buffer.
	Adjust all callers.  Remove unnecessary casts.

2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>

	* util/i386/pc/grub-install.in: Update copyright year.

2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>

	gptsync

	* commands/gptsync.c: new file
	* conf/common.rmk (pkglib_MODULES): add gptsync.mod
	(gptsync_mod_SOURCES): new variable
	(gptsync_mod_CFLAGS): likewise
	(gptsync_mod_LDFLAGS): likewise
	* include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
	new definition
	(GRUB_PC_PARTITION_TYPE_HFS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise

2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>

	Fixed grub-emu

	* kern/dl.c (grub_dl_ref): omit when compiling grub-emu
	(grub_dl_ref): likewise

2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>

	* util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
	split in two functions (one for msdos and one for gpt).

2009-05-08  Pavel Roskin  <proski@gnu.org>

	* disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
	not modified.

	* disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
	uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
	Initialize them with -1.  Add sanity check for bad1.  Eliminate
	nerr variable.

2009-05-08  David S. Miller  <davem@davemloft.net>

	* util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.

2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>

	* util/i386/pc/grub-setup.c (setup): Fix check for embed region
	existence.

2009-05-05  Felix Zielcke  <fzielcke@z-51.de>

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.

2009-05-05  David S. Miller  <davem@davemloft.net>

	* util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.

2009-05-05  Pavel Roskin  <proski@gnu.org>

	* include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
	of grub_dl_ref() and grub_dl_unref().
	* commands/parttool.c: Remove preprocessor conditionals around
	grub_dl_ref() and grub_dl_unref().
	* fs/affs.c: Likewise.
	* fs/afs.c: Likewise.
	* fs/cpio.c: Likewise.
	* fs/ext2.c: Likewise.
	* fs/fat.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/hfsplus.c: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/jfs.c: Likewise.
	* fs/minix.c: Likewise.
	* fs/ntfs.c: Likewise.
	* fs/reiserfs.c: Likewise.
	* fs/sfs.c: Likewise.
	* fs/udf.c: Likewise.
	* fs/ufs.c: Likewise.
	* fs/xfs.c: Likewise.
	* include/grub/dl.h: Likewise.
	* loader/xnu.c: Likewise.

2009-05-04  Pavel Roskin  <proski@gnu.org>

	* commands/acpi.c: Remove unused variable my_mod.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* partmap/gpt.c: Likewise.
	* partmap/pc.c: Likewise.
	* partmap/sun.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.

2009-05-04  David S. Miller  <davem@davemloft.net>

	* kern/ieee1275/openfw.c (grub_children_iterate): Fix string
	pointer args to grub_ieee1275_get_property().

	* conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.

	* disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
	devices, and do not traverse down under controller nodes.

	* disk/ieee1275/ofdisk.c (compute_dev_path): New.
	(grub_ofdisk_open): Use it to un-escape "," characters.
	* kern/disk.c (find_part_sep): New.
	(grub_disk_open): Use it to find the first non-escaped ','
	character in the disk name.
	* util/ieee1275/devicemap.c (escape_of_path): New.
	(grub_util_emit_devicemap_entry): Use it.
	* util/sparc64/ieee1275/grub-install.in: Update script to
	strip partition specifiers properly by not triggering on
	'\' escaped ',' characters.

2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>

	* include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
	to 0x300.
	* loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
	resolutions.
	(linux_vesafb_modes): Add a lot of additional modes to the list (based
	on documentation from Wikipedia).

2009-05-04  Pavel Roskin  <proski@gnu.org>

	* disk/ata.c: Spelling fixes.
	* disk/raid.c: Likewise.
	* disk/usbms.c: Likewise.
	* disk/dmraid_nvidia.c: Likewise.
	* kern/ieee1275/openfw.c: Likewise.
	* kern/ieee1275/init.c: Likewise.
	* kern/ieee1275/cmain.c: Likewise.
	* boot/i386/pc/cdboot.S: Likewise.
	* video/readers/png.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.
	* fs/udf.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/reiserfs.c: Likewise.
	* efiemu/runtime/efiemu.c: Likewise.
	* efiemu/main.c: Likewise.
	* efiemu/mm.c: Likewise.
	* include/grub/elf.h: Likewise.
	* include/grub/xnu.h: Likewise.
	* include/grub/usbdesc.h: Likewise.
	* include/grub/usb.h: Likewise.
	* include/grub/script_sh.h: Likewise.
	* include/grub/lib/LzmaEnc.h: Likewise.
	* include/grub/efiemu/efiemu.h: Likewise.
	* include/grub/command.h: Likewise.
	* normal/menu.c: Likewise.
	* normal/main.c: Likewise.
	* normal/datetime.c: Likewise.
	* bus/usb/uhci.c: Likewise.
	* mmap/i386/uppermem.c: Likewise.
	* mmap/mmap.c: Likewise.
	* commands/acpi.c: Likewise.
	* commands/test.c: Likewise.
	* partmap/apple.c: Likewise.
	* font/font.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.
	* loader/macho.c: Likewise.
	* loader/i386/bsd_trampoline.S: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/xnu.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/usb_keyboard.c: Likewise.
	* util/resolve.c: Likewise.
	* util/getroot.c: Likewise.

2009-05-04  Felix Zielcke  <fzielcke@z-51.de>

	* conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.

2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
	build error.

2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
	parameter only available on BIOS.

2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Removed wrong semicolon in declaration

	* grub/misc.h (grub_dprintf): remove semicolon

2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>

	* loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
	(grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
	is done by grub_cmd_linux() now).
	[! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
	restore video to text mode.
	(grub_cmd_linux): Default `vid_mode' initialization to 0, which
	indicates lack of "vga=" parameter.  "vga=0" is mapped to
	`GRUB_LINUX_VID_MODE_NORMAL'.

2009-05-04  Felix Zielcke  <fzielcke@z-51.de>

	* conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
	`normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
	and `normal/script.c'.  Add `kern/rescue_reader.c',
	`kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
	`script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
	`grub_script.tab.c'.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* Makefile.in: Remove duplicated 2008 in Copyright line.

2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>

	* util/misc.c (grub_util_warn): New function.  Emits a warning
	unconditionally.
	* include/grub/util/misc.h (grub_util_warn): New declaration.

	* util/i386/pc/grub-install.in: Understand --force and pass it down
	to grub-setup.

	* util/i386/pc/grub-setup.c (main): Understand --force and pass it
	down to setup().
	(setup): Improve error messages and add warnings when requested to
	install in odd layouts.  Refuse to install using blocklists unless
	--force was set.

2009-05-04  martin f. krafft  <madduck@madduck.net>

	* disk/raid.c (grub_raid_scan_device): Improve debug message.

2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>

	Updated copyright year

	* fs/hfsplus.c: updated copyright year

2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>

	HFS+ UUID

	* fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
	in the space previously used by unused3
	(grub_hfsplus_uuid): new function
	(grub_hfsplus_fs): added uuid field

2009-05-03  Pavel Roskin  <proski@gnu.org>

	* disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
	suppress warnings.  It's no longer needed.
	* disk/host.c: Likewise.
	* disk/ata_pthru.c: Likewise.
	* disk/loopback.c: Likewise.
	* hook/datehook.c: Likewise.
	* parttool/pcpart.c: Likewise.
	* fs/i386/pc/pxe.c: Likewise.
	* fs/ntfscomp.c: Likewise.
	* efiemu/main.c: Likewise.
	* mmap/mmap.c: Likewise.
	* commands/crc.c: Likewise.
	* commands/hexdump.c: Likewise.
	* commands/hdparm.c: Likewise.
	* commands/acpi.c: Likewise.
	* commands/echo.c: Likewise.
	* commands/minicmd.c: Likewise.
	* commands/blocklist.c: Likewise.
	* commands/memrw.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/usbtest.c: Likewise.
	* commands/lsmmap.c: Likewise.
	* commands/boot.c: Likewise.
	* commands/parttool.c: Likewise.
	* commands/configfile.c: Likewise.
	* commands/search.c: Likewise.
	* commands/ieee1275/suspend.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/i386/pc/pxecmd.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/halt.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/i386/pc/vbetest.c: Likewise.
	* commands/lspci.c: Likewise.
	* commands/date.c: Likewise.
	* commands/handler.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/test.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/efi/loadbios.c: Likewise.
	* commands/efi/fixvideo.c: Likewise.
	* commands/halt.c: Likewise.
	* commands/help.c: Likewise.
	* commands/reboot.c: Likewise.
	* hello/hello.c: Likewise.
	* script/sh/main.c: Likewise.
	* loader/xnu.c: Likewise.
	* term/terminfo.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/usb_keyboard.c: Likewise.

2009-05-03  David S. Miller  <davem@davemloft.net>

	* normal/menu.c: Include grub/parser.h

2009-05-03  Pavel Roskin  <proski@gnu.org>

	* mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
	not char*.
	* mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
	Suggested by Javier Martín <lordhabbit@gmail.com>

	* util/i386/pc/grub-mkrescue.in: Allow for the case when
	efiemu??.o doesn't exist.
	* util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
	copying.

2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>

	FreeBSD 64-bit support

	* conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
	and loader/i386/bsd_trampoline.S
	(bsd_mod_ASFLAGS): new variable
	* include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
	(FREEBSD_MODTYPE_KERNEL64): likewise
	(grub_bsd64_trampoline_start): likewise
	(grub_bsd64_trampoline_end): likewise
	(grub_bsd64_trampoline_selfjump): likewise
	(grub_bsd64_trampoline_gdt): likewise
	* include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
	* include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
	* kern/i386/loader.S (grub_unix_real_boot): moved from here ...
	* loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
	* include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
	of "attrib" member
	* loader/i386/bsd_pagetable.c: new file
	* loader/i386/bsd_trampoline.S: likewise
	* loader/i386/bsd.c (ALIGN_QWORD): new macro
	(ALIGN_VAR): likewise
	(entry_hi): new variable
	(kern_end_mdofs): likewise
	(is_64bit): likewise
	(grub_freebsd_add_meta): use ALIGN_VAR
	(grub_e820_mmap): new declaration
	(grub_freebsd_add_mmap): new function
	(grub_freebsd_add_meta_module): support 64 bit kernels
	(grub_freebsd_list_modules): use ALIGN_VAR
	(gdt_descriptor): new declaration
	(grub_freebsd_boot): support 64 bit kernels
	(grub_bsd_elf64_hook): new function
	(grub_bsd_load_elf): support elf64

2009-05-03  Bean  <bean123ch@gmail.com>

	* script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
	after we get the result of if statement.

2009-05-03  Bean  <bean123ch@gmail.com>

	* Makefile.in (enable_efiemu): New variable.

	* conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
	set.
	(efiemu32.o): Use macro $< for source file, add $(srcdir) to include
	path.
	(efi64_c.o): Use macro $< for source file, add $(srcdir) to include
	path, add -mno-red-zone option.
	(efiemu64_s.o): Likewise.
	(efiemu64.o): Use macro $^ for source file.

	* configure.ac (--enable-efiemu): New option.

2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>

	xnu support

	* conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
	(pkglib_MODULES): add xnu.mod
	(xnu_mod_SOURCES): new variable
	(xnu_mod_CFLAGS): likewise
	(xnu_mod_LDFLAGS): likewise
	(xnu_mod_ASFLAGS): likewise
	* conf/i386-pc.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/efi/efi.h (grub_efi_finish_boot_services):
	new declaration
	* include/grub/i386/macho.h: new file
	* include/grub/i386/xnu.h: likewise
	* include/grub/macho.h: likewise
	* include/grub/machoload.h: likewise
	* include/grub/x86_64/macho.h: likewise
	* include/grub/x86_64/xnu.h: likewise
	* include/grub/xnu.h: likewise
	* kern/efi/efi.c (grub_efi_finish_boot_services): new function
	* kern/efi/mm.c (MAX_HEAP_SIZE): increase
	* loader/i386/efi/xnu.c: new file
	* loader/i386/pc/xnu.c: likewise
	* loader/i386/xnu.c: likewise
	* loader/i386/xnu_helper.S: likewise
	* loader/macho.c: likewise
	* loader/xnu.c: likewise
	* loader/xnu_resume.c: likewise
	* util/grub-dumpdevtree: likewise
	* include/grub/i386/pit.h: include grub/err.h
	(grub_pit_wait): export
	* util/grub.d/30_os-prober.in: support Darwin/Mac OS X

2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>

	Efiemu

	* conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
	_linux_efi, linux_efi.
	new files in grub-emu
	new targets efiemu32.o and efiemu64.o
	* loader/linux_normal_efiemu.c: likewise
	* loader/i386/efi/linux.c: added preliminary efiemu support
	* util/i386/pc/grub-install.in: add efiemu??.o to the list of
	files to copy
	* include/grub/autoefi.h: new file
	* include/grub/i386/efiemu.h: likewise
	* include/grub/i386/pc/efiemu.h: likewise
	* include/grub/efi/api.h: add LL suffix when necessary
	new definitions relating to tables
	* include/grub/efiemu/efiemu.h: new file
	* include/grub/efiemu/runtime.h: likewise
	* efiemu/prepare.c: likewise
	* efiemu/loadcore_common.c: likewise
	* efiemu/loadcore64.c: likewise
	* efiemu/runtime/efiemu.sh: likewise
	* efiemu/runtime/efiemu.S: likewise
	* efiemu/runtime/efiemu.c: likewise
	* efiemu/runtime/config.h: likewise
	* efiemu/prepare32.c: likewise
	* efiemu/main.c: likewise
	* efiemu/modules/pnvram.c: likewise
	* efiemu/modules/i386: likewise
	* efiemu/modules/i386/pc: likewise
	* efiemu/modules/acpi.c: likewise
	* efiemu/i386/pc/cfgtables.c: likewise
	* efiemu/i386/loadcore64.c: likewise
	* efiemu/i386/loadcore32.c: likewise
	* efiemu/prepare64.c: likewise
	* efiemu/loadcore.c: likewise
	* efiemu/symbols.c: likewise
	* efiemu/mm.c: likewise
	* efiemu/loadcore32.c: likewise

2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>

	ACPI spoofing

	* commands/acpi.c: new file
	* commands/i386/pc/acpi.c: likewise
	* commands/efi/acpi.c: likewise
	* include/grub/acpi.h: likewise
	* conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
	(acpi_mod_SOURCES): new variable
	(acpi_mod_CFLAGS): likewise
	(acpi_mod_LDFLAGS): likewise
	* conf/i386-efi.rmk: likewise
	* conf/x86_64-efi.rmk: likewise

2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>

	Missing part from mmap patch

	* mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
	(grub_mmap_unregister)
	(grub_mmap_free_and_unregister): use grub_mmap_register

2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>

	Mmap services

	* loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
	* loader/i386/linux.c (find_mmap_size): likewise
	(allocate_pages): likewise
	* loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
	(grub_fill_multiboot_mmap): likewise
	(grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
	* loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
	* include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
	(OPENBSD_MMAP_RESERVED): likewise
	* include/grub/i386/pc/memory.h: include grub/memory.h
	(grub_lower_mem): removed
	(grub_upper_mem): likewise
	(GRUB_MACHINE_MEMORY_ACPI): new definition
	(GRUB_MACHINE_MEMORY_NVS): likewise
	(GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
	(GRUB_MACHINE_MEMORY_HOLE): likewise
	(grub_machine_mmap_register): likewise
	(grub_machine_mmap_unregister): likewise
	(grub_machine_get_upper): likewise
	(grub_machine_get_lower): likewise
	(grub_machine_get_post64): likewise
	* include/grub/i386/efi/memory.h: new file
	* include/grub/x86_64/efi/memory.h: likewise
	* include/grub/efi/memory.h: likewise
	* conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
	(mmap_mod_SOURCES): new variable
	(mmap_mod_LDFLAGS): likewise
	(mmap_mod_ASFLAGS): likewise
	* conf/i386-coreboot.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-efi.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/types.h (UINT_TO_PTR): new macro
	(PTR_TO_UINT32): likewise
	(PTR_TO_UINT64): likewise
	* include/grub/memory.h: new file
	* mmap/i386/pc/mmap.c: likewise
	* mmap/i386/pc/mmap_helper.S: likewise
	* mmap/i386/uppermem.c: likewise
	* mmap/mmap.c: likewise
	* mmap/efi/mmap.c: likewise
	* kern/i386/coreboot/init.c (grub_machine_init): don't use
	grub_upper_mem
	* kern/i386/pc/init.c (grub_lower_mem): removed variable
	(grub_upper_mem): likewise
	(grub_machine_init): don't use grub_upper_mem,
	make grub_lower_mem local
	* loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
	grub_mmap_iterate and grub_mmap_get_upper
	(grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper

2009-05-02  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
	script/sh/parser.y.
	(pkglib_MODULES): Add normal.mod and sh.mod.
	(normal_SOURCES): New variable.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_LDFLAGS): Likewise.
	(sh_mod_SOURCES): Likewise.
	(sh_mod_CFLAGS): Likewise.
	(sh_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
	script/sh/lexer.c_DEPENDENCIES.
	(kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
	kern/rescue_reader.c and kern/rescue_parser.c.
	(kernel_img_HEADERS): Remove rescue.h, add reader.h.
	(grub_emu_SOURCES): Change source files.
	(pkglib_MODULES): Remove normal.mod.
	(normal_SOURCES): Removed.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_LDFLAGS): Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1276.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.

	* include/grub/command.h (grub_command_execute): New inline function.

	* include/grub/menu.h (grub_menu_entry): Removed commands field.

	* include/grub/normal.h: Remove <grub/setjmp.h>.
	(grub_fs_module_list): Moved to normal/autofs.c.
	(grub_exit_env): Removed.
	(grub_command_execute): Likewise.
	(grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
	parameter script.
	(read_command_list): New function declaration.
	(read_fs_list): Likewise.

	* include/parser.h: Include <grub/reader.h>.
	(grub_parser_split_cmdline): Change type of getline parameter.
	(grub_parser): New structure.
	(grub_parser_class): New variable.
	(grub_parser_execute): New function declaration.
	(grub_register_rescue_parser): Likewise.
	(grub_parser_register): New inline function.
	(grub_parser_unregister): Likewise.
	(grub_parser_get_current): Likewise.
	(grub_parser_set_current): Likewise.

	* include/grub/reader.h: New file.
	* kern/reader.c: Likewise.
	* kern/rescue_parser.c: Likewise.
	* kern/rescue_reader.c: Likewise.
	* normal/autofs.c: Likewise.
	* normal/dyncmd.c: Likewise.

	* include/grub/rescue.h: Removed.
	* normal/command.h: Likewise.

	* include/grub/script.h: Moved to ...
	* include/grub/script_sh.h: ... Moved here.
	* normal/execute.c: Moved to ...
	* script/sh/execute.c: ... Moved here.
	* normal/function.c: Moved to ...
	* script/sh/function.c: ... Moved here.
	* normal/lexer.c: Moved to ...
	* script/sh/lexer.c: ... Moved here.
	* normal/parser.y: Moved to ...
	* script/sh/parser.y: ... Moved here.
	* normal/script.c: Moved to ...
	* script/sh/script.c: ... Moved here.

	* normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
	<grub/reader.h>.
	(grub_exit_env): Removed.
	(fs_module_list): Moved to normal/autofs.c.
	(grub_file_getline): Don't handle comment here.
	(free_menu): Skip removed field entry->commands.
	(grub_normal_menu_addentry): Removed as grub_menu_entry, removed
	script parameter.
	(read_config_file): Removed nested parameter, change getline function.
	(grub_enter_normal_mode): Removed.
	(grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
	(read_command_list): Likewise.
	(autoload_fs_module): Moved to normal/autofs.c.
	(read_fs_list): Likewise.
	(reader_nested): New variable.
	(grub_normal_execute): Run parser.sh to switch to sh parser.
	(grub_cmd_rescue): Removed.
	(cmd_normal): Removed.
	(grub_cmd_normal): Unregister itself at the beginning. Don't register
	rescue command.
	(grub_cmdline_run): New function.
	(grub_normal_reader_init): Likewise.
	(grub_normal_read_line): Likewise.
	(grub_env_write_pager): Likewise.
	(cmdline): New variable.
	(grub_normal_reader): Likewise.
	(GRUB_MOD_INIT): Register normal reader and set as current, register
	pager hook, register normal command with grub_register_command_prio,
	so that it won't show up in command.lst.
	(GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
	grub_fs_autoload_hook.

	* normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
	(grub_menu_execute_entry): Replace grub_script_execute with
	grub_parser_execute, change parameter to grub_command_execute.

	* normal/menu_text.c: Remove <grub/script.h>.

	* normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
	and <grub/parser.h>.
	(run): Change editor_getline to use new parser interface. Change
	parameter to grub_command_execute.

	* kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
	<grub/reader.h> and <grub/parser.h>.
	(grub_load_normal_mode): Execute normal command.
	(grub_main): Call grub_register_core_commands,
	grub_register_rescue_parser and grub_register_rescue_reader, use
	grub_reader_loop to enter input loop.

	* kern/parser.c (grub_parser_split_cmdline): Change type of
	getline parameter.
	(grub_parser_class): New variable.
	(grub_parser_execute): New function.

	* loader/i386/multiboot.c: Remove <grub/rescue.h>.
	* loader/multiboot2.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.

	* util/grub-emu.c (read_command_list): New dummy function.

2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>

	* util/deviceiter.c (grub_util_iterate_devices): Increase max drive
	count to 16 for CCISS and IDA.

2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>

	* normal/menu_text.c  (grub_wait_after_message): Print a newline
	after waiting for user input.

	* loader/i386/linux.c: Include `<grub/normal.h>'.
	(grub_cmd_linux): Improve the error message about `ask' mode, by
	waiting for user input so it's not missed (we can do this, since
	user requested interaction).

2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>

	Added missing lst to grub-mkrescue

	* util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
	and ${input_dir}/parttool.lst

2009-04-30  David S. Miller  <davem@davemloft.net>

	* util/hostdisk.c (device_is_wholedisk): New function.
	(grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
	zero only if device_is_wholedisk() returns true.

	* util/hostdisk.c (convert_system_partition_to_system_disk):
	Handle virtual disk devices named /dev/vdiskX as found on sparc
	and powerpc.

	* kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
	lettered partition specifier is found, convert to numbered.

2009-04-29  David S. Miller  <davem@davemloft.net>

	* include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
	* include/grub/sparc64/ieee1275/memory.h: Likewise.

	* normal/command.c: Add missing newline at end of file.

	* commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
	warnings.
	* kern/ieee1275/openfw.c (grub_claimmap): Likewise.
	* disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
	grub_ofdisk_read): Likewise, and deal similarly with the fact that
	ihandles have a 32-bit type but need to be stored in a "void *".

2009-04-28  Pavel Roskin  <proski@gnu.org>

	* disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
	not disk.  Adjust all dependencies.
	(grub_fs_uuid_close): Use grub_device_close(), not
	grub_disk_close().

	* disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
	parent's partition, don't copy it by reference, as it gets freed
	on close.

2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>

	Preboot hooks support

	* commands/boot.c (struct grub_preboot_t): new declaration
	(preboots_head): new variable
	(preboots_tail): likewise
	(grub_loader_register_preboot_hook): new function
	(grub_loader_unregister_preboot_hook): likewise
	(grub_loader_set): launch preboot hooks
	* include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
	(grub_loader_register_preboot_hook): new declaration
	(grub_loader_unregister_preboot_hook): likewise

2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>

	Warning fix

	* disk/scsi.c (grub_scsi_open): added missing cast when
	calling grub_dprintf

2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>

	Bug and warning fixes

	* include/grub/i386/pc/init.h (grub_stop_floppy): added missing
	declaration
	* commands/test.c (test_parse): fixed bug with file tests and corrected
	declaration of find_file

2009-04-26  Pavel Roskin  <proski@gnu.org>

	* Makefile.in: Don't install empty manual pages if help2man is
	missing.  Use help2man option for output, not shell redirection.

2009-04-26  David S. Miller  <davem@davemloft.net>

	* util/grub-mkdevicemap.c (make_device_map): Add missing
	NESTED_FUNC_ATTR to process_device().

2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Test command

	* commands/test.c: rewritten to use bash-like test

2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>

	Parttool autoloading and improvements

	* Makefile.in (pkglib_DATA): add parttool.lst
	(parttool.lst): new target
	* genmk.rb: generate parttool-*
	(CLEANFILES): add #{parttool}
	(PARTTOOLFILES): new variable
	* genparttoollist.sh: new file
	* parttool/pcpart.c (grub_pcpart_boot): more feedback
	(grub_pcpart_type): likewise
	* commands/parttool.c (helpmsg): new variable
	(grub_cmd_parttool): output help if not enough arguments are supplied
	autoload modules
	(GRUB_MOD_INIT(parttool)): use helpmsg

2009-04-24  David S. Miller  <davem@davemloft.net>

	Avoiding opening same device multiple times in device iterator.

	* kern/device.c: (grub_device_iterate): Define struct part_ent,
	and use it to build a list of partitions in iterate_disk() and
	iterate_partition().

	* disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
	on disk->data.

	* disk/ieee1275/nand.c (grub_nand_iterate): Return
	grub_devalias_iterate() result instead of unconditional 0.
	* disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
	Also, capture hook return value, either directly or via
	grub_children_iterate(), and propagate to caller.
	* include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
	grub_children_iterate): Return value is now 'int' instead of
	'grub_err_t'.
	* kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
	like a proper iterator, stopping when hooks return non-zero.
	(grub_devalias_iterate): Likewise.

2009-04-23  David S. Miller  <davem@davemloft.net>

	* kern/sparc64/ieee1275/openfw.c: Unused, delete.

2009-04-22  David S. Miller  <davem@davemloft.net>

	* kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
	is larger than address_cells, use that value for address_cells too.

	* include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
	IEEE1275_MAX_PATH_LEN): Define.
	* kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
	allocate 'childtype', 'childpath', 'childname', and 'fullname'.
	(grub_devalias_iterate): Dynamically allocate 'aliasname' and
	'devtype'.  Explicitly NULL terminate devalias expansion.

	* util/sparc64/ieee1275/misc.c: New file.
	* util/sparc64/ieee1275/grub-setup.c: New file.
	* util/sparc64/ieee1275/grub-ofpathname.c: New file.
	* util/sparc64/ieee1275/grub-mkimage.c: New file.
	* util/sparc64/ieee1275/grub-install.in: New file.
	* util/ieee1275/ofpath.c: New file.
	* util/ieee1275/devicemap.c: New file.
	* util/devicemap.c: New file.
	* util/deviceiter.c: New file.
	* kern/sparc64/ieee1275/init.c: New file.
	* include/grub/util/ofpath.h: New file.
	* include/grub/util/deviceiter.h: New file.
	* util/grub-mkdevicemap.c: Include deviceiter.h.
	Implement using grub_util_emit_devicemap_entry and
	grub_util_iterate_devices.
	* conf/i386-corebook.rmk: Build util/deviceiter.c and
	util/devicemap.c into grub-mkdevicemap
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Add rules to build boot block
	images and installation utilities.  Build kernel as image
	instead of as elf binary.  Use common rules as much as possible.

2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>

	Correct GPT definition

	* include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
	of "attrib" member

2009-04-19  Felix Zielcke  <fzielcke@z-51.de>

	* INSTALL: Replace `autogen.sh' with `./autogen.sh'.

2009-04-19  David S. Miller  <davem@davemloft.net>

	* loader/sparc64/ieee1275/linux.c: Include grub/command.h
	(grub_rescue_cmd_linux): Rename to...
	(grub_cmd_linux): and fix prototype.
	(grub_rescue_cmd_initrd): Rename to...
	(grub_cmd_initrd): and fix prototype.
	(cmd_linux, cmd_initrd): New.
	(GRUB_MOD_INIT(linux)): Use grub_register_command().
	(GRUB_MOD_FINI(linux): Use grub_unregister_command().

2009-04-17  Pavel Roskin  <proski@gnu.org>

	* bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
	format.
	(grub_ohci_transfer): Likewise.

	* bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.

	* loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
	return without a value.  Fix inconsistent indentation.

	* fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
	match struct grub_fs.

	* disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
	* bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
	* commands/lspci.c (grub_lspci_iter): Likewise.

2009-04-16  Bean  <bean123ch@gmail.com>

	* commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
	value.

2009-04-15  Pavel Roskin  <proski@gnu.org>

	* include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
	LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
	users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
	definitions.

2009-04-15  Felix Zielcke  <fzielcke@z-51.de>

	* disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
	that no multiple data or metadata areas are supported and `Unknown
	metadata header'.

2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>

	Move loader out of the kernel

	* kern/loader.c: moved to ...
	* commands/boot.c: ... moved here
	* commands/minicmd.c (grub_mini_cmd_boot): moved to ...
	* commands/boot.c (grub_cmd_boot): moved here. All users updated
	* include/grub/kernel.h (grub_machine_fini): export
	* include/grub/loader.h (grub_loader_is_loaded): update declaration
	(grub_loader_set): likewise
	(grub_loader_unset): likewise
	(grub_loader_boot): likewise
	* conf/common.rmk: new module boot.mod
	(pkglib_MODULES): add boot.mod
	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
	(grub_emu_SOURCES): likewise
	* conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise

2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>

	use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes

	* kern/misc.c (grub_itoa): Removed function
	(grub_ltoa): likewise
	(grub_vsprintf): use grub_lltoa

2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>

	Restore grub-emu

	* conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
	* conf/i386-coreboot.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise

2009-04-15  Felix Zielcke  <fzielcke@z-51.de>

	* INSTALL: Add that `./autogen.sh' needs to be run before
	`./configure.'.

2009-04-14  Bean  <bean123ch@gmail.com>

	* Makefile.in (pkglib_DATA): Add handler.lst.
	(handler.lst): New rule.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* genhandlerlist.sh: New file.

	* genmk.rb: Add rules to generate handler.lst.

	* include/grub/normal.h (grub_file_getline): New function definition.
	(read_handler_list): Likewise.
	(free_handler_list): Likewise.

	* include/grub/term.h (grub_term_register_input): Add name parameter
	for auto generation of handler.lst.
	(grub_term_register_output): Likewise.

	* normal/handler.c: New file.

	* normal/main.c (get_line): Renamed to grub_file_getline.
	(read_config_file): Use the newly renamed grub_file_getline.
	(read_command_list): Likewise.
	(read_fs_list): Likewise.
	(grub_normal_execute): Call read_handler_list to parse handler.lst.
	(GRUB_MOD_FINI): Call free_handler_list to free handler list.

	* term/efi/console.c (grub_console_init): Add name parameter for auto
	generation of handler.lst.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/at_keyboard.c: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/i386/pc/vga_text.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/usb_keyboard.c: Likewise.

2009-04-14  Bean  <bean123ch@gmail.com>

	* util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
	properly with null character.

2009-04-14  Felix Zielcke  <fzielcke@z-51.de>

	* configure: Remove.
	* config.h.in: Likewise.
	* stamp-h.in: Likewise.
	* DISTLIST: Likewise.
	* conf/common.mk: Likewise.
	* conf/i386-coreboot.mk: Likewise.
	* conf/i386-efi.mk: Likewise.
	* conf/i386-ieee1275.mk: Likewise.
	* conf/i386.mk: Likewise.
	* conf/i386-pc.mk: Likewise.
	* conf/powerpc-ieee1275.mk: Likewise.
	* conf/sparc64-ieee1275.mk: Likewise.
	* conf/x86_64-efi.mk: Likewise.

	* INSTALL: Remove the sentence that Ruby and autoconf are only required if you
	develop on GRUB.

2009-04-14  John Stanley  <jpsinthemix@verizon.net>
	    David S. Miller  <davem@davemloft.net>

	* util/hostdisk.c (make_device_name): Fix buffer length
	calculations.

2009-04-14  Felix Zielcke  <fzielcke@z-51.de>

	* util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
	<sys/param.h> and <sys/sysctl.h>.
	(open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
	to add 0x10 to `kern.geom.debugflags' if it's not already set, before
	opening the device and reset them afterwards.

2009-04-13  Pavel Roskin  <proski@gnu.org>

	* conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
	Reported by John Stanley <jpsinthemix@verizon.net>

2009-04-13  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
	that name for menuentries when appropriate.

2009-04-13  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/10_freebsd.in: Add a missing `fi'.

2009-04-13  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
	to Linux, simply abort telling the user it's no longer supported.

2009-04-13  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
	doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
	`freebsd_loadenv' only when devices.hints exist.

2009-04-13  Pavel Roskin  <proski@gnu.org>

	* term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.

2009-04-13  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-install.in (install_drive): Remove the BSD
	partition number.
	(grub_drive): Likewise.

2009-04-13  David S. Miller  <davem@davemloft.net>

	* kern/sparc64/ieee1275/ieee1275.c: New file.
	* include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
	IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
	IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
	IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
	(grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
	grub_ieee1275_alloc_physmem): Declare new exported functions.

	* include/grub/sparc64/ieee1275/loader.h: New file.
	* include/grub/sparc64/ieee1275/memory.h: Likewise.
	* include/grub/sparc64/kernel.h: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.

	* conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
	(grub_fstest_SOURCES): Likewise.

	* util/hostdisk.c (make_device_name): Do not make any assumptions
	about the length of drive names.

	* kern/dl.c (grub_dl_load_file): Close file immediately when
	we are done using it.

2009-04-12  David S. Miller  <davem@davemloft.net>

	* kern/misc.c (grub_ltoa): Fix cast when handling negative
	values.  Noticed by Pavel Roskin.

	* configure.ac: Check for __bswapsi2 and__bswapdi2 using
	target compiler.

	* genmk.rb: Add more flexible image type specification, also
	pass --strip-unneeded to objcopy.
	* conf/i386-pc.rmk: Use *_FORMAT.
	* conf/i386-pc.mk: Rebuilt.

	* disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
	(OFDISK_HASH_SZ): Define.
	(ofdisk_hash): New hash table.
	(ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
	(grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
	instead of device phandle which is not unique.

	* kern/sparc64/ieee1275/init.c: Delete, replace with...
	* kern/sparc64/ieee1275/crt0.S: assembler implementation.
	* include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
	(GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
	GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
	GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
	GRUB_KERNEL_MACHINE_DATA_END): Define.
	(grub_kernel_image_size, grub_total_module_size): Declare.

2009-04-12  Pavel Roskin  <proski@gnu.org>

	 * configure.ac: Change the logic when we check for target tools.
	 Do it when the target is specified and it's different from the
	 specified value of the host.

2009-04-11  Felix Zielcke  <fzielcke@z-51.de>

	* util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
	(grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
	GNU/kFreeBSD. Check if a device is a character device. Use
	DIOCGMEDIASIZE to get the size.
	(convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
	support for GNU/kFreeBSD.
	(grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
	is a character device instead of a block device. Add support for
	FreeBSD device names.

	* util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
	is a character device instead of a block device.

	* util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
	is a character device instead of a block device.

2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>

	* util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
	(grub_util_biosdisk_open) [__FreeBSD__]: Add support for
	FreeBSD. Check if a device is a character device. Use
	DIOCGMEDIASIZE to get the size.
	(convert_system_partition_to_system_disk) [__FreeBSD__]: Add
	support for FreeBSD.
	(grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
	is a character device instead of a block device. Add support for
	FreeBSD device names.

	* util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
	a character device instead of a block device.
	(grub_util_check_char_device): New function.

	* util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
	a character device instead of a block device.

	* include/grub/util/getroot.h (grub_util_check_char_device): New
	prototype.

2009-04-11  David S. Miller  <davem@davemloft.net>

	* conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
	static libgcc.
	* configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
	* include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
	function, if present.
	(__bswapdi2): Likewise.

	* include/grub/sparc64/ieee1275/boot.h: New file.
	* boot/sparc64/ieee1275/boot.S: Likewise.
	* boot/sparc64/ieee1275/diskboot.S: Likewise.

	* kern/misc.c (grub_ltoa): New function.
	(grub_vsprintf): Use it to format 'long' integers.

2009-04-10  David S. Miller  <davem@davemloft.net>

	* disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
	slots are of type grub_ieee1275_cell_t.
	(grub_nand_read): Likewise.
	* kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
	IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
	macros are used to compare values in arg/ret block of the call.
	(grub_ieee1275_finddevice, grub_ieee1275_get_property,
	grub_ieee1275_next_property, grub_ieee1275_get_property_length,
	grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
	grub_ieee1275_instance_to_path, grub_ieee1275_write,
	grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
	grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
	grub_ieee1275_close, grub_ieee1275_set_property,
	grub_ieee1275_set_color): All ieee1275 call arg slots are of type
	grub_ieee1275_cell_t.
	* kern/ieee1275/openfw.c (grub_map): Likewise.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
	grub_ieee1275_phandle_t): Define as grub_unit32_t type.

	* kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
	* kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
	(grub_devalias_iterate): Likewise.

2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>

	UFS improvements

	* fs/ufs.c (INODE_NBLOCKS): new definition
	(struct grub_ufs_dirent): added fields for non-BSD dirents
	(grub_ufs_get_file_block): fixed double indirect handling
	(grub_ufs_lookup_symlink): use more robust way to determine whether
	symlink is inline
	(grub_ufs_find_file): support for non-BSD dirents
	(grub_ufs_dir): support for non-BSD dirents

2009-04-10  Bean  <bean123ch@gnail.com>

	* include/grub/efi/api.h (grub_efi_configuration_table): Add packed
	attribute, otherwise the size would be wrong for i386 platform.

	* include/grub/pci.h (grub_pci_read_word): New inline function.
	(grub_pci_read_byte): Likewise.
	(grub_pci_write): Likewise.
	(grub_pci_write_word): Likewise.
	(grub_pci_write_byte): Likewise.

	* include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.

	* loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
	(find_framebuf): Scan pci to locate the frame buffer address.

	* commands/efi/fixvideo.c: New file.

	* commands/efi/loadbios.c: Likewise.

	* commands/memrw.c: Likewise.

	* util/grub-dumpbios.in: Likewise.

	* conf/common.rmk (grub-dumpbios): New utility.
	(pkglib_MODULES): New module memrw.mod.
	(memrw_mod_SOURCE): New macro.
	(memrw_mod_CFLAGS): Likewise.
	(memrw_mod_LDFLAGS): Likewise.

	* conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
	fixvideo.mod.
	(loadbios_mod_SOURCE): New macro.
	(loadbios_mod_CFLAGS): Likewise.
	(loadbios_mod_LDFLAGS): Likewise.
	(fixvideo_mod_SOURCE): Likewise.
	(fixvideo_mod_CFLAGS): Likewise.
	(fixvideo_mod_LDFLAGS): Likewise.

	* conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
	fixvideo.mod.
	(loadbios_mod_SOURCE): New macro.
	(loadbios_mod_CFLAGS): Likewise.
	(loadbios_mod_LDFLAGS): Likewise.
	(fixvideo_mod_SOURCE): Likewise.
	(fixvideo_mod_CFLAGS): Likewise.
	(fixvideo_mod_LDFLAGS): Likewise.

2009-04-08  Felix Zielcke  <fzielcke@z-51.de>

	* disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.

2009-04-07  David S. Miller  <davem@davemloft.net>

	* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
	support for R_SPARC_OLO10 relocations.  Fix compile warning for
	R_SPARC_WDISP30 case.
	* kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.

2009-04-06  Pavel Roskin  <proski@gnu.org>

	* include/grub/misc.h (ARRAY_SIZE): New macro.
	* include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
	New macro.
	* loader/i386/linux.c (allocate_pages): Use free_pages().
	(grub_linux_unload): Don't use free_pages().
	(grub_linux_boot): Prevent accessing linux_vesafb_modes with a
	wrong index.  Treat all other modes as text modes.
	(grub_cmd_linux): Initialize vid_mode unconditionally to
	GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".

	* commands/help.c (print_command_help): Use cmd->prio, not
	cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.

2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>

	Parttool

	* parttool/pcpart.c: new file
	* commands/parttool.c: likewise
	* conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
	(parttool_mod_SOURCES): new variable
	(parttool_mod_CFLAGS): likewise
	(parttool_mod_LDFLAGS): likewise
	(pcpart_mod_SOURCES): likewise
	(pcpart_mod_CFLAGS): likewise
	(pcpart_mod_LDFLAGS): likewise
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
	and parttool/pcpart.c
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* conf/x86_64-ieee1275.rmk: likewise

2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>

	Support for mtime and further expandability of dir command

	* include/grub/lib/datetime.h: moved to ...
	* include/grub/datetime.h: ... moved here and added
	declaration of grub_unixtime2datetime. All users updated
	* include/grub/fs.h: new syntax for dir and mtime functions in
	struct grub_fs
	* include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
	and GRUB_FSHELP_FLAGS_MASK
	* commands/ls.c (grub_ls_list_files): Write mtime in long format
	* fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
	(grub_ext2_mtime): new function
	* fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
	(grub_hfsplus_mtime): new function
	* fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
	(GRUB_UFS_ATTR_FILE): likewise
	(GRUB_UFS_ATTR_LNK): likewise
	(struct grub_ufs_sblock): new fields mtime
	(grub_ufs_read_inode): new parameter to read inode to a separate buffer
	all users updated
	(grub_ufs_dir): mtime support
	(grub_ufs_mtime): new function
	* fs/affs.c (grub_affs_dir): use new dir syntax
	* fs/afs.c (grub_afs_dir): likewise
	* fs/cpio.c (grub_cpio_dir): likewise
	* fs/fat.c (grub_fat_find_dir): likewise
	* fs/hfs.c (grub_hfs_dir): likewise
	* fs/iso9660.c (grub_iso9660_dir): likewise
	* fs/jfs.c (grub_jfs_dir): likewise
	* fs/minix.c (grub_minix_dir): likewise
	* fs/ntfs.c (grub_ntfs_dir): likewise
	* fs/reiserfs.c (grub_reiserfs_dir): likewise
	* fs/sfs.c (grub_sfs_dir): likewise
	* fs/xfs.c (grub_xfs_dir): likewise
	* util/hostfs.c (grub_hostfs_dir): likewise
	* lib/datetime.c: moved to ...
	* normal/datetime.c: ... moved here
	(grub_unixtime2datetime): new function
	* kern/rescue.c (grub_rescue_print_files): use new dir syntax
	* normal/completion.c (iterate_dir): use new dir syntax
	* normal/misc.c (grub_normal_print_device_info): tell the
	last modification time of a volume
	* kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
	* conf/common.rmk: added lib/datetime.c to ls.mod
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
	(normal_mod_SOURCES): likewise
	(datetime_mod_SOURCES): Removed lib/datetime.c
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* conf/x86_64-efi.rmk: likewise

2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>

	Trim trailing spaces in FAT label and support mtools-like labels

	* fs/fat.c (grub_fat_iterate_dir): New function based
	on grub_fat_find_dir
	(grub_fat_find_dir): use grub_fat_iterate_dir
	(grub_fat_label): likewise

2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>

	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
	and command.h
	remove extraneous kernel_elf_HEADERS

2009-04-04  Bean  <bean123ch@gnail.com>

	* include/grub/util/misc.h: Add dummy function fsync for mingw.

	* util/misc.c: Likewise.

2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>

	* loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
	instead of grub_printf.

2009-04-03  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/linux.c (grub_linux_setup_video): Fill
	`params->{red,green,blue,reserved}_{mask_size,field_pos}' with
	values from `mode info' structure instead of hardcoded
	values.

2009-04-01  Pavel Roskin  <proski@gnu.org>

	* Makefile.in: Remove all references to MODULE_LDFLAGS, it's
	unused now.
	* genmk.rb: Likewise.
	* configure.ac: Likewise.

2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>

	* aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
	TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.

2009-04-01  David S. Miller  <davem@davemloft.net>

	* normal/sparc64/setjmp.S: Fix setjmp implementation.
	* include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
	(grub_setjmp): Mark with 'returns_twice' attribute.
	* include/grub/i386/setjmp.h (grub_setjmp): Likewise
	* include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
	* include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.

2009-04-01  Robert Millan  <rmh@aybabtu.com>

	Reapply fix from 2008-07-28 which was accidentally reverted; also
	perform the same fix to a similar check in same function.

	* disk/raid.c (grub_raid_scan_device): Do not abort when two disks
	with the same number are found, just use issue a warning with
	grub_dprintf(), as this error has been reported to be non-fatal.

2009-03-31  Pavel Roskin  <proski@gnu.org>

	* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
	for cross-compilation.

2009-03-30  Robert Millan  <rmh@aybabtu.com>

	Fix i386-ieee1275 build.

	* include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
	Remove declaration.

2009-03-30  Pavel Roskin  <proski@gnu.org>

	* fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
	(grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
	zero-terminated, rely only on the strlen value.  Fix comparison
	of strings differing in length.

2009-03-30  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/linux.c (grub_cmd_linux): Check for zImage before
	checking for abi version.  Improve error messages on BIOS to notify
	user about `linux16' command.

2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>

	Leak fixes

	* kern/disk.c (grub_disk_cache_store): Invalidate previous cache
	in case of collision
	* disk/scsi.c (grub_scsi_open): free scsi in case of error

2009-03-29  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
	set `vid_mode' accordingly.
	(grub_linux_boot): Process `vid_mode' and set video mode.

2009-03-29  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in (linux_entry): New function.
	Factorize generation of Linux boot entries.

2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>

	Make the format of Environment Block plain text. The boot loader
	part is not tested well yet.

	* util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
	(buffer): Removed.
	(envblk): Likewise.
	(usage): Remove "info" and "clear". Add "unset". Update the
	description of "set", as this does not delete variables any
	longer.
	(create_envblk_file): Complete rewrite.
	(open_envblk_file): Likewise.
	(cmd_info): Removed.
	(cmd_list): Likewise.
	(cmd_set): Likewise.
	(cmd_clear): Likewise.
	(list_variables): New function.
	(write_envblk): Likewise.
	(set_variables): Likewise.
	(unset_variables): Likewise.
	(main): Complete rewrite.

	* commands/loadenv.c (buffer): Removed.
	(envblk): Likewise.
	(open_envblk_file): New function.
	(read_envblk_file): Complete rewrite.
	(grub_cmd_load_env): Likewise.
	(grub_cmd_list_env): Likewise.
	(struct blocklist): New struct.
	(free_blocklists): New function.
	(check_blocklists): Likewise.
	(write_blocklists): Likewise.
	(grub_cmd_save_env): Complete rewrite.

	* include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
	a plain text signature.
	(GRUB_ENVBLK_MAXLEN): Removed.
	(struct grub_envblk): Complete rewrite.
	(grub_envblk_find): Removed.
	(grub_envblk_insert): Likewise.
	(grub_envblk_open): New prototype.
	(grub_envblk_set): Likewise.
	(grub_envblk_delete): Put const to VALUE.
	(grub_envblk_iterate): Put const to NAME and VALUE.
	(grub_envblk_close): New prototype.
	(grub_envblk_buffer): New inline function.
	(grub_envblk_size): Likewise.

	* lib/envblk.c: Include grub/mm.h.
	(grub_env_find): Removed.
	(grub_envblk_open): New function.
	(grub_envblk_close): Likewise.
	(escaped_value_len): Likewise.
	(find_next_line): Likewise.
	(grub_envblk_insert): Removed.
	(grub_envblk_set): New function.
	(grub_envblk_delete): Complete rewrite.
	(grub_envblk_iterate): Likewise.

2009-03-28  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
	(linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
	variables.  Use 16-bit loader.
	(linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
	loader.
	* kern/i386/loader.S (grub_linux_boot): Rename to ...
	(grub_linux16_boot): ... this.  Update all users.
	* loader/i386/linux.c (grub_linux32_boot): Rename to ...
	(grub_linux_boot): ... this.  Update all users.

	* loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
	(GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
	commands to `linux16' and `initrd16'.
	(GRUB_MOD_FINI(linux)): Rename to ...
	(GRUB_MOD_FINI(linux16)): ... this.

2009-03-24  Pavel Roskin  <proski@gnu.org>

	* genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
	not just for compilation.

2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>

	Move multiboot helper out of kernel

	* conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
	`loader/i386/multiboot_helper.S'.
	* conf/i386-coreboot.rmk: Likewise
	* conf/i386-ieee1275.rmk: Likewise

	* kern/i386/loader.S: Move multiboot helpers from here...
	* loader/i386/multiboot_helper.S: ...moved here
	* include/grub/i386/loader.h: Move declarations of multiboot
	helpers from here...
	* include/grub/i386/multiboot.h: ...moved here
	* loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h

2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/env.c (grub_env_context_open): Added an argument to specify
	whether a new context inherits exported variables from current
	one. This is useful when making a sandbox to interpret a config
	file.
	All callers updated.

	* include/grub/env.h (grub_env_context_open): Updated the prototype.

2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/env.c (grub_env_context_close): Fix memory leaks.

2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/main.c (grub_normal_execute): Added an argument
	BATCH to specify if an interactive interface should be provided
	after reading a config file.
	All callers updated.
	(read_command_list): Prevent being executed twice.
	(read_fs_list): Likewise.

	* include/grub/normal.h (grub_normal_execute): Updated the
	prototype.

2009-03-22  Pavel Roskin  <proski@gno.org>

	* kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
	_start.
	* kern/i386/pc/startup.S: Likewise.
	* kern/i386/efi/startup.S: Likewise.
	* kern/i386/ieee1275/startup.S: Likewise.
	* kern/i386/coreboot/startup.S: Likewise.
	* kern/x86_64/efi/startup.S: Likewise.

	* aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
	* configure.ac: Don't call grub_CHECK_START_SYMBOL.
	* kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.

2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>

	Bugfixes in multiboot for bugs uncovered by solaris kernel.

	* loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
	limit detection.
	Use vaddr of correct segment for entry_point.

2009-03-21  Bean  <bean123ch@gmail.com>

	* commands/blocklist.c: Add include file <grub/command.h>, remove
	<grub/normal.h> and <grub/arg.h>.
	(grub_cmd_blocklist): Use the new command interface.
	(GRUB_MOD_INIT): Likewise.
	(GRUB_MOD_FINI): Likewise.
	* commands/boot.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/configfile.c: Likewise.
	* commands/crc.c: Likewise.
	* commands/echo.c: Likewise.
	* commands/halt.c: Likewise.
	* commands/handler.c: Likewise.
	* commands/hdparm.c: Likewise.
	* commands/help.c: Likewise.
	* commands/hexdump.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/lsmmap.c: Likewise.
	* commands/lspci.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/read.c: Likewise.
	* commands/reboot.c: Likewise.
	* commands/search.c: Likewise.
	* commands/sleep.c: Likewise.
	* commands/test.c: Likewise.
	* commands/usbtest.c: Likewise.
	* commands/videotest.c: Likewise.
	* commands/i386/cpuid.c: Likewise.
	* commands/i386/pc/halt.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/pxecmd.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/i386/pc/vbetest.c: Likewise.
	* commands/ieee1275/suspend.c: Likewise.
	* disk/loopback.c: Likewise.
	* font/font_cmd.c: Likewise.
	* hello/hello.c: Likewise.
	* loader/efi/appleloader.c: Likewise.
	* loader/efi/chainloader.c: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/ieee1275/linux.c: Likewise.
	* loader/i386/linux.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/terminfo.c: Likewise.

	* term/i386/pc/vesafb.c: Removed <grub/arg.h>.
	* term/i386/pc/vga.c: Likewise.
	* video/readers/jpeg.c: Likewise.
	* video/readers/png.c: Likewise.
	* video/readers/tga.c: Likewise.

	* util/grub-fstest (cmd_loopback): Removed.
	(cmd_blocklist): Likewise.
	(cmd_ls): Likewise.
	(grub_register_command): Likewise.
	(grub_unregister_command): Likewise.
	(execute_command): Use grub_command_find to locate command and execute
	it.

	* include/grub/efi/chainloader.h: Removed.
	* loader/efi/chainloader_normal.c: Likewise.
	* loader/i386/bsd_normal.c: Likewise.
	* loader/i386/pc/chainloader_normal.c: Likewise.
	* loader/i386/pc/multiboot_normal.c: Likewise.
	* loader/linux_normal.c: Likewise.
	* loader/multiboot_loader_normal.c: Likewise.
	* loader/powerpc/ieee1275/linux_normal.c: Likewise.

	* gencmdlist.sh: Scan new registration command grub_register_extcmd
	and grub_register_command_p1.

	* conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
	kern/command.c, lib/arg.c and commands/extcmd.c.
	(pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
	(minicmd_mod_SOURCES): New variable.
	(minicmd_mod_CFLAGS): Likewise.
	(minicmd_mod_LDFLAGS): Likewise.
	(extcmd_mod_SOURCES): Likewise.
	(extcmd_mod_CFLAGS): Likewise.
	(extcmd_mod_LDFLAGS): Likewise.
	(boot_mod_SOURCES): Removed.
	(boot_mod_CFLAGS): Likewise.
	(boot_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
	kern/corecmd.c.
	(kernel_img_HEADERS): Add command.h.
	(grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
	commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
	and lib/arg.c.
	(pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
	_multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
	remove the corresponding normal mode command.
	(normal_mod_SOURCES): Remove normal/arg.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.

	* include/grub/arg.h: Move from here ...
	* include/grub/lib/arg.h: ... to here.

	* normal/arg.c: Move from here ...
	* lib/arg.c: ... to here.

	* commands/extcmd.c: New file.
	* commands/minicmd.c: Likewise.
	* include/grub/command.h: Likewise.
	* include/grub/extcmd.h: Likewise.
	* kern/command.c: Likewise.
	* kern/corecmd.c: Likewise.

	* kern/list.c (grub_list_iterate): Return int instead of void.
	(grub_list_insert): New function.
	(grub_prio_list_insert): Likewise.

	* kern/rescue.c (grub_rescue_command): Removed.
	(grub_rescue_command_list): Likewise.
	(grub_rescue_register_command): Likewise.
	(grub_rescue_unregister_command): Likewise.
	(grub_rescue_cmd_boot): Move to minicmd.c
	(grub_rescue_cmd_help): Likewise.
	(grub_rescue_cmd_info): Likewise.
	(grub_rescue_cmd_boot): Likewise.
	(grub_rescue_cmd_testload): Likewise.
	(grub_rescue_cmd_dump): Likewise.
	(grub_rescue_cmd_rmmod): Likewise.
	(grub_rescue_cmd_lsmod): Likewise.
	(grub_rescue_cmd_exit): Likewise.
	(grub_rescue_print_devices): Moved to corecmd.c.
	(grub_rescue_print_files): Likewise.
	(grub_rescue_cmd_ls): Likewise.
	(grub_rescue_cmd_insmod): Likewise.
	(grub_rescue_cmd_set): Likewise.
	(grub_rescue_cmd_unset): Likewise.
	(attempt_normal_mode): Use grub_command_find to get normal module.
	(grub_enter_rescue_mode): Use grub_register_core_commands to register
	commands, remove grub_rescue_register_command calls.

	* normal/command.c (grub_register_command): Removed.
	(grub_unregister_command): Likewise.
	(grub_command_find): Likewise.
	(grub_iterate_commands): Likewise.
	(rescue_command): Likewise.
	(export_command): Moved to corecmd.c.
	(set_command): Removed.
	(unset_command): Likewise.
	(insmod_command): Likewise.
	(rmmod_command): Likewise.
	(lsmod_command): Likewise.
	(grub_command_init): Likewise.

	* normal/completion.c (iterate_command): Use cmd->prio to check for
	active command.
	(complete_arguments): Use grub_extcmd_t structure to find options.
	(grub_normal_do_completion): Change function grub_iterate_commands to
	grub_command_iterate.

	* normal/execute.c (grub_script_execute_cmd): No need to parse
	argument here.

	* normal/main.c (grub_dyncmd_dispatcher): New function.
	(read_command_list): Register unload commands as dyncmd.
	(grub_cmd_normal): Use new command interface, register rescue,
	unregister normal at entry, register normal, unregister rescue at exit.

	* include/grub/list.h (grub_list_test_t): New type.
	(grub_list_iterate): Return int instead of void.
	(grub_list_insert): New function.
	(GRUB_AS_NAMED_LIST_P): New macro.
	(GRUB_AS_PRIO_LIST): Likewise.
	(GRUB_AS_PRIO_LIST_P): Likewise.
	(GRUB_PRIO_LIST_PRIO_MASK): New constant.
	(GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
	(grub_prio_list): New structure.
	(grub_prio_list_insert): New function.
	(grub_prio_list_remove): New inline function.

	* include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
	(GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
	(GRUB_COMMAND_FLAG_MENU): Likewise.
	(GRUB_COMMAND_FLAG_BOTH): Likewise.
	(GRUB_COMMAND_FLAG_TITLE): Likewise.
	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
	(GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
	(GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
	(grub_command): Likewise.
	(grub_register_command): Likewise.
	(grub_command_find): Likewise.
	(grub_iterate_commands): Likewise.
	(grub_command_init): Likewise.
	(grub_arg_parse): Likewise.
	(grub_arg_show_help): Likewise.

	* include/grub/rescue.h (grub_rescue_register_command): Removed.
	(grub_rescue_unregister_command): Likewise.

	* include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
	grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
	grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.

	* include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
	grub_rescue_cmd_initrd.
	* include/grub/i386/loader.h: Likewise.
	* include/grub/x86_64/loader.h: Likewise.

	* include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.

2009-03-21  Bean  <bean123ch@gmail.com>

	* util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
	instead of stat in mingw environment.

	* util/misc.c (grub_millisleep): Use Sleep in mingw environment.

	* aclocal.m4 (grub_CHECK_LINK_DIR): New function.

	* configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
	AC_CONFIG_LINKS.

2009-03-21  Bean  <bean123ch@gmail.com>

	* fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
	out of range error.

2009-03-18  Michel Dänzer  <michel@daenzer.net>

	* fs/ext2.c (grub_ext2_read_block): Take endianness into account when
	checking inode flags for EXT4_EXTENTS_FLAG.

2009-03-18  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/linux.c: Include `<grub/video.h>' and
	`<grub/i386/pc/vbe.h>'..
	(grub_linux_setup_video): New function.  Loosely based on the EFI one.
	(grub_linux32_boot): Attempt to configure video settings with
	grub_linux_setup_video().
	(grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
	to avoid grub_console_fini() which would step out of graphical mode
	unconditionally.

2009-03-14  Robert Millan  <rmh@aybabtu.com>

	Fix build on powerpc.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.

2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>

	* term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
	background image command.

2009-03-12  Colin D Bennett  <colin@gibibit.com>

	* term/gfxterm.c (draw_cursor): Ensure character is redrawn.
	(grub_gfxterm_putchar): Extract pairs of identical calls to
	draw_cursor out of conditional blocks.

2009-03-11  Pavel Roskin  <proski@gnu.org>

	* fs/hfs.c (grub_hfs_strncasecmp): New function.
	(grub_hfs_cmp_catkeys): Use HFS specific string comparison.

2009-03-11  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/multiboot_elfxx.c
	(CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.

2009-03-11  Felix Zielcke  <fzielcke@z-51.de>

	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
	`kern/handler.c'.

2009-03-11  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/multiboot.c (code_size): New variable.
	(grub_multiboot): Define offsets by adding to `code_size' rather
	than subtracting from `grub_multiboot_payload_size'.  Provide
	4-byte alignment to MBI and others by increasing
	`boot_loader_name_length' appropriately.

	* loader/i386/multiboot_elfxx.c
	(CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.

2009-03-09  Felix Zielcke  <fzielcke@z-51.de>

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
	`fs/ext2.c'.

2009-03-08  Robert Millan  <rmh@aybabtu.com>

	Make loader/i386/linux.c usable on i386-pc again.

	* kern/i386/pc/init.c (grub_machine_init): Disable addition of low
	memory to heap.
	* loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
	`#error' stanza.

2009-03-07  Bean  <bean123ch@gmail.com>

	* loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
	allocation.

2009-03-06  Robert Millan  <rmh@aybabtu.com>

	Fix display issue on terminals with screen size other than 80x25
	(e.g. gfxterm with resolution higher than 640x480).

	* normal/main.c (grub_normal_init_page): Display title text in a
	position relative to the center of the terminal instead of relying
	on a hardcoded offset.

2009-03-04  Robert Millan  <rmh@aybabtu.com>

	Filter /etc/grub.d/10_* so that only add-ons for native kernels are
	installed.

	* Makefile.in (host_kernel): New variable.
	* conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
	scripts instead of just the windows one.
	* configure.ac: Initialize and AC_SUBST `host_kernel'.

2009-03-04  Felix Zielcke  <fzielcke@z-51.de>

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
	`kern/handler.c'.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

2009-03-04  Felix Zielcke  <fzielcke@z-51.de>

	* partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
	or if there's no space for the disk label and print the partition number on a
	invalid magic.

2009-03-04  Felix Zielcke  <fzielcke@z-51.de>

	* util/misc.c: Include <time.h>.
	(grub_millisleep): New function.

2009-03-04  Bean  <bean123ch@gmail.com>

	* configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
	another option -mno-red-zone.

	* commands/handler.c: Change module description.

	* kern/handler.c: Add missing space at the end of description line.

	* kern/list.c: Likewise.

2009-03-03  Robert Millan  <rmh@aybabtu.com>

	Move more components to the relocation area, and fix mbi pointer
	handling to use the destination rather than the origin (thanks to
	Vladimir Serbinenko for spotting).

	* loader/i386/multiboot.c (mbi_dest): New variable.
	(grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
	(grub_multiboot): Put cmdline, boot_loader_name and mbi in the
	relocation area.

2009-03-01  Bean  <bean123ch@gmail.com>

	* include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
	(GRUB_EFI_ACPI_TABLE_GUID): Likewise.
	(GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
	(GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.

	* loader/i386/efi/linux.c (acpi_guid): New variable.
	(acpi_guid): Likewise.
	(EBDA_SEG_ADDR): New constant.
	(LOW_MEM_ADDR): Likewise.
	(FAKE_EBDA_SEG): Likewise.
	(fake_bios_data): New function.
	(grub_linux_boot): Call fake_bios_data.

2009-03-01  Bean  <bean123ch@gmail.com>

	* commands/terminal.c: Removed.

	* commands/handler.c: New file.

	* include/grub/list.h: Likewise.

	* include/grub/handler.h: Likewise.

	* kern/list.c: Likewise.

	* kern/handler.c: Likewise.

	* kern/term.h: Include header file <grub/handler.h>.
	(grub_term_input): Move next field to the beginning.
	(grub_term_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.
	(grub_term_register_input): Changed to inline function.
	(grub_term_register_output): Likewise.
	(grub_term_unregister_input): Likewise.
	(grub_term_unregister_output): Likewise.
	(grub_term_set_current_input): Likewise.
	(grub_term_set_current_output): Likewise.
	(grub_term_get_current_input): Likewise.
	(grub_term_get_current_output): Likewise.
	(grub_term_iterate_input): Removed.
	(grub_term_iterate_output): Likewise.

	* kern/term.c (grub_term_list_input): Removed.
	(grub_term_list_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.
	(grub_cur_term_input): Change variable as macro.
	(grub_cur_term_output): Likewise.
	(grub_term_register_input): Removed.
	(grub_term_register_output): Likewise.
	(grub_term_unregister_input): Likewise.
	(grub_term_unregister_output): Likewise.
	(grub_term_set_current_input): Likewise.
	(grub_term_set_current_output): Likewise.
	(grub_term_iterate_input): Likewise.
	(grub_term_iterate_output): Likewise.
	(grub_term_get_current_input): Likewise.
	(grub_term_get_current_output): Likewise.

	* util/grub-editenv.c: Include header file <grub/handler.h>.
	(grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.

	* util/grub-fstest.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.

	* util/grub-probe.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.

	* util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
	(grub_term_get_current_output): Likewise.
	(grub_term_input_class): New variable.
	(grub_term_output_class): Likewise.

	* conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
	(terminal_mod_SOURCES): Likewise.
	(terminal_mod_CFLAGS): Likewise.
	(terminal_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_img_SOURCES): Add list.c and handler.c.
	(kernel_img_HEADERS): Add list.h and handler.h.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_mod_SOURCES): Add list.c and handler.c.
	(kernel_mod_HEADERS): Add list.h and handler.h.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_mod_SOURCES): Add list.c and handler.c.
	(kernel_mod_HEADERS): Add list.h and handler.h.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
	handler.c.
	(kernel_elf_SOURCES): Add list.c and handler.c.
	(kernel_elf_HEADERS): Add list.h and handler.h.

2009-02-27  Robert Millan  <rmh@aybabtu.com>

	Factorize elf32 / elf64 code in Multiboot loader.  This will
	prevent it from getting out of sync again.

	* loader/i386/multiboot.c (grub_multiboot_is_elf32,
	grub_multiboot_load_elf32, grub_multiboot_is_elf64,
	grub_multiboot_load_elf64): Move from here ...
	* loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
	grub_multiboot_load_elf): ... to here (new file).

2009-02-27  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in: Rename "single-user mode" to
	"recovery mode".

2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>

	Don't leak in SCSI code.
	* disk/scsi.c (grub_scsi_close): free `scsi'.

2009-02-27  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c: Move from here ...
	* loader/i386/multiboot.c: ... to here.  Update all users.

2009-02-27  Robert Millan  <rmh@aybabtu.com>

	Patch from Alexandre Bique <bique.alexandre@gmail.com>
	* util/i386/pc/grub-setup.c (setup): Fix directory path.

2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>

	* fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
	b-tree.

2009-02-27  Robert Millan  <rmh@aybabtu.com>

	* kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
	`0x' qualifier as 0 when base is specified as parameter).

2009-02-24  Bean  <bean123ch@gmail.com>

	* configure.ac: Check for -mcmodel=large in x86_64 target.

	* include/grub/efi/api.h (efi_call_10): New macro.
	(efi_wrap_10): New function.

	* include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
	(GRUB_PE32_REL_BASED_HIGH): Likewise.
	(GRUB_PE32_REL_BASED_LOW): Likewise.
	(GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
	(GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
	(GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
	(GRUB_PE32_REL_BASED_SECTION): Likewise.
	(GRUB_PE32_REL_BASED_REL): Likewise.
	(GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
	(GRUB_PE32_REL_BASED_DIR64): Likewise.
	(GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.

	* kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
	issue.

	* kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
	(efi_wrap_10): New function.

	* kern/x86_64/efi/startup.S (codestart): Use relative addressing.

	* loader/efi/appleloader.c (devpath_5): Add support for late 2008
	MB/MBP model (NV chipset).
	(devdata_devs): Add devpath_5 to the list.

	* load/i386/efi/linux.c (video_base): Remove variable.
	(RGB_MASK): New macro.
	(RGB_MAGIC): Likewise.
	(LINE_MIN): Likewise.
	(LINE_MAX): Likewise.
	(FBTEST_STEP): Likewise.
	(FBTEST_COUNT): Likewise.
	(fb_list): New variable.
	(grub_find_video_card): Remove function.
	(find_framebuf): New function.
	(grub_linux_setup_video): Use find_framebuf to get frame buffer and
	line length.

	* util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
	problem for x86_64.

2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>

	Patch #25624 by Kevin Lacquement <kevin@lacqui>.

	* util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
	coding tool name.

2009-02-22  Robert Millan  <rmh@aybabtu.com>

	* include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
	* loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
	in our relocation, instead of using it directly from heap.  Also
	use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.

2009-02-21  Robert Millan  <rmh@aybabtu.com>

	Implement USB keyboard support (based on patch by Marco Gerards)

	* conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
	(usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
	(usb_keyboard_mod_LDFLAGS): New variables.

	* term/usb_keyboard.c: New file.

2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>

	Corrected wrong declaration

	* kern/disk.c: corrected declaration of grub_disk_ata_pass_through.

2009-02-14  Christian Franke  <franke@computer.org>

	* commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
	(grub_lspci_iter): Print class code and programming interface byte.

2009-02-14  Christian Franke  <franke@computer.org>

	* gendistlist.sh: Ignore `.svn' directories.

2009-02-14  Felix Zielcke  <fzielcke@z-51.de>

	* fs/fat.c: Add 2009 to Copyright line.

2009-02-14  Christian Franke  <franke@computer.org>

	* commands/hdparm.c: New file.  Provides `hdparm' command
	which sends ATA commands via grub_disk_ata_pass_through ().

	* conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.

	* disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
	and <grub/cpu/io.h> to include/grub/ata.h.
	(enum grub_ata_addressing_t): Move to include/grub/ata.h.
	(GRUB_CDROM_SECTOR_SIZE): Remove.
	(GRUB_ATA_*): Move to include/grub/ata.h.
	(GRUB_ATAPI_*): Likewise.
	(enum grub_ata_commands): Likewise.
	(enum grub_ata_timeout_milliseconds): Likewise.
	(struct grub_ata_device): Likewise.
	(grub_ata_regset): Likewise.
	(grub_ata_regget): Likewise.
	(grub_ata_regset2): Likewise.
	(grub_ata_regget2): Likewise.
	(grub_ata_check_ready): Likewise.
	(grub_ata_wait_not_busy): Remove static, exported in
	include/grub/ata.h.
	(grub_ata_wait_drq): Likewise.
	(grub_ata_pio_read): Likewise.

	* disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
	function for hdparm.mod.

	* include/grub/ata.h: New file, contains declarations from
	disk/ata.c.
	(enum grub_ata_commands): Add new commands for commands/hdparm.c.

	* include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
	(grub_disk_ata_pass_through): New exported variable.

	* kern/disk.c (grub_disk_ata_pass_through): New variable.

2009-02-13  Colin D Bennett  <colin@gibibit.com>

	Support multiple fallback entries, and provide an API to support
	executing default+fallback menu entries.  Renamed the `terminal' menu
	viewer to `text'.

	* include/grub/normal.h (grub_normal_text_menu_viewer): New global
	variable declaration.
	(grub_menu_execute_callback): New structure declaration.
	(grub_menu_execute_callback_t): New typedef.
	(grub_menu_execute_with_fallback): New function declaration.
	(grub_menu_get_entry): Likewise.
	(grub_menu_get_timeout): Likewise.
	(grub_menu_set_timeout): Likewise.

	* normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.

	* normal/menu.c (grub_wait_after_message): Moved to
	`normal/menu_text.c'.
	(draw_border): Likewise.
	(print_message): Likewise.
	(print_entry): Likewise.
	(print_entries): Likewise.
	(grub_menu_init_page): Likewise.
	(get_entry_number): Likewise.
	(print_timeout): Likewise.
	(run_menu): Likewise.
	(grub_menu_execute_entry): Likewise.
	(show_text_menu): Likewise.
	(get_and_remove_first_entry_number): New function.
	(grub_menu_execute_with_fallback): Likewise.
	(get_entry): Renamed to ...
	(grub_menu_get_entry): .. this and made it global.
	(get_timeout): Renamed to ...
	(grub_menu_get_timeout): ... this and made it global.
	(set_timeout): Renamed to ...
	(grub_menu_set_timeout): ... this and made it global.
	(grub_normal_terminal_menu_viewer): Renamed to ...
	(grub_normal_text_menu_viewer): ... this.

	* normal/menu_text.c: New file.  Extracted text-menu-specific code
	from normal/menu.c.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

2009-02-11  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Update old reference to `font' command.

2009-02-10  Felix Zielcke  <fzielcke@z-51.de>

	* fs/fat.c (grub_fat_mount): Fix wrong comparison.

	Based on patch from Javier Martín.

2009-02-09  Felix Zielcke  <fzielcke@z-51.de>

	* conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
	to avoid false positives with FAT.
	(grub_fstest_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

2009-02-09  Felix Zielcke  <fzielcke@z-51.de>

	* fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
	bpb.version_specific.fat12_or_fat16.fstype and
	bpb.version_specific.fat32.fstype.

2009-02-08  Robert Millan  <rmh@aybabtu.com>

	* fs/tar.c: Replace "fs/cpio.c" with "cpio.c".

2009-02-08  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (host_os, host_cpu): New variables.
	(target_os): Remove.  Update all users.

2009-02-08  Marco Gerards  <marco@gnu.org>

	* Makefile.in (enable_grub_emu_usb): New variable.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
	(grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
	`util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
	(grub_emu_LDFLAGS): Add `$(LIBUSB)'.
	(pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
	`usbtest.mod' and `usbms.mod'.
	(usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
	(usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
	(uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
	(ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
	(usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
	variables.

	* disk/usbms.c: New file.

	* include/grub/usb.h: Likewise.

	* include/grub/usbtrans.h: Likewise.

	* include/grub/usbdesc.h: Likewise.

	* bus/usb/usbtrans.c: Likewise.

	* bus/usb/ohci.c: Likewise.

	* bus/usb/uhci.c: Likewise.

	* bus/usb/usbhub.c: Likewise.

	* bus/usb/usb.c: Likewise.

	* commands/usbtest.c: Likewise.

	* util/usb.c: Likewise.

	* include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.

	* configure.ac: Test for libusb presence.

	* util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.

2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>

	* kern/mm.c: Add more comments.

2009-02-08  Robert Millan  <rmh@aybabtu.com>

	Patch from Javier Martín.
	* fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
	`EXT4_FEATURE_INCOMPAT_FLEX_BG'.

2009-02-08  Robert Millan  <rmh@aybabtu.com>

	* fs/cpio.c: Split tar functionality to ...
	* fs/tar.c: ... here (new file).  Update all users.

2009-02-07  Robert Millan  <rmh@aybabtu.com>

	* fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
	backward-incompatible features.

	Based on patch from Javier Martín, with some adjustments.

2009-02-07  Michael Scherer  <misc@mandriva.org>

	* fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.

2009-02-07  Robert Millan  <rmh@aybabtu.com>

	* conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
	position of `disk/lvm.c' to ensure grub_init_all() always picks it
	after the RAID stuff.

2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>

	Fixes problem when running vbetest command as reported by
	Vladimir Serbinenko <phcoder@gmail.com>.

	* (grub_vbe_set_video_mode): Fixed problem with text modes.

2009-02-04  Felix Zielcke  <fzielcke@z-51.de>

	util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
	/dev/md/NpN style mdraid devices.

2009-02-03  Felix Zielcke  <fzielcke@z-51.de>

	* util/unifont2pff.rb: Remove.

2009-02-03  Felix Zielcke  <fzielcke@z-51.de>

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
	`#'.

2009-02-03  Felix Zielcke  <fzielcke@z-51.de>

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

2009-02-02  Christian Franke  <franke@computer.org>

	* lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.

2009-02-01  Felix Zielcke  <fzielcke@z-51.de>

	* INSTALL: Note that we now require at least autoconf 2.59 and
	that LZO is optional.

2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>

	Base on patch on bug #24154 created by Tomas Tintera
	<trosos@seznam.cz>.

	* video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.

2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>

	Based on patch on bug #25318 created by Bernhard Rosenkraenzer
	<bero@arklinux.org>.

	* normal/parser.y (script_init): Add missing semicolon.

2009-01-31  Colin D Bennett  <colin@gibibit.com>

	* normal/main.c: Add include to grub/menu_viewer.h.
	(free_menu_entry_classes): Added.
	(grub_normal_menu_addentry): Added class property handling.
	(grub_normal_execute): Changed to use new menu viewer for menu viewing.
	(GRUB_MOD_INIT(normal)): Added register for text based menu viewer.

	* normal/menu_viewer.c: New file.

	* normal/menu.c (run_menu_entry): Renamed to ...
	(grub_menu_execute_entry): ... this and	made it as global.
	(grub_menu_run): Renamed to ...
	(show_text_menu): ... this and made it local.
	(show_text_menu): Adapt to new function names.
	(grub_normal_terminal_menu_viewer): New global variable.

	* include/grub/menu.h: New file.

	* include/grub/menu_viewer.h: New file.

	* include/grub/normal.h: Added include to grub/menu.h.
	(grub_menu_entry): Moved to include/grub/menu.h.
	(grub_menu_entry_t): Likewise.
	(grub_menu): Likewise.
	(grub_menu_t): Likewise.
	(grub_normal_terminal_menu_viewer): Added.
	(grub_menu_execute_entry): Likewise.
	(grub_menu_run): Removed.

	* DISTLIST: Added include/grub/menu.h.
	Added include/grub/menu_viewer.h.
	Added normal/menu_viewer.c.

2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>

	* normal/execute.c (grub_script_execute_menuentry): Changed to use
	arglist for menutitle arguments.

	* normal/main.c (grub_normal_menu_addentry): Likewise.

	* normal/parser.y (menuentry): Likewise.

	* normal/script.c (grub_script_create_cmdmenu): Likewise.

	* include/grub/script.h (grub_script_cmd_menuentry): Likewise.
	(grub_script_create_cmdmenu): Likewise.

	* include/grub/normal.h (grub_normal_menu_addentry): Likewise.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
	changes.

	* conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.

2009-01-30  Christian Franke  <franke@computer.org>

	* normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
	in option help text.

2009-01-27  Pavel Roskin  <proski@gnu.org>

	* disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.

2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>

	* commands/lsmmap.c: Add include to grub/machine/memory.h.

	* fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.

	* term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
	unregister function.

2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>

	* disk/scsi.c (grub_scsi_read): Fix sign problem.

	* term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.

	* util/grub-mkfont.c (usage): Fix typo.

	* util/elf/grub-mkimage.c (load_modules): Fix warning.

2009-01-26  Daniel Mierswa  <impulze@impulze.org>

	* fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.

	* commands/search.c (search_fs_uuid): Ignore case of the UUID.

	* kern/misc.c (grub_strcasecmp): New function.
	(grub_strcasecmp): Use grub_size_t instead of int for length.
	Fix return value.
	* include/grub/misc.h: Update function prototypes.

2009-01-26  Robert Millan  <rmh@aybabtu.com>

	* configure.ac: Fix cross-compilation check.

2009-01-22  Christian Franke  <franke@computer.org>

	* kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
	(precision) digit string.  Allow `.format2' without `format1' (width).
	Limit input chars for `%s' output to `format2' if specified.  This is
	compatible with standard printf ().

2009-01-22  Christian Franke  <franke@computer.org>

	* disk/ata.c (grub_ata_wait_status): Replace by ...
	(grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
	other status bits may be invalid while BSY is asserted.
	(grub_ata_check_ready): New function.
	(grub_ata_cmd): Removed.
	(grub_ata_wait_drq): New function.
	(grub_ata_strncpy): Remove inline.
	(grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
	and error check now done by grub_ata_wait_drq ().
	(grub_ata_pio_write): Likewise.
	(grub_atapi_identify): Set DEV before check for !BSY.  Use
	grub_ata_wait_drq () to wait for data.
	(grub_ata_device_initialize): Add status register check to
	detect missing SATA slave devices.  Add debug messages.
	(grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
	(grub_atapi_packet): Set DEV before check for !BSY.  Replace
	transfer loop by grub_ata_pio_write ().
	(grub_ata_identify): Set DEV before check for !BSY. Use
	grub_ata_wait_drq () to wait for data.
	(grub_ata_setaddress): Set DEV before check for !BSY.
	(grub_ata_readwrite): Remove duplicate code, handle batch/rest and
	read/write in one loop.  Fix invalid command on write.  Fix incomplete
	command on (size % batch) == 0.  Add missing error check after write of
	last block.  Add debug messages.
	(grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().

2009-01-19  Christian Franke  <franke@computer.org>

	* disk/ata.c (GRUB_ATAPI_REG_*): New defines.
	(GRUB_ATAPI_IREASON_*): Likewise.
	(grub_ata_pio_write): Fix timeout error return.
	(grub_atapi_identify): Add grub_ata_wait () after cmd.
	(grub_atapi_wait_drq): New function.
	(grub_atapi_packet): New parameter `size'.
	Use grub_atapi_wait_drq () and direct write instead of
	grub_ata_pio_write ().
	(grub_atapi_read): Replace grub_ata_pio_read () by a loop which
	reads the number of bytes requested by the device for each DRQ
	assertion.
	(grub_atapi_write): Remove old implementation, return not
	implemented instead.

2009-01-19  Christian Franke  <franke@computer.org>

	* disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
	of 512 to calculate data size.
	(grub_scsi_read12): Likewise.
	(grub_scsi_write10): Likewise.
	(grub_scsi_write12): Likewise.
	(grub_scsi_read): Adjust size according to blocksize.
	Add checks for invalid blocksize and unaligned transfer.

2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>

	* font/font.c (grub_font_loader_init): Re-position unknown glyph.

	* term/gfxterm.c (write_char): Fix background rendering for wide
	width glyphs.

2009-01-19  Robert Millan  <rmh@aybabtu.com>

	* config.guess: Update to latest version from config git.
	* config.sub: Likewise.

2009-01-17  Felix Zielcke  <fzielcke@z-51.de>

	* Makefile.in: Change font compilation to use new grub-mkfont instead
	of java version.

	* util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
	* util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.

2009-01-16  Christian Franke  <franke@computer.org>

	* disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
	(enum grub_ata_timeout_milliseconds): New enum.
	(grub_ata_wait_status): Add parameter milliseconds.
	(grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
	recovery from timed-out commands.
	(grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
	return grub_errno instead of REG_ERROR.
	(grub_ata_pio_write): Add parameter milliseconds.
	(grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
	Pass milliseconds to grub_ata_wait_status () and
	grub_ata_pio_read ().
	(grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
	(grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
	grub_ata_wait_status ().  Fix IDENTIFY timeout check.
	(grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
	It is not suitable for device detection, because DEV bit is ignored,
	the command may run too long, and not all devices set the signature
	properly.
	(grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
	(grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
	Fix device selection, DEV bit must be set first to address the registers
	of the correct device.
	(grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
	grub_ata_pio_read/write ().
	(grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
	(grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().

2009-01-13  Carles Pina i Estany  <carles@pina.cat>

	* util/grub-editenv.c (main): Use fseeko(), not fseek().

2009-01-13  Bean  <bean123ch@gmail.com>

	* util/grub-mkfont.c (write_font): forget to remove some debug code.

2009-01-13  Bean  <bean123ch@gmail.com>

	* Makefile.in: (enable_grub_mkfont): New variable.
	(freetype_cflags): Likewise.
	(freetype_libs): Likewise.

	* common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
	(grub_mkfont_SOURCES): New variable.
	(grub_mkfont_CFLAGS): Likewise.
	(grub_mkfont_LDFLAGS): Likewise.

	* configure.ac (--enable-grub-mkfont): New option. Check for freetype2
	library if `--enable-grub-mkfont' is requested.
	(enable_grub_mkfont): New variable.
	(freetype_cflags): Likewise.
	(freetype_libs): Likewise.

	* util/grub-mkfont.c: New file.

2009-01-12  Christian Franke  <franke@computer.org>

	* disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
	mode check.  Fix setting of compat_use[].

2009-01-10  Robert Millan  <rmh@aybabtu.com>

	Update a few copyright years which we forgot to do in 2008 (only for
	files whose changes made in 2008 were copyright-significant)

	* Makefile.in: Add 2008 to Copyright line.
	* disk/ieee1275/ofdisk.c: Likewise.
	* disk/efi/efidisk.c: Likewise.
	* kern/dl.c: Likewise.
	* kern/sparc64/ieee1275/init.c: Likewise.
	* kern/mm.c: Likewise.
	* kern/efi/mm.c: Likewise.
	* boot/i386/pc/boot.S: Likewise.
	* genfslist.sh: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/jfs.c: Likewise.
	* fs/minix.c: Likewise.
	* fs/ufs.c: Likewise.
	* gensymlist.sh.in: Likewise.
	* genkernsyms.sh.in: Likewise.
	* include/grub/misc.h: Likewise.
	* include/grub/types.h: Likewise.
	* include/grub/symbol.h: Likewise.
	* include/grub/elf.h: Likewise.
	* include/grub/kernel.h: Likewise.
	* include/grub/disk.h: Likewise.
	* include/grub/dl.h: Likewise.
	* include/grub/i386/linux.h: Likewise.
	* include/grub/i386/pc/biosdisk.h: Likewise.
	* include/grub/efi/api.h: Likewise.
	* include/grub/efi/pe32.h: Likewise.
	* include/grub/util/misc.h: Likewise.
	* normal/execute.c: Likewise.
	* normal/arg.c: Likewise.
	* normal/completion.c: Likewise.
	* normal/lexer.c: Likewise.
	* normal/parser.y: Likewise.
	* normal/misc.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/hexdump.c: Likewise.
	* commands/terminal.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/help.c: Likewise.
	* partmap/pc.c: Likewise.
	* loader/efi/chainloader.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* loader/i386/pc/multiboot2.c: Likewise.
	* term/efi/console.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* util/lvm.c: Likewise.
	* util/console.c: Likewise.
	* util/i386/efi/grub-mkimage.c: Likewise.
	* util/raid.c: Likewise.

2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>

	* commands/videotest.c: Removed include to grub/machine/memory.h.

	* conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
	videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
	(video_mod_SOURCES): Removed.
	(video_mod_CFLAGS): Likewise.
	(video_mod_LDFLAGS): Likewise.
	(gfxterm_mod_SOURCES): Likewise.
	(gfxterm_mod_CFLAGS): Likewise.
	(gfxterm_mod_LDFLAGS): Likewise.
	(videotest_mod_SOURCES): Likewise.
	(videotest_mod_CFLAGS): Likewise.
	(videotest_mod_LDFLAGS): Likewise.
	(bitmap_mod_SOURCES): Likewise.
	(bitmap_mod_CFLAGS): Likewise.
	(bitmap_mod_LDFLAGS): Likewise.
	(tga_mod_SOURCES): Likewise.
	(tga_mod_CFLAGS): Likewise.
	(tga_mod_LDFLAGS): Likewise.
	(jpeg_mod_SOURCES): Likewise.
	(jpeg_mod_CFLAGS): Likewise.
	(jpeg_mod_LDFLAGS): Likewise.
	(png_mod_SOURCES): Likewise.
	(png_mod_CFLAGS): Likewise.
	(png_mod_LDFLAGS): Likewise.

	* conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
	bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
	(video_mod_SOURCES): Added.
	(video_mod_CFLAGS): Likewise.
	(video_mod_LDFLAGS): Likewise.
	(videotest_mod_SOURCES): Likewise.
	(videotest_mod_CFLAGS): Likewise.
	(videotest_mod_LDFLAGS): Likewise.
	(bitmap_mod_SOURCES): Likewise.
	(bitmap_mod_CFLAGS): Likewise.
	(bitmap_mod_LDFLAGS): Likewise.
	(tga_mod_SOURCES): Likewise.
	(tga_mod_CFLAGS): Likewise.
	(tga_mod_LDFLAGS): Likewise.
	(jpeg_mod_SOURCES): Likewise.
	(jpeg_mod_CFLAGS): Likewise.
	(jpeg_mod_LDFLAGS): Likewise.
	(png_mod_SOURCES): Likewise.
	(png_mod_CFLAGS): Likewise.
	(png_mod_LDFLAGS): Likewise.
	(gfxterm_mod_SOURCES): Likewise.
	(gfxterm_mod_CFLAGS): Likewise.
	(gfxterm_mod_LDFLAGS): Likewise.

	* term/gfxterm.c: Removed include to grub/machine/memory.h,
	grub/machine/console.h.

2009-01-04  Jerone Young  <jerone@gmail.com>

	Make on screen instructions clearer

	Based on patch created by Jidanni <jidanni@jidanni.org>

	* normal/menu.c: print clearer instructions on the screen

2009-01-02  Colin D Bennett  <colin@gibibit.com>

	New font engine.

	Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
	build system and fixed gfxterm.c to work with different	sized fonts.

	* configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.

	* configure: Re-generated.

	* DISTLIST: Removed font/manager.c.
	Added font/font.c.
	Added font/font_cmd.c.

	* Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
	compilation.

	* include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.

	* kern/misc.c (grub_utf8_to_ucs4): Changed prototype.

	* kern/term.c: Changed users of grub_utf8_to_ucs4.

	* normal/menu.c: Likewise.

	* conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
	(font_mod_SOURCES): Added font/font_cmd.c, font/font.c.

	* include/grub/font.h: Replaced with new file.

	* include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
	(GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
	(GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
	(GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
	(grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
	(grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
	fg_red, fg_green, fg_blue, fg_alpha.
	(grub_video_adapter): Removed blit_glyph.
	(grub_video_blit_glyph): Removed.

	* font/manager.c: Removed file.

	* font/font.c: New file.

	* font/font_cmd.c: Likewise.

	* video/video.c (grub_video_blit_glyph): Removed.

	* video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
	(grub_video_vbe_map_rgba): Likewise.
	(grub_video_vbe_unmap_color_int): Likewise.
	(grub_video_vbe_blit_glyph): Removed.
	(grub_video_vbe_adapter): Removed blit_glyph.

	* video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
	(get_pixel): Likewise.
	(set_pixel): Likewise.

	* commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.

	* term/gfxterm.c: Adapted to new font engine.

	* term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.

	* term/i386/pc/vga.c: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.

	* util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.

	* util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.

	* util/grub.d/00_header.in: Changed to use new loadfont command.

	* util/grub-mkconfig_lib.in: Changed font extension.

2008-12-28  Felix Zielcke  <fzielcke@z-51.de>

	* util/getroot.c (grub_util_get_grub_dev): Add support for
	/dev/md/dNNpNN style partitionable mdraid devices.

2008-12-12  Alex Smith  <alex@alex-smith.me.uk>

	* fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
	at a time limit of the PXE TFTP API correctly.
	(grub_pxefs_close): Likewise.

2008-11-29  Robert Millan  <rmh@aybabtu.com>

	* disk/ata.c (grub_ata_pciinit): Handle errors raised by
	grub_ata_device_initialize() calls.

2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>

	* fs/affs.c (grub_affs_iterate_dir): Return failure when directory
	iteration failed.
	* fs/sfs.c (grub_sfs_iterate_dir): Likewise.

2008-11-28  Robert Millan  <rmh@aybabtu.com>

	Fix build on powerpc-ieee1275.  Based on patch created by
	Manoel Abranches <mrabran@linux.vnet.ibm.com>.
	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
	`kern/ieee1275/mmap.c'.
	* include/grub/powerpc/ieee1275/memory.h: New file.

	Provide grub-install on coreboot.
	* conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
	(grub_install_SOURCES): New variable.
	* util/i386/pc/grub-install.in: Add a few condition checks to make it
	usable on coreboot.

2008-11-25  Felix Zielcke  <fzielcke@z-51.de>

	* util/grub-fstest.c (grub_term_get_current_input): Change return type
	to `grub_term_input_t'.
	(grub_term_get_current_output): Change return type to
	`grub_term_output_t'.

2008-11-22  Robert Millan  <rmh@aybabtu.com>

	Fix breakage on coreboot due to declaration mismatch.
	* term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
	(grub_vga_text_term): Use grub_vga_text_init_fini() instead of
	grub_vga_text_cls().

	* kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
	comments.  Avoid copying one more byte than necessary (just in case).

	* conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
	to 0x200000 (avoids trouble with some OFW implementations, and matches
	with the one in Yaboot).
	Reported by Manoel Abranches

2008-11-20  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
	(grub_get_rtc, grub_exit): Abort with grub_fatal() if called.

	* util/grub-mkconfig_lib.in (grub_warn): New function.
	(convert_system_path_to_grub_path): Use grub_warn() when issuing
	warnings, to obtain consistent formatting.
	* util/grub.d/00_header.in: Likewise.
	* util/update-grub_lib.in: Likewise.

	* loader/i386/linux.c (allocate_pages): Fix a warning.
	Move comment text to `#error' stanza.

	Harmonize ieee1275's grub_available_iterate() with the generic
	grub_machine_mmap_iterate() interface (fixes a recently-introduced
	build problem on i386-ieee1275):
	* kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
	* kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
	parameter `type'.  Update all users of this function.
	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
	`kern/ieee1275/mmap.c'.
	* kern/ieee1275/init.c
	* include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
	with ...
	(grub_machine_mmap_iterate): ... this.
	* include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
	return type to `grub_err_t'.  Update all implementations of this
	function prototype.
	* include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
	Likewise.

	Add `lsmmap' command (lists firmware-provided memory map):
	* commands/lsmmap.c: New file.
	* conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
	(lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
	variables.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.

2008-11-19  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
	* loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
	constraints to initrd allocation (based on code from
	loader/i386/pc/linux.c).  Without them, initrd was allocated too high
	for Linux to find it.

2008-11-14  Robert Millan  <rmh@aybabtu.com>

	* fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
	order to cope with duplicate slashes.

2008-11-14  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
	Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
	don't want to mess with lower memory, because it is used in the Linux
	loader.

	* loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
	an appropriate place in lower memory, between 0x10000 and 0x90000,
	like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
	is in our heap (probably as a result of it being corrupted during
	decompression).  Add #error instance with comment to explain why this
	loader isn't currently usable on PC/BIOS.

2008-11-14  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
	(GRUB_SERIAL_PORT_NUM): Fix miscalculation.

2008-11-12  Robert Millan  <rmh@aybabtu.com>

	Make loader/i386/linux.c buildable on i386-pc (although disabled).

	* include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
	(struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
	from here ...
	* include/grub/i386/pc/memory.h: ... to here.

2008-11-12  Robert Millan  <rmh@aybabtu.com>

	Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
	split).

	* include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
	(grub_console_cur_color, grub_console_real_putchar)
	(grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
	(grub_console_setcolorstate, grub_console_setcolor)
	(grub_console_getcolor): Move from here ...
	* include/grub/i386/vga_common.h: ... to here (new file).

	* term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
	`<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
	`<grub/i386/io.h>'.
	* term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
	`<grub/i386/vga_common.h>'.

2008-11-12  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
	* conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
	(vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
	variables.
	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
	`term/i386/pc/console.c' with `term/i386/vga_common.c'.

	* kern/i386/coreboot/init.c (grub_machine_init): Replace call to
	grub_console_init() with call to grub_vga_text_init().
	(grub_machine_fini): Replace call to
	grub_console_fini() with call to grub_vga_text_fini() and
	grub_at_keyboard_fini().

	* include/grub/i386/pc/console.h: Include `<grub/term.h>'.
	(grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
	(grub_console_setcolorstate, grub_console_setcolor)
	(grub_console_getcolor): New function prototypes.

	* term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
	(grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
	(grub_vga_text_setcursor): Static-ize.
	(grub_vga_text_term): New structure.
	(GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.

	* term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
	(grub_console_cur_color, grub_console_standard_color)
	(grub_console_normal_color, grub_console_highlight_color)
	(map_char, grub_console_putchar, grub_console_getcharwidth)
	(grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
	(grub_console_getcolor): Move from here ...
	* term/i386/vga_common.c: ... to here (same function names).

2008-11-12  Robert Millan  <rmh@aybabtu.com>

	Use newly-added Multiboot support in coreboot.

	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
	`kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.

	* kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
	alignment, set `MULTIBOOT_MEMORY_INFO' flag.
	(codestart): Store the MBI in `startup_multiboot_info' when we're
	being loaded using Multiboot.

	* kern/i386/coreboot/init.c (grub_machine_init): Move
	grub_at_keyboard_init() call to beginning of function (useful for
	debugging).  Call grub_machine_mmap_init() before attempting to use
	grub_machine_mmap_iterate().
	(grub_lower_mem, grub_upper_mem): Move from here ...
	* kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
	here (new file).

	* include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
	function prototype.

2008-11-12  Robert Millan  <rmh@aybabtu.com>

	Fix a regression introduced by the at_keyboard.mod split.  Because
	some terminals are default on some platforms and non-default on
	others, the first terminal being registered determines which is
	going to be default.

	* kern/term.c (grub_term_register_input): If this is the first
	terminal being registered, set it as the current one.
	(grub_term_register_output): Likewise.

	* term/efi/console.c (grub_console_init): Do not call
	grub_term_set_current_output() or grub_term_set_current_input().
	* term/ieee1275/ofconsole.c (grub_console_init): Likewise.
	* term/i386/pc/console.c (grub_console_init): Likewise.
	(grub_console_fini): Do not call grub_term_set_current_input()
	(but leave grub_term_set_current_output() to restore text mode).

2008-11-10  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Add backward compatibility check for
	versions of terminal.mod that don't understand `terminal_input' or
	`terminal_output'.

2008-11-09  Robert Millan  <rmh@aybabtu.com>

	* commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
	`terminal_input' / `terminal_output', not `terminal'.

2008-11-08  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (include_DATA): Fix srcdir=. assumption.
	(DISTCLEANFILES): Add `build_env.mk'.

2008-11-08  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
	`struct grub_term_output'.  Remove `.checkkey' and `.getkey'
	members.  Update all users.
	* util/console.c (grub_ncurses_term): Split in ...
	(grub_ncurses_term_input): ... this, and ...
	(grub_ncurses_term_output): ... this.  Update all users.
	* term/ieee1275/ofconsole.c: Remove stale `#endif'.

2008-11-08  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
	(PKGDATA): Add $(pkgdata_SRCDIR).
	(pkglib_BUILDDIR): New variable.
	(pkgdata_SRCDIR): New variable.
	(build_env.mk): New target.
	(include_DATA): New variable.
	(install-local): Install $(include_DATA) files in $(includedir).

2008-11-07  Pavel Roskin  <proski@gnu.org>

	* gendistlist.sh: Use C locale for sorting to ensure consistent
	output on all systems.

	* util/grub.d/00_header.in: Remove incorrect space before
	"serial".

2008-11-07  Robert Millan  <rmh@aybabtu.com>

	* include/multiboot2.h (struct multiboot_header): Add `flags' member as
	per specification.
	* loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
	* loader/multiboot_loader.c (find_multi_boot2_header): New function
	(based on find_multi_boot1_header).
	(grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
	using find_multi_boot2_header(), and abort if neither Multiboot or
	Multiboot headers were found.

2008-11-07  Robert Millan  <rmh@aybabtu.com>

	Modularize at_keyboard.mod:

	* conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
	(at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
	(at_keyboard_mod_LDFLAGS): New variables.

	Actual terminal split:

	* include/grub/term.h (struct grub_term): Split in ...
	(struct grub_term_input): ... this, and ...
	(struct grub_term_output): ... this.  Update all users.
	(grub_term_set_current): Split in ...
	(grub_term_set_current_input): ... this, and ...
	(grub_term_set_current_output): ... this.
	(grub_term_get_current): Split in ...
	(grub_term_get_current_input): ... this, and ...
	(grub_term_get_current_output): ... this.
	(grub_term_register): Split in ...
	(grub_term_register_input): ... this, and ...
	(grub_term_register_output): ... this.
	(grub_term_unregister): Split in ...
	(grub_term_unregister_input): ... this, and ...
	(grub_term_unregister_output): ... this.
	(grub_term_iterate): Split in ...
	(grub_term_iterate_input): ... this, and ...
	(grub_term_iterate_output): ... this.

	* kern/term.c (grub_term_list): Split in ...
	(grub_term_list_input): ... this, and ...
	(grub_term_list_output): ... this.  Update all users.
	(grub_cur_term): Split in ...
	(grub_cur_term_input): ... this, and ...
	(grub_cur_term_output): ... this.  Update all users.
	(grub_term_set_current): Split in ...
	(grub_term_set_current_input): ... this, and ...
	(grub_term_set_current_output): ... this.
	(grub_term_get_current): Split in ...
	(grub_term_get_current_input): ... this, and ...
	(grub_term_get_current_output): ... this.
	(grub_term_register): Split in ...
	(grub_term_register_input): ... this, and ...
	(grub_term_register_output): ... this.
	(grub_term_unregister): Split in ...
	(grub_term_unregister_input): ... this, and ...
	(grub_term_unregister_output): ... this.
	(grub_term_iterate): Split in ...
	(grub_term_iterate_input): ... this, and ...
	(grub_term_iterate_output): ... this.

	* kern/misc.c (grub_abort): Split use of grub_term_get_current() into
	a check for input and one for output (and only attempt to get keys
	from user when input works).

	* util/grub-probe.c (grub_term_get_current): Split in ...
	(grub_term_get_current_input): ... this, and ...
	(grub_term_get_current_output): ... this.
	* util/grub-fstest.c: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/grub-editenv.c: Likewise.

	Portability adjustments:

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
	`term/i386/pc/at_keyboard.c'.
	* kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
	grub_keyboard_controller_init() (now handled by terminal .init).
	* kern/i386/coreboot/init.c (grub_machine_init): Add call to
	grub_at_keyboard_init().
	* include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
	(grub_console_checkkey, grub_console_getkey): Remove (now provided by
	at_keyboard.mod via input terminal interface).
	* include/grub/i386/coreboot/console.h: Convert into a stub for
	`<grub/i386/pc/console.h>'.

	Migrate full terminals to new API:

	* term/efi/console.c (grub_console_term): Split into ...
	(grub_console_term_input): ... this, and ...
	(grub_console_term_output): ... this.  Update all users.
	* term/ieee1275/ofconsole.c: Remove __i386__ hack.
	(grub_ofconsole_init): Split into ...
	(grub_ofconsole_init_input): ... this, and ...
	(grub_ofconsole_init_output): ... this.
	(grub_ofconsole_term): Split into ...
	(grub_ofconsole_term_input): ... this, and ...
	(grub_ofconsole_term_output): ... this.  Update all users.
	* term/i386/pc/serial.c (grub_serial_term): Split into ...
	(grub_serial_term_input): ... this, and ...
	(grub_serial_term_output): ... this.  Update all users.
	* term/i386/pc/console.c (grub_console_term): Split into ...
	(grub_console_term_input): ... this, and ...
	(grub_console_term_output): ... this.  Update all users.
	(grub_console_term_input): Only enable it on PC/BIOS platform.
	(grub_console_init): Remove grub_keyboard_controller_init() call.

	Migrate input terminals to new API:

	* term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
	`i386' and `i386/pc' to enable build on x86_64 (this driver is
	i386-specific anyway).
	(grub_console_checkkey): Rename to ...
	(grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
	users.
	(grub_keyboard_controller_orig): New variable.
	(grub_console_getkey): Rename to ...
	(grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
	users.
	(grub_keyboard_controller_init): Static-ize.  Save original
	controller value so that it can be restored ...
	(grub_keyboard_controller_fini): ... here (new function).
	(grub_at_keyboard_term): New structure.
	(GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
	functions.

	Migrate output terminals to new API:

	* term/i386/pc/vga.c (grub_vga_term): Change type to
	`struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
	members.  Update all users.
	* term/gfxterm.c (grub_video_term): Change type to
	`struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
	members.  Update all users.
	* include/grub/i386/pc/console.h (grub_console_checkkey)
	(grub_console_getkey): Do not export (no longer needed by gfxterm,
	etc).

	Migrate `terminal' command and userland tools to new API:

	* commands/terminal.c (grub_cmd_terminal): Split into ...
	(grub_cmd_terminal_input): ... this, and ...
	(grub_cmd_terminal_output): ... this.
	(GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
	`terminal_input' and `terminal_output'.
	* util/grub.d/00_header.in: Adjust `terminal' calls to new
	`terminal_input' / `terminal_output' API.
	* util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
	${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
	provided ${GRUB_TERMINAL}, convert it).

2008-11-04  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_freebsd.in: New file.  Generate grub configuration
	for FreeBSD.
	* conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.

2008-11-03  Bean  <bean123ch@gmail.com>

	* kern/elf.c (grub_elf32_load): Revert to previous code.
	(grub_elf64_load): Likewise.

	* loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.

2008-11-01  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (CPPFLAGS): Fix builddir=. assumption.
	(TARGET_CPPFLAGS): Likewise.
	* genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.

2008-11-01  Carles Pina i Estany  <carles@pina.cat>

	* normal/menu.c (run_menu): Add Previous and Next Page keys in menu.

2008-10-29  Guillem Jover  <guillem.jover@nokia.com>

	* disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
	addition of objects until the code is not going to be able to fail.

2008-10-29  Guillem Jover  <guillem.jover@nokia.com>

	* disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
	(add a missing NULL check, and correct them by moving the pointer
	operations after the actual check).

2008-10-29  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-install.in: Handle empty string as output from
	make_system_path_relative_to_its_root().

2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>

	* disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
	circular metadata worst case scenario. If the metadata is circular
	then copy the wrap in place.
	* include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
	project lib/format_text/layout.h
	Circular metadata bug found and patch debugged by Jan Derk Gerlings.

2008-10-03  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.

2008-10-03  Felix Zielcke  <fzielcke@z-51.de>

	* util/update-grub_lib.in: Mention filename in warning message.

2008-09-29  Felix Zielcke  <fzielcke@z-51.de>

	* NEWS: Update for rename of update-grub to grub-mkconfig.

2008-09-29  Felix Zielcke  <fzielcke@z-51.de>

	* util/update-grub_lib.in: Copy to ...
	* util/grub-mkconfig_lib.in: ... this.  Update all users.
	* util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
	* util/update-grub.in: Rename to ...
	* util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
	option. Add `--output' option to allow users to specify the generated
	configuration file.  Default to stdout.
	(update_grub_dir): Rename to ...
	(grub_mkconfig_dir): ... this.
	(grub_cfg): Default to an empty string.
	* conf/common.rmk (update-grub): Rename to ...
	(grub-mkconfig): ... this.
	(update-grub_lib): Copy to ...
	(grub-mkconfig_lib): ... this.
	(update-grub_SCRIPTS): Copy to ...
	(grub-mkconfig_SCRIPTS): ... this. Update all users.
	(update-grub_DATA): Rename to ...
	(grub-mkconfig_DATA): ... this.

2008-09-28  Robert Millan  <rmh@aybabtu.com>

	* fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
	to `modified'.  Add the real `created' field.
	(grub_iso9660_uuid): Use `modified' rather than `created' for
	constructing the UUID.

2008-09-28  Felix Zielcke  <fzielcke@z-51.de>

	fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
	Based on code from Tomas Ebenlendr <ebik@ucw.cz>.

2008-09-28  Bean  <bean123ch@gmail.com>

	* fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
	Thanks to Christian Franke for finding this bug.

2008-09-25  Robert Millan  <rmh@aybabtu.com>

	* util/grub-mkdevicemap.c (make_device_map): Actually replace all
	instances of grub_util_get_disk_name() (see previous commit).

2008-09-25  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
	`util/i386/get_disk_name.c'.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
	`util/ieee1275/get_disk_name.c'.
	* include/grub/util/misc.h (grub_util_get_disk_name): Remove.
	* util/ieee1275/get_disk_name.c: Remove file.
	* util/i386/get_disk_name.c: Remove file.
	* util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
	"hd%d" for device.map entries, rather than using
	grub_util_get_disk_name().

2008-09-24  Carles Pina i Estany  <carles@pina.cat>

	* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
	warning.
	* commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.

2008-09-24  Carles Pina i Estany  <carles@pina.cat>

	* include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
	Changed to 0x5100.
	(GRUB_TERM_PPAGE): Changed to 0x4900.

2008-09-24  Robert Millan  <rmh@aybabtu.com>

	* include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
	macros (they were i386-pc specific).
	* include/grub/sparc64/ieee1275/console.h: Likewise.
	* include/grub/efi/console.h: Likewise.

2008-09-22  Bean  <bean123ch@gmail.com>

	* fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
	resident and in attribute list.

	* include/grub/ntfs.h (BMP_LEN): Removed.

2008-09-22  Bean  <bean123ch@gmail.com>

	* disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
	scsi->name and scsi->luns, as they will be set in grub_scsi_open.

	* disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
	error occurs, as grub_disk_open will call grub_disk_close, which will
	call p->close (scsi).

2008-09-21  Felix Zielcke  <fzielcke@z-51.de>

	* configure.ac (AC_INIT): Quote `GRUB' string and version number.
	(AC_PREREQ): Bumped to 2.59.
	(AC_TRY_COMPILE): Replace obsolete macro with ...
	(AC_COMPILE_IFELSE): ... this.
	* aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
	(AC_LINK_IFELSE): ... this.

2008-09-21  Felix Zielcke  <fzielcke@z-51.de>

	* autogen.sh: Add a call to `gendistlist.sh'.

2008-09-19  Christian Franke  <franke@computer.org>

	* aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
	* configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
	* include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
	Export __enable_execute_stack() to modules.
	* kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
	New function.

2008-09-09  Felix Zielcke  <fzielcke@z-51.de>

	* Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
	Sort the list.

2008-09-09  Felix Zielcke  <fzielcke@z-51.de>

	* util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
	#include <grub/util/hostdisk.h>.

2008-09-08  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
	segments when their filesz is zero (grub_file_read() interprets
	zero-size as "read until EOF", which results in memory corruption).
	Use `lowest_segment' rather than 0 for calculating the current
	segment load address.

2008-09-08  Robert Millan  <rmh@aybabtu.com>

	* util/hostdisk.c (open_device): Replace a grub_util_info() call
	with grub_dprintf("hostdisk", ...), as it was so verbose that it
	clobbered useful information.

2008-09-08  Robert Millan  <rmh@aybabtu.com>

	* include/grub/util/biosdisk.h: Move to ...
	* include/grub/util/hostdisk.h: ... here.  Update all users.
	* util/biosdisk.c: Move to ...
	* util/hostdisk.c: ... here.  Update all users.

2008-09-07  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
	variables.
	(grub_multiboot): Move `mbi' allocation upwards, so that mmap address
	and length can be stored directly in the `mbi->mmap_addr' and
	`mbi->mmap_length' struct fields.

2008-09-07  Robert Millan  <rmh@aybabtu.com>

	* conf/i386.rmk: New file.  Provides declaration for building
	`cpuid.mod'.
	* conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
	(cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
	variables.
	Include `conf/i386.mk'.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.

2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>

	Based on patch created by Colin D Bennett <colin@gibibit.com>.
	Adds optimization support for BGR based modes.

	* include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
	(grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_index): Likewise.
	(grub_video_i386_vbeblit_replace_directN): Added.
	(grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
	(grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
	(grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
	(grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
	(grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.

	* include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
	(grub_video_i386_vbefill_R8G8B8): Likewise.
	(grub_video_i386_vbefill_index): Likewise.
	(grub_video_i386_vbefill_direct32): Added.
	(grub_video_i386_vbefill_direct24): Likewise.
	(grub_video_i386_vbefill_direct16): Likewise.
	(grub_video_i386_vbefill_direct8): Likewise.

	* include/grub/video.h (grub_video_blit_format): Removed
	GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
	(grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
	GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
	GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
	GRUB_VIDEO_BLIT_FORMAT_BGR_565.

	* video/video.c (grub_video_get_blit_format): Updated to use new
	blit formats.  Added handling for 16 bit color modes.

	* video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
	fillers.
	(common_blitter): Updated to use new blitters.

	* video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
	Removed.
	(grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_index): Likewise.
	(grub_video_i386_vbeblit_replace_directN): Added.
	(grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
	(grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
	(grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
	(grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
	(grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
	(grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
	(grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.

	* video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
	(grub_video_i386_vbefill_R8G8B8): Likewise.
	(grub_video_i386_vbefill_index): Likewise.
	(grub_video_i386_vbefill_direct32): Added.
	(grub_video_i386_vbefill_direct24): Likewise.
	(grub_video_i386_vbefill_direct16): Likewise.
	(grub_video_i386_vbefill_direct8): Likewise.

	* video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
	types.

	* video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
	types.

	* video/readers/png.c (grub_png_decode_image_header): Adapt to new
	blitter types.

	* video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
	types.

2008-09-06  Felix Zielcke  <fzielcke@z-51.de>

	* disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
	RAID level 1.

2008-09-06  Felix Zielcke  <fzielcke@z-51.de>

	* fs/iso9660.c (grub_iso9660_date): New structure.
	(grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
	(grub_iso9660_uuid): New function.

2008-09-05  Bean  <bean123ch@gmail.com>

	* fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.

	* fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
	insensitive bit for names in Win32 and Win32 & DOS namespace.

	* include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.

	* include/grub/types.h (LONG_MAX): Likewise.

2008-09-04  Felix Zielcke  <fzielcke@z-51.de>

	* util/getroot.c: Include <config.h>.
	(grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
	add support for /dev/md/N devices and handle LVM double dash escaping.

2008-09-04  Felix Zielcke  <fzielcke@z-51.de>

	* config.guess: Update to latest version from config git.
	* config.sub: Likewise.

2008-09-03  Robert Millan  <rmh@aybabtu.com>

	* disk/scsi.c (grub_scsi_open): Remove size limit when printing
	`disk->total_sectors'.

2008-09-01  Colin D Bennett  <colin@gibibit.com>

	* include/grub/normal.h: Fixed incorrect comment for
	GRUB_COMMAND_FLAG_NO_ARG_PARSE.

2008-09-01  Colin D Bennett  <colin@gibibit.com>

	* commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
	values with defines.

	* include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
	(GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
	(GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
	(GRUB_VBE_MODEATTR_COLOR): Likewise.
	(GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
	(GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
	(GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
	(GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
	(GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
	(GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
	(GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
	(GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
	(GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
	(GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
	(GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
	(GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
	(GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
	(GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
	(GRUB_VBE_MEMORY_MODEL_YUV): Likewise.

2008-08-31  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
	declaration.
	(grub_multiboot): Fix a few warnings.

2008-08-31  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c: Update comment not to say that
	boot_device support is unimplemented.

2008-08-31  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c: Update comment not to say that a.out
	or memory map support are unimplemented.

2008-08-31  Colin D Bennett  <colin@gibibit.com>

	* util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.

2008-08-31  Colin D Bennett  <colin@gibibit.com>

	* commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
	total video memory in 'vbeinfo' output; show color format details for
	each video mode.

2008-08-30  Pavel Roskin  <proski@gnu.org>

	* util/genmoddep.c: Remove for real this time.
	* DISTLIST: Remove util/genmoddep.c.

2008-08-30  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
	as required by Multiboot spec (it was already 4-byte aligned, but
	only by chance).

2008-08-29  Pavel Roskin  <proski@gnu.org>

	* kern/powerpc/ieee1275/crt0.S: Rename to ...
	* kern/powerpc/ieee1275/startup.S: ... this.
	* conf/powerpc-ieee1275.rmk: Adjust for the above.
	* DISTLIST: Likewise.

	* kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
	grub/cpu/kernel.h.  Add start label for consistency with other
	platforms.  Add grub_prefix immediately after start.  Add jump
	to the code after grub_prefix.
	* include/grub/powerpc/kernel.h: Provide valid values for
	GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.

2008-08-29  Bean  <bean123ch@gmail.com>

	* configure.ac: Change host_os to cygwin for mingw.
	(asprintf): New check for function.

	* include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
	#if ! defined (__CYGWIN__) && ! defined (__MINGW32__).

	* include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
	declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
	sync, sleep and grub_util_get_disk_size for mingw.

	* util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
	to get size in mingw.
	(open_device): Use flag O_BINARY if it's defined.
	(find_root_device): Add dummy code for mingw.

	* util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
	(get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
	(get_scsi_disk_name): Return 0 for mingw.

	* util/hostfs.c: #include <grub/util/misc.h>.
	(grub_hostfs_open): Use "rb" flag to open file, use
	grub_util_get_disk_size to get disk size for mingw.

	* util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
	(asprintf): New function if HAVE_ASPRINTF is not set.
	(sync): New function for mingw.
	(sleep): Likewise.
	(grub_util_get_disk_size): Likewise.

2008-08-28  Pavel Roskin  <proski@gnu.org>

	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
	kern/time.c.

2008-08-28  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (find_grub_drive): Declare missing `i' variable.

2008-08-28  Robert Millan  <rmh@aybabtu.com>

	Change find_grub_drive() syntax so it doesn't prevent it from
	detecting NULL names as errors.

	* util/biosdisk.c (find_grub_drive): Move free slot search code
	from here ...
	(find_free_slot): ... to here.
	(read_device_map): Use find_free_slot() to search for free slots.

2008-08-27  Marco Gerards  <marco@gnu.org>

	* conf/common.rmk (pkglib_MODULES): Add scsi.mod.
	(scsi_mod_SOURCES): New variable.
	(scsi_mod_CFLAGS): Likewise
	(scsi_mod_LDFLAGS): Likewise.

	* disk/scsi.c: New file.

	* include/grub/scsi.h: Likewise.

	* include/grub/scsicmd.h: Likewise.

	* disk/ata.c: Include <grub/scsi.h>.
	(grub_atapi_packet): Do not use grub_ata_cmd, use registers
	instead.
	(grub_ata_iterate): Skip ATAPI devices.
	(grub_ata_open): Only handle ATAPI devices.
	(struct grub_atapi_read): Removed.
	(grub_atapi_readsector): Likewise.
	(grub_ata_read): No longer handle ATAPI devices.
	(grub_ata_write): Likewise.
	(grub_atapi_iterate): New function.
	(grub_atapi_read): Likewise.
	(grub_atapi_write): Likewise.
	(grub_atapi_open): Likewise.
	(grub_atapi_close): Likewise.
	(grub_atapi_dev): New variable.
	(GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
	(GRUB_MOD_FINI(ata)): Unregister ATAPI.

	* include/grub/disk.h (enum grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_SCSI_ID'.

2008-08-26  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (grub_util_biosdisk_open, open_device)
	(grub_util_biosdisk_get_grub_dev): Make error messages a bit more
	descriptive.

2008-08-23  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
	(grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
	disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
	(pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
	dm_nv.mod.
	(raid5rec_mod_SOURCES): New macro.
	(raid5rec_mod_CFLAGS): Likewise.
	(raid5rec_mod_LDFLAGS): Likewise.
	(raid6rec_mod_SOURCES): Likewise.
	(raid6rec_mod_CFLAGS): Likewise.
	(raid6rec_mod_LDFLAGS): Likewise.
	(mdraid_mod_SOURCES): Likewise.
	(mdraid_mod_CFLAGS): Likewise.
	(mdraid_mod_LDFLAGS): Likewise.
	(dm_nv_mod_SOURCES): Likewise.
	(dm_nv_mod_CFLAGS): Likewise.
	(dm_nv_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
	(grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
	disk/mdraid_linux.c and disk/dmraid_nvidia.c.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
	disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* disk/raid5_recover.c: New file.

	* disk/raid6_recover.c: Likewise.

	* disk/mdraid_linux.c: Likewise.

	* disk/dmraid_nvidia.c: Likewise.

	* disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
	ULONG_MAX.

	* disk/raid.c (grub_raid_open): Use the size of the smallest disk to
	calculate the size of raid device.
	(grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
	different layout of raid5.
	(grub_raid_scan_device): Remove code specific to mdraid.
	(grub_raid_list): New variable.
	(free_array): New function.
	(grub_raid_register): Likewise.
	(grub_raid_unregister): Likewise.
	(grub_raid_rescan): Likewise.
	(GRUB_MOD_INIT): Don't iterate device here.
	(GRUB_MOD_FINI): Use free_array to release resource.

	* include/grub/raid.h: Remove macro and structure specific to mdraid.
	(grub_raid5_recover_func_t): New function variable type.
	(grub_raid6_recover_func_t): Likewise.
	(grub_raid5_recover_func): New variable.
	(grub_raid6_recover_func): Likewise.
	(grub_raid_register): New function.
	(grub_raid_unregister): Likewise.
	(grub_raid_rescan): Likewise.
	(grub_raid_block_xor): Likewise.

	* util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
	(CMD_CRC): New macro.
	(part): Removed.
	(read_file): Handle device as well as file.
	(cmd_crc): New function.
	(fstest): Handle multiple disks.
	(options): Remove part, raw and long, add root and diskcount.
	(usage): Add crc, remove -p, -r, -l, add -r and -c.
	(main): Find the first non option entry and ignore subsequent options,
	add handling for the new options, support multiple disks.

	* util/grub-probe.c (probe): Add mdraid to abstraction_name.

2008-08-23  Bean  <bean123ch@gmail.com>

	* normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.

	* genfslist.sh: Ignore kernel.mod.

	* genpartmaplist.sh: Likewise.

2008-08-23  Robert Millan  <rmh@aybabtu.com>

	* util/getroot.c (find_root_device): Skip anything that starts with
	a dot, not just directories.  This avoids things like /dev/.tmp.md0.

2008-08-22  Felix Zielcke  <fzielcke@z-51.de>

	* util/update-grub.in (GRUB_GFXMODE): Export variable.
	* util/grub.d/00_header.in: Allow the administrator to change default
	gfxmode via ${GRUB_GFXMODE}.

2008-08-21  Felix Zielcke  <fzielcke@z-51.de>

	* fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.

2008-08-21  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/linux.c: New file.  Implements generic 32-bit Linux
	loader.
	* conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
	`loader/i386/pc/linux.c' with `loader/i386/linux.c'.

2008-08-20  Carles Pina i Estany  <carles@pina.cat>

	* menu/normal.c (run_menu): Replace hardcoded numbers with macros
	(16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)

2008-08-19  Robert Millan  <rmh@aybabtu.com>

	* term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
	(struct grub_virtual_screen): Remove `cursor_color'.
	(grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
	initialization.
	(write_cursor): Use `virtual_screen.fg_color' to draw cursor.

2008-08-18  Robert Millan  <rmh@aybabtu.com>

	Unify (identical) linux_normal.c files.
	* loader/i386/efi/linux_normal.c: Move from here ...
	* loader/linux_normal.c: ... to here.  Update all users.
	* loader/i386/pc/linux_normal.c: Delete.  Update all users.
	* loader/i386/ieee1275/linux_normal.c: Likewise.

2008-08-18  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
	(LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
	(LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
	(LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
	(LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
	New macros.
	(GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
	* loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
	(GRUB_LINUX_CL_END_OFFSET): ... to here.
	* loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
	(GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
	(GRUB_EFI_CL_END_OFFSET): Rename to ...
	(GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
	(grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
	Initialize `params->video_cursor_x' and `params->video_cursor_y'
	portably using grub_getxy().
	Replace `-EFI' with `-bzImage' in boot message.

2008-08-17  Robert Millan  <rmh@aybabtu.com>

	* include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).

2008-08-17  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.

	* include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
	(GRUB_MACHINE_MEMORY_RESERVED): New macros.
	(grub_machine_mmap_iterate): New function declaration.
	* include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
	structure.
	(GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
	macros.

	* kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
	type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
	Move e820 parsing from here ...
	* kern/i386/pc/mmap.c: New file.
	(grub_machine_mmap_iterate): ... to here.

	* include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
	(GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
	(GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
	(grub_available_iterate): Redeclare to return `void', and redeclare
	its hook to use grub_uint64_t as addr and size parameters, and rename
	to ...
	(grub_machine_mmap_iterate): ... this.  Update all users.

	* kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
	to make it more readable.  Rename to ...
	(grub_machine_mmap_iterate): ... this.

	* loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
	(grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
	(grub_multiboot): Allocate an extra region after the payload, and fill
	it with a Multiboot memory map.  Adjust a.out loader to calculate size
	with the extra space.
	(grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
	with the extra space.

2008-08-17  Carles Pina i Estany  <carles@pina.cat>

	* menu/normal.c (run_menu): Add Home and End keys in grub-menu.

2008-08-17  Felix Zielcke  <fzielcke@z-51.de>

	* gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
	mdate-sh to the list `find' searches for.
	* DISTLIST: Regenerated.

2008-08-16  Felix Zielcke  <fzielcke@z-51.de>

	* gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
	genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
	genmoddep.awk, gensymlist.sh.in.
	(DISTDIRS): Add bus, docs, hook, lib.
	* DISTLIST: Regenerated.
	* NEWS: Add cygwin support and change the `os-prober' entry a bit.

2008-08-16  Robert Millan  <rmh@aybabtu.com>

	* disk/raid.c (grub_raid_init): Handle/report errors set by
	grub_device_iterate().
	* disk/lvm.c (grub_lvm_init): Likewise.

2008-08-15  Bean  <bean123ch@gmail.com>

	* conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* kern/env.c (grub_env_insert): Fix a bug in prevp pointer.

	* commands/date.c: New file.

	* hook/datehook.c: Likewise.

	* include/grub/lib/datetime.h: Likewise.

	* include/grub/i386/cmos.h: Likewise.

	* lib/datetime.c: Likewise.

	* lib/i386/datetime.c: Likewise.

	* lib/efi/datetime.c: Likewise.

2008-08-14  Robert Millan  <rmh@aybabtu.com>

	* conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
	(grub_mkelfimage_SOURCES): New variable.
	(util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.

	* conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
	(grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.

	* kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
	* kern/i386/coreboot/init.c: Likewise.

	* kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
	with `<grub/cpu/kernel.h>'.
	(GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
	to ...
	(GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
	* kern/i386/coreboot/startup.S: Likewise.

	* include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
	(GRUB_MOD_GAP): Remove.
	* include/grub/powerpc/kernel.h: New file.
	* include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
	(GRUB_KERNEL_MACHINE_DATA_END): Remove.
	* include/grub/i386/kernel.h: New file.
	* include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
	(GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
	(GRUB_KERNEL_MACHINE_DATA_END): Remove.

	* util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
	`grub-mkelfimage'.
	Use --directory when invoking grub_mkimage.

	* util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
	(add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
	GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
	and GRUB_KERNEL_CPU_PREFIX.

2008-08-14  Felix Zielcke  <fzielcke@z-51.de>

	* include/grub/err.h (grub_err_printf): New function prototype.
	* util/misc.c (grub_err_printf): New function.
	* kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
	grub_printf.
	* kern/err.c (grub_print_error): Use grub_err_printf.

2008-08-13  Robert Millan  <rmh@aybabtu.com>

	* docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.

2008-08-13  Robert Millan  <rmh@aybabtu.com>

	* docs/grub.cfg: Use the native device name for the example GNU/Hurd
	boot entry.

2008-08-12  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
	of the relocation code from here ...
	(grub_multiboot): ... to here.
	(forward_relocator, backward_relocator): Move from here ...
	* kern/i386/loader.S (grub_multiboot_forward_relocator)
	(grub_multiboot_backward_relocator): ... to here.
	(grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
	magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
	* include/grub/i386/loader.h (grub_multiboot_forward_relocator)
	(grub_multiboot_forward_relocator_end)
	(grub_multiboot_backward_relocator)
	(grub_multiboot_backward_relocator_end): New variables.

2008-08-12  Bean  <bean123ch@gmail.com>

	* disk/raid.c (grub_raid_read): Fix a bug in raid0 code.

2008-08-11  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/linuxbios/startup.S: Move from here ...
	* kern/i386/coreboot/startup.S: ... to here.

	* kern/i386/linuxbios/init.c: Move from here ...
	* kern/i386/coreboot/init.c: ... to here.

	* kern/i386/linuxbios/table.c: Move from here ...
	* kern/i386/coreboot/mmap.c: ... to here.

	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.

2008-08-11  Robert Millan  <rmh@aybabtu.com>

	* kern/device.c (grub_device_open): Do not handle grub_disk_open()
	errors.  Leave it to the upper layer to handle them.

2008-08-09  Christian Franke  <franke@computer.org>

	* Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
	* conf/common.rmk: Install `grub-pe2elf' only if requested.
	Install `grub.d/10_windows' only on Cygwin.
	* configure.ac: Add subst of `target_os'.
	Check `target_os' also before setting TARGET_OBJ2ELF.
	Add `--enable-grub-pe2elf'.

2008-08-08  Robert Millan  <rmh@aybabtu.com>

	* kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
	(grub_last_time): Change type to grub_uint64_t.
	(grub_disk_open): Migrate code from to using grub_get_time_ms().
	(grub_disk_close): Likewise.

	* normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
	(run_menu): Migrate code from to using grub_get_time_ms().

	* util/misc.c (grub_get_time_ms): New function.

2008-08-08  Marco Gerards  <marco@gnu.org>

	* disk/ata.c (grub_ata_regget): Change return type to
	`grub_uint8_t'.
	(grub_ata_regget2): Likewise.
	(grub_ata_wait_status): New function.
	(grub_ata_wait_busy): Removed function, updated all users to use
	`grub_ata_wait_status'.
	(grub_ata_wait_drq): Likewise.
	(grub_ata_cmd): New function.
	(grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
	error handling.
	(grub_ata_pio_write): Add error handling.
	(grub_atapi_identify): Likewise.
	(grub_atapi_packet): Use `grub_ata_cmd' and improve error
	handling.
	(grub_ata_identify): Use `grub_ata_cmd' and improve error
	handling.  Actually use the detected registers.  Reorder the
	detection logic such that it is easier to read.
	(grub_ata_pciinit): Do not assign the same ID to each controller.
	(grub_ata_setaddress): Use `grub_ata_cmd' and improve error
	handling.
	(grub_atapi_readsector): Check the result of `grub_ata_pio_read'.

	* include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.

2008-08-08  Marco Gerards  <marco@gnu.org>

	* NEWS: Update.

2008-08-07  Bean  <bean123ch@gmail.com>

	* include/grub/x86_64/pci.h: New file.

2008-08-07  Christian Franke  <franke@computer.org>

	* kern/i386/pit.c (TIMER2_SPEAKER): New define.
	(TIMER2_GATE): Likewise.
	(grub_pit_wait): Add enable/disable of the timer2 gate
	bit of port 0x61.  This fixes a possible infinite loop.

2008-08-07  Bean  <bean123ch@gmail.com>

	* conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
	kern/i386/tsc.c and kern/i386/pit.c.

	* include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
	x86_64 platform.

	* kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
	<grub/i386/tsc.h>.

	* kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.

2008-08-07  Bean  <bean123ch@gmail.com>

	* conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,

	* include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
	multiple inclusion. Add #include <grub/types.h>.

2008-08-06  Christian Franke  <franke@computer.org>

	* conf/common.rmk: Build and install `10_windows'.
	* util/grub.d/10_windows.in: New script.

2008-08-06  Pavel Roskin  <proski@gnu.org>

	* kern/i386/pit.c: Include `<grub/i386/pit.h>'.

2008-08-06  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
	* kern/i386/tsc.c: Include `<grub/i386/pit.h>'.

2008-08-06  Bean  <bean123ch@gmail.com>

	* fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
	(grub_pxefs_fs_int): Remove dummy definition.
	(grub_pxefs_open): Use data->block_size to store the current block
	size setting.
	(grub_pxefs_read): Use block size stored in data->block_size. As the
	value of grub_pxe_blksize can be changed after the file is opened.

2008-08-06  Bean  <bean123ch@gmail.com>

	* fs/i386/pc/pxe.c (curr_file): new variable.
	(grub_pxefs_open): Simply the handling of pxe file system. Don't
	require the dummy internal file system anymore.
	(grub_pxefs_read): Removed.
	(grub_pxefs_close): Likewise.
	(grub_pxefs_fs_int): Likewise.
	(grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
	connection when we switch file.
	(grub_pxefs_close_int): Renamed to grub_pxefs_close.

2008-08-06  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
	`halt.mod'.
	(reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
	(halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.

	* kern/i386/halt.c: New file.
	* kern/i386/reboot.c: Likewise.
	* include/grub/i386/reboot.h: Likewise.
	* include/grub/i386/halt.h: Likewise.

	* commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
	Include `<grub/cpu/halt.h>'.
	* commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
	[! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.

	* term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
	(SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
	(KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
	(KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
	(KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
	(KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
	from here ...
	* include/grub/i386/at_keyboard.h: ... to here.

2008-08-05  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
	* conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
	`kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
	`kern/generic/millisleep.c'.

	* kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
	instead of grub_get_rtc().
	(grub_tsc_init): Initialize `tsc_boot_time'.

	* kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
	(grub_machine_init): Use grub_tsc_init() rather than
	installing an RTC-based handler via grub_install_get_time_ms().

	* kern/i386/pit.c: New file.
	* include/grub/i386/pit.h: Likewise.

2008-08-05  Bean  <bean123ch@gmail.com>

	* boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.

	* conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
	(pkglib_MODULES): Add pxe.mod and pxecmd.mod.
	(pxe_mod_SOURCES): New macro.
	(pxe_mod_CFLAGS): Likewise.
	(pxe_mod_LDFLAGS): Likewise.
	(pxecmd_mod_SOURCES): Likewise.
	(pxecmd_mod_CFLAGS): Likewise.
	(pxecmd_mod_LDFLAGS): Likewise.

	* kern/i386/pc/startup.S (grub_pxe_scan): New function.
	(grub_pxe_call): Likewise.

	* include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.

	* commands/i386/pc/pxecmd.c: New file.

	* fs/i386/pc/pxe.c: Likewise.

	* include/grub/i386/pc/pxe.h: Likewise.

2008-08-05  Bean  <bean123ch@gmail.com>

	* util/console.c (grub_console_cur_color): New variable.
	(grub_console_standard_color): Likewise.
	(grub_console_normal_color): Likewise.
	(grub_console_highlight_color): Likewise.
	(color_map): Likewise.
	(use_color): Likewise.
	(NUM_COLORS): New macro.
	(grub_ncurses_setcolorstate): Handle color properly.
	(grub_ncurses_setcolor): Don't change color here, just remember the
	settings, color will be set in grub_ncurses_setcolorstate.
	(grub_ncurses_getcolor): New function.
	(grub_ncurses_init): Initialize color pairs.
	(grub_ncurses_term): New member grub_ncurses_getcolor.

2008-08-05  Colin D Bennett  <colin@gibibit.com>

	High resolution timer support.  Implemented for x86 CPUs using TSC.
	Extracted generic grub_millisleep() so it's linked in only as needed.
	This requires a Pentium compatible CPU; if the RDTSC instruction is
	not supported, then it falls back on the generic grub_get_time_ms()
	implementation that uses the machine's RTC.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
	`kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
	`kern/generic/millisleep.c'.

	* conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
	`kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.

	* conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
	`kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.

	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
	`kern/generic/millisleep.c'.

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.

	* kern/generic/rtc_get_time_ms.c: New file.

	* kern/generic/millisleep.c: New file.

	* kern/misc.c: Don't include
	<kern/time.h> anymore.
	(grub_millisleep_generic): Removed.

	* commands/sleep.c (grub_interruptible_millisleep): Uses
	grub_get_time_ms() instead of grub_get_rtc().

	* include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
	function.
	(grub_cpu_is_cpuid_supported): New inline function.
	(grub_cpu_is_tsc_supported): New inline function.
	(grub_tsc_init): New function prototype.
	(grub_tsc_get_time_ms): New function prototype.

	* kern/i386/tsc.c (grub_get_time_ms): New file.

	* include/grub/time.h: Include <grub/types.h.
	(grub_millisleep_generic): Removed.
	(grub_get_time_ms): New prototype.
	(grub_install_get_time_ms): New prototype.
	(grub_rtc_get_time_ms): New prototype.

	* kern/time.c (grub_get_time_ms): New function.
	(grub_install_get_time_ms): New function.

	* kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
	<grub/time.h> anymore.
	(grub_millisleep): Removed.
	(grub_machine_init): Call grub_tsc_init.

	* kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
	get_time_ms() implementation.

	* kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
	(ieee1275_get_time_ms): New function.
	(grub_machine_init): Install get_time_ms() implementation.

	* kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
	(grub_machine_init): Call grub_tsc_init().
	(grub_millisleep): Removed.

	* kern/ieee1275/init.c (grub_millisleep): Removed.
	(grub_machine_init): Install ieee1275_get_time_ms()
	implementation.
	(ieee1275_get_time_ms): New function.
	(grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
	real work.

2008-08-05  Marco Gerards  <marco@gnu.org>

	* disk/ata.c: Include <grub/pci.h>.
	(enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
	(grub_ata_initialize): Rewritten.
	(grub_ata_device_initialize): New function.

2008-08-04  Pavel Roskin  <proski@gnu.org>

	* kern/main.c: Include grub/mm.h.

2008-08-04  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
	(COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
	corruption problem).

2008-08-04  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
	warnings introduced in my last commit.

2008-08-03  Robert Millan  <rmh@aybabtu.com>

	Make PCI available on all i386 architectures.

	* include/grub/i386/pc/pci.h: Move from here ...
	* include/grub/i386/pci.h: ... to here.

	* include/grub/i386/pc/pci.h: Remove.
	* include/grub/i386/efi/pci.h: Remove.
	* include/grub/x86_64/efi/pci.h: Remove.

	* include/grub/pci.h: Replace `<grub/machine/pci.h>' with
	`<grub/cpu/pci.h>'.

	* conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
	(pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
	(lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.

	* conf/i386-ieee1275.rmk: Likewise.

2008-08-03  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
	(grub_console_setcursor): Make it possible to set cursor off.

2008-08-03  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
	of modules instead of assuming which platform provides what.
	* util/update-grub.in: Likewise.

2008-08-03  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
	instead of `grub_install_dos_part' to determine whether a drive needs
	to be prepended to prefix (`grub_install_dos_part' is not reliable,
	because it can be overridden when loading GRUB via Multiboot).

2008-08-02  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-install.in: Remove trailing slash from prefix.

2008-08-02  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
	of informational grub_dprintf() calls.

2008-08-02  Robert Millan  <rmh@aybabtu.com>

	* disk/memdisk.c (memdisk_size): Don't initialize.
	(GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().

	* include/grub/i386/pc/kernel.h
	(GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
	(GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
	(grub_memdisk_image_size, grub_arch_memdisk_addr)
	(grub_arch_memdisk_size): Remove.

	* include/grub/kernel.h (struct grub_module_header): Remove `offset'
	field (was only used to transfer a constant).  Add `type' field to
	support multiple module types.
	(grub_module_iterate): New function.

	* kern/device.c (grub_device_open): Do not hide error messages
	when grub_disk_open() fails.  Use grub_print_error() instead.

	* kern/i386/pc/init.c (grub_arch_modules_addr)
	(grub_arch_memdisk_size): Remove functions.
	(grub_arch_modules_addr): Return the module address in high memory
	(now that it isn't copied anymore).

	* kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
	(codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
	decompression routine (grub_total_module_size already includes that
	now).  Don't copy modules back to low memory.

	* kern/main.c: Include `<grub/mm.h>'.
	(grub_load_modules): Split out (and use) ...
	(grub_module_iterate): ... this function, which iterates through
	module objects and runs a hook.
	Comment out grub_mm_init_region() call, as it would cause non-ELF
	modules to be overwritten.

	* util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
	the memdisk image in its own region, make it part of the module list.
	* util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
	(main): Parse --memdisk|-m option, and pass user-provided path as
	parameter to generate_image().
	(add_segments): Pass `memdisk_path' down to load_modules().
	(load_modules): Embed memdisk image in module section when requested.
	* util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
	`header.type' instead of `header.offset'.

	* conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
	(memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
	(memdisk_mod_LDFLAGS): New variables.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.

2008-08-02  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (playground, forward_relocator)
	(backward_relocator): New variables.  Used to allocate and relocate
	the payload, respectively.
	(grub_multiboot_load_elf32): Load into heap instead of requested
	address, install the appropriate relocator code in each bound of
	the payload, and set the entry point such that
	grub_multiboot_real_boot() will jump to one of them.

	* kern/i386/loader.S (grub_multiboot_payload_size)
	(grub_multiboot_payload_orig, grub_multiboot_payload_dest)
	(grub_multiboot_payload_entry_offset): New variables.
	(grub_multiboot_real_boot): Set cpu context to what the relocator
	expects, and jump to the relocator instead of the payload.

	* include/grub/i386/loader.h (grub_multiboot_payload_size)
	(grub_multiboot_payload_orig, grub_multiboot_payload_dest)
	(grub_multiboot_payload_entry_offset): Export.

2008-08-01  Bean  <bean123ch@gmail.com>

	* normal/menu_entry.c (editor_getline): Don't return the original
	string as result, as it will be released by lexer once it has done
	using it.

2008-08-01  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
	within menuentries, not before them.
	util/grub.d/10_hurd.in: Likewise.

2008-08-01  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkglib_MODULES): Add bufio.mod.
	(bufio_mod_SOURCES): New macro.
	(bufio_mod_CFLAGS): Likewise.
	(bufio_mod_LDFLAGS): Likewise.

	* include/grub/bufio.h: New file.

	* io/bufio.c: Likewise.

	* video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
	(grub_video_reader_png): Use grub_buffile_open to open file.

	* video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
	(grub_video_reader_jpeg): Use grub_buffile_open to open file.

	* video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
	(grub_video_reader_tga): Use grub_buffile_open to open file.

	* font/manager.c: Include <grub/bufio.h>.
	(add_font): Use grub_buffile_open to open file.

2008-07-31  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
	ELF segments, use a macro for arbitrarily accessing any of them instead
	of preparing a pointer that allows access to one at a time.
	(grub_multiboot_load_elf64): Likewise.

2008-07-31  Bean  <bean123ch@gmail.com>

	* boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
	GRUB_KERNEL_MACHINE_DATA_END.

2008-07-30  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
	Increase from 0x50 to 0x60.
	* util/i386/pc/grub-install.in: Detect cross-disk installs, and
	use UUIDs to identify the root drive for them.  If that's not
	possible, abort.
	* util/i386/pc/grub-setup.c (setup): Do not special-case, or even
	check, for cross-disk installs.

2008-07-30  Robert Millan  <rmh@aybabtu.com>

	* kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
	is non-empty, use it to set the `prefix' environment variable instead
	of the usual approach.
	* kern/i386/linuxbios/init.c (make_install_device): Remove function.
	(grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
	environment variable instead of dummy make_install_device().

	* kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
	(start): Insert a data section, with `grub_prefix' variable.
	* kern/i386/linuxbios/startup.S: Likewise.

	* include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
	New variable reference.
	* include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
	New macro.  Defines offset of `grub_prefix' within startup.S (relative
	to `start').
	(GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
	section within startup.S (relative to `start').
	* include/grub/i386/coreboot/kernel.h: Likewise.

	* util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
	Overwrite grub_prefix with its contents, at the beginning of the
	first segment.
	(main): Understand -p|--prefix.

2008-07-30  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.

2008-07-30  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/vga_text.c (grub_console_cls): Use
	grub_console_gotoxy() to go back to beginning of the screen.
	Found by Patrick Georgi <patrick.georgi@coresystems.de>

2008-07-29  Christian Franke  <franke@computer.org>

	* util/update-grub_lib.in (make_system_path_relative_to_its_root):
	Add conversion of emulated mount points on Cygwin.

2008-07-29  Christian Franke  <franke@computer.org>

	* util/update-grub.in: Add a check for admin
	group on Cygwin.
	Remove old `grub.cfg.new' before creation.
	Add `-f' to `mv' to handle the different filesystem
	semantics of Windows.

2008-07-29  Bean  <bean123ch@gmail.com>

	* normal/main.c (get_line): Fix buffer overflow bug.

2008-07-28  Robert Millan  <rmh@aybabtu.com>

	* partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
	(struct grub_apple_header): New struct.  Describes the layout of
	the partmap header.
	(apple_partition_map_iterate): Check the header magic as well as the
	partition magic (which was already being checked).

2008-07-28  Pavel Roskin  <proski@gnu.org>

	* genmk.rb: Add a warning to the beginning of the output that
	it's a generated file and should not be edited.

2008-07-28  Robert Millan  <rmh@aybabtu.com>

	* disk/raid.c (grub_raid_scan_device): Do not abort when two disks
	with the same number are found, just use issue a warning with
	grub_dprintf(), as this error has been reported to be non-fatal.

2008-07-27  Robert Millan  <rmh@aybabtu.com>

	* disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
	information.

2008-07-27  Bean  <bean123ch@gmail.com>

	* fs/fat.c (GRUB_FAT_MAXFILE): New constant.
	(grub_fat_find_dir): Ignore case when comparing filename.

2008-07-27  Bean  <bean123ch@gmail.com>

	* fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
	smallino, as it's more descriptive, and i8count can be confused with
	the other field count.
	(grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
	inode type.

2008-07-27  Bean  <bean123ch@gmail.com>

	* commands/crc.c: New file.

	* lib/crc.c: Likewise.

	* include/grub/lib/crc.h: Likewise.

	* util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.

	* commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
	(hexdump): Move this function to ...

	* lib/hexdump.c: ... here.

	* include/grub/hexdump.h: Renamed to ...

	* include/grub/lib/hexdump.h: ... this.

	* commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h

	* util/grub-editenv.c: Likewise.

	* include/envblk.h: Renamed to ...

	* include/lib/envblk.h: ... this.

	* util/envblk.c: Renamed to ...

	* lib/envblk.c: ... this.

	* conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
	lib/hexdump.c.
	(grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
	(pkglib_MODULES): Add crc.mod.
	(hexdump_mod_SOURCES): Add lib/hexdump.c.
	(loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
	(crc_mod_SOURCES): New macro.
	(crc_mod_CFLAGS): Likewise.
	(crc_mod_LDFLAGS): Likewise.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.

2008-07-27  Felix Zielcke  <fzielcke@z-51.de>

	* commands/help.c: Include <grub/term.h>.
	(TERM_WIDTH): Removed.  Updated all users.

2008-07-27  Pavel Roskin  <proski@gnu.org>

	* util/getroot.c (find_root_device): Rephrase a comment to avoid
	spurious warnings about a comment within a comment.

2008-07-25  Robert Millan  <rmh@aybabtu.com>

	* util/getroot.c (find_root_device): Skip devices that match
	/dev/dm-[0-9].  This lets the real device be found for any type of
	abstraction (LVM, EVMS, RAID..).
	(grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
	and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
	device is found first, find_root_device() will now skip it.

2008-07-24  Pavel Roskin  <proski@gnu.org>

	* include/grub/types.h: Use __builtin_bswap32() and
	__builtin_bswap64() with gcc 4.3 and newer.

2008-07-24  Christian Franke  <franke@computer.org>

	* util/i386/pc/grub-install.in: If `--debug' is specified,
	pass `--verbose' to grub-setup.
	Abort script if make_system_path_relative_to_its_root() fails.

2008-07-24  Bean  <bean123ch@gmail.com>

	* configure.ac: Fixed a bug caused by the previous cygwin patch,
	variable `target_platform' should be `platform'.

2008-07-24  Bean  <bean123ch@gmail.com>

	* video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
	(grub_png_init_fixed_block): New function.
	(grub_png_decode_image_data): Handle fixed huffman code compression.

2008-07-24  Bean  <bean123ch@gmail.com>

	* common.rmk (bin_UTILITIES): Add grub-pe2elf.
	(grub_pe2elf_SOURCES): New macro.
	(CLEANFILES): Add grub-pe2elf.

	* include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
	(GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
	(GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
	(GRUB_PE32_SCN_ALIGN_MASK): Likewise.
	(GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
	(GRUB_PE32_SYM_CLASS_STATIC): Likewise.
	(GRUB_PE32_SYM_CLASS_FILE): Likewise.
	(GRUB_PE32_DT_FUNCTION): Likewise.
	(GRUB_PE32_REL_I386_DIR32): Likewise.
	(GRUB_PE32_REL_I386_REL32): Likewise.
	(grub_pe32_symbol): New structure.
	(grub_pe32_reloc): Likewise.

	* util/grub-pe2elf.c: New file.

	* configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
	start symbol in non pc platform.

	* genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.

	The following patches are from Christian Franke.

	* include/grub/dl.h: Remove .previous, gas supports this only
	for ELF format.

	* include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
	Remove .type, gas supports this only for ELF format.

	* kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
	nullbytes in symbol table. This fixes an infinite loop if table is
	zero filled.

	* Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
	TARGET_IMG_LDFLAGS and EXEEXT.

	* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
	TARGET_IMG_LDFLAGS_AC.
	(grub_CHECK_STACK_ARG_PROBE): New function.

	* conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.

	* conf/i386-pc-cygwin-ld-img.sc: New linker script.

	* configure.ac: Add check for linker script "conf/${target}-img-ld.c"
	to set TARGET_IMG_LD* accordingly.
	Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
	Add call to grub_CHECK_STACK_ARG_PROBE.
	Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.

	* genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.

	* genmk.rb: Add EXEEXT to CLEANFILES.

2008-07-23  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
	define the codes for arrows and lines used for the menu).
	(ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
	as well.

	* util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
	fonts, because the latter are too slow.

2008-07-21  Bean  <bean123ch@gmail.com>

	* kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
	a20. Run keyboard test last, as it will cause macbook to halt.

2008-07-18  Pavel Roskin  <proski@gnu.org>

	* kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
	load foreign architecture modules correctly anyway.  Keep
	support for loading host architecture modules, whether we
	compile them or not.

2008-07-17  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Use -m32 or -m64 regardless of whether we had to
	change target_cpu.  The compiler default can mismatch target_cpu
	in any case.

	* disk/efi/efidisk.c: Fix format warnings on x86_64.
	* kern/efi/efi.c: Likewise.

	* aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
	target compiler is functional.
	* configure.ac: Call grub_PROG_TARGET_CC once all target flags
	are set up.

	* configure.ac: Default to efi platform for x86_64-apple.  Allow
	powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
	adjustments from the rest, only do them if target is not
	explicitly given.  Merge other adjustments with the final sanity
	check.  Remove an extraneous check for supported CPU.  Be
	specific which CPU and which platform is not supported.

	* configure.ac: Default to pc platform for x86_64.

2008-07-17  Robert Millan  <rmh@aybabtu.com>

	Partial LinuxBIOS -> Coreboot rename.

	* conf/i386-linuxbios.rmk: Renamed to ...
	* conf/i386-coreboot.rmk: ... this.
	* Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
	* configure.ac: Accept "coreboot" as input platform (but maintain
	compatibility with "linuxbios").
	* include/grub/i386/linuxbios: Renamed to ...
	* include/grub/i386/coreboot: ... this.

2008-07-17  Bean  <bean123ch@gmail.com>

	* conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
	(appleldr_mod_SOURCE): New variable.
	(appleldr_mod_CFLAGS): Likewise.
	(appleldr_mod_LDFLAGS): Likewise.
	(pci_mod_SOURCES): Likewise.
	(pci_mod_CFLAGS): Likewise.
	(pci_mod_LDFLAGS): Likewise.
	(lspci_mod_SOURCES): Likewise.
	(lspci_mod_CFLAGS): Likewise.
	(lspci_mod_LDFLAGS): Likewise.

	* conf/x86_64-efi.rmk: New file.

	* disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
	macro.
	(grub_efidisk_write): Likewise.

	* include/efi/api.h (efi_call_0): New macro.
	(efi_call_1): Likewise.
	(efi_call_2): Likewise.
	(efi_call_3): Likewise.
	(efi_call_4): Likewise.
	(efi_call_5): Likewise.
	(efi_call_6): Likewise.

	* include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
	grub_rescue_cmd_chainloader.

	* include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
	(grub_pe32_optional_header): Change some fields based on i386 or
	x86_64 platform.
	(GRUB_PE32_PE32_MAGIC): Likewise.

	* include/grub/efi/uga_draw.h: New file.

	* include/grub/elf.h (STN_ABS): New constant.
	(R_X86_64_NONE): Relocation constant for x86_64.
	(R_X86_64_64): Likewise.
	(R_X86_64_PC32): Likewise.
	(R_X86_64_GOT32): Likewise.
	(R_X86_64_PLT32): Likewise.
	(R_X86_64_COPY): Likewise.
	(R_X86_64_GLOB_DAT): Likewise.
	(R_X86_64_JUMP_SLOT): Likewise.
	(R_X86_64_RELATIVE): Likewise.
	(R_X86_64_GOTPCREL): Likewise.
	(R_X86_64_32): Likewise.
	(R_X86_64_32S): Likewise.
	(R_X86_64_16): Likewise.
	(R_X86_64_PC16): Likewise.
	(R_X86_64_8): Likewise.
	(R_X86_64_PC8): Likewise.

	* include/grub/i386/efi/pci.h: New file.

	* include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
	Change it value based on platform.
	(GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
	(GRUB_E820_RAM): Likewise.
	(GRUB_E820_RESERVED): Likewise.
	(GRUB_E820_ACPI): Likewise.
	(GRUB_E820_NVS): Likewise.
	(GRUB_E820_EXEC_CODE): Likewise.
	(GRUB_E820_MAX_ENTRY): Likewise.
	(grub_e820_mmap): New structure.
	(linux_kernel_header): Change the efi field according to different
	kernel version, also field from linux_kernel_header.

	* include/grub/kernel.h (grub_module_info): Add padding for x86_64.

	* include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
	(GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
	(GRUB_PCI_ADDR_SPACE_IO): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
	(GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
	(GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
	(GRUB_PCI_ADDR_MEM_MASK): Likewise.
	(GRUB_PCI_ADDR_IO_MASK): Likewise.

	* include/grub/x86_64/efi/kernel.h: New file.

	* include/grub/x86_64/efi/loader.h: Likewise.

	* include/grub/x86_64/efi/machine.h: Likewise.

	* include/grub/x86_64/efi/pci.h: Likewise.

	* include/grub/x86_64/efi/time.h: Likewise.

	* include/grub/x86_64/linux.h: Likewise.

	* include/grub/x86_64/setjmp.h: Likewise.

	* include/grub/x86_64/time.h: Likewise.

	* include/grub/x86_64/types.h: Likewise.

	* kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
	 GRUB_TARGET_SIZEOF_VOID_P.

	* kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
	(grub_efi_locate_handle): Likewise.
	(grub_efi_open_protocol): Likewise.
	(grub_efi_set_text_mode): Likewise.
	(grub_efi_stall): Likewise.
	(grub_exit): Likewise.
	(grub_reboot): Likewise.
	(grub_halt): Likewise.
	(grub_efi_exit_boot_services): Likewise.
	(grub_get_rtc): Likewise.

	* kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
	(GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
	(grub_efi_allocate_pages): Wrap efi calls.
	(grub_efi_free_pages): Wrap efi calls.
	(grub_efi_get_memory_map): Wrap efi calls.

	* kern/x86_64/dl.c: New file.

	* kern/x86_64/efi/callwrap.S: Likewise.

	* kern/x86_64/efi/startup.S: Likewise.

	* loader/efi/appleloader.c: Likewise.

	* loader/efi/chainloader.c (cmdline): New variable.
	(grub_chainloader_unload): Wrap efi calls.
	(grub_chainloader_boot): Likewise.
	(grub_rescue_cmd_chainloader): Wrap efi calls, handle
	command line.

	* loader/efi/chainloader_normal.c (chainloader_command):
	Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
	command line.

	* loader/i386/efi/linux.c (allocate_pages): Change allocation
	method.
	(grub_e820_add_region): New function.
	(grub_linux_boot): Construct e820 map from efi map, handle x86_64
	booting.
	(grub_find_video_card): New function.
	(grub_linux_setup_video): New function.
	(grub_rescue_cmd_linux): Probe for video information.

	* normal/x86_64/setjmp.S: New file.

	* term/efi/console.c (map_char): New function.
	(grub_console_putchar): Map unicode char.
	(grub_console_checkkey): Wrap efi calls.
	(grub_console_getkey): Likewise.
	(grub_console_getwh): Likewise.
	(grub_console_gotoxy): Likewise.
	(grub_console_cls): Likewise.
	(grub_console_setcolorstate): Likewise.
	(grub_console_setcursor): Likewise.

	* util/i386/efi/grub-mkimage.c: Add support for x86_64.

2008-07-16  Pavel Roskin  <proski@gnu.org>

	* loader/i386/efi/linux.c (allocate_pages): Fix warnings in
	format strings.

	* util/i386/efi/grub-mkimage.c (get_target_address): Return a
	pointer, not an integer.  This fixes a warning and prevents
	precision loss on 64-bit systems.
	(relocate_addresses): Remove unneeded cast.

2008-07-15  Pavel Roskin  <proski@gnu.org>

	* kern/i386/ieee1275/init.c: Include grub/cache.h.

	* term/ieee1275/ofconsole.c: Disable code unused on i386.

	* kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
	Fix comparison between signed and unsigned.

	* include/grub/i386/ieee1275/console.h: Declare
	grub_console_init() and grub_console_fini().

	* loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
	It's empty and unused.

	* fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
	beginning to avoid warnings with some compilers.

	* loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
	[__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.

2008-07-14  Pavel Roskin  <proski@gnu.org>

	* kern/env.c (grub_register_variable_hook): Don't copy empty
	string, it leaks memory.  Pass "" to grub_env_set(), it should
	handle constant strings.

	* commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
	* commands/cmp.c (grub_cmd_cmp): Likewise.
	* kern/dl.c (grub_dl_flush_cache): Likewise.
	(grub_dl_load_core): Likewise.
	* kern/elf.c (grub_elf32_load_phdrs): Likewise.
	(grub_elf64_load_phdrs): Likewise.

2008-07-13  Pavel Roskin  <proski@gnu.org>

	* lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
	between signed and unsigned.
	(LzmaEnc_Finish): Fix warning about an unused parameter.

2008-07-13  Bean  <bean123ch@gmail.com>

	* Makefile.in (enable_lzo): New rule.

	* conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.

	* configure.ac (ENABLE_LZO): New option --enable-lzo.

	* boot/i386/pc/lnxboot.S: #include <config.h>.

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
	its value according to the compression algorithm used, lzo or lzma.

	* util/i386/pc/grub-mkimage.c (compress_kernel): Use different
	compression algorithm according to configure macro.

	* kern/i386/pc/startup.S (codestart): Likewise.

	* kern/i386/pc/lzma_decode.S: New file.

	* include/grub/lib/LzFind.h: Likewise.

	* include/grub/lib/LzHash.h: Likewise.

	* include/grub/lib/LzmaDec.h: Likewise.

	* include/grub/lib/LzmaEnc.h: Likewise.

	* include/grub/lib/LzmaTypes.h: Likewise.

	* lib/LzFind.c: Likewise.

	* lib/LzmaDec.c: Likewise.

	* lib/LzmaEnc.c: Likewise.

2008-07-13  Bean  <bean123ch@gmail.com>

	* fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
	(grub_ext4_extent_header): New structure.
	(grub_ext4_extent): Likewise.
	(grub_ext4_extent_idx): Likewise.
	(grub_ext4_find_leaf): New function.
	(grub_ext2_read_block): Handle extents.

2008-07-12  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.

2008-07-11  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/40_custom.in: New file. Example on how to add custom
	entries to /etc/grub.d.
	* conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
	40_custom (implicitly, by merging all the grub.d rules).

2008-07-11  Pavel Roskin  <proski@gnu.org>

	* commands/read.c (grub_getline): Fix invalid memory access.
	Don't add newline to the variable value.

	* term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
	[!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
	(serial_hw_get_port): Check validity of the port number.
	(grub_cmd_serial): Check return value of serial_hw_get_port().

2008-07-07  Pavel Roskin  <proski@gnu.org>

	* boot/i386/pc/diskboot.S (notification_string): Replace
	"Loading kernel" with just "loading".  This is shorter, less
	confusing and saves a few bytes for possible future changes.

2008-07-05  Pavel Roskin  <proski@gnu.org>

	* disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
	size for ATAPI devices, they are undefined.  Output sector
	number in decimal form.

	* disk/ata.c: Use named constants for status bits.

2008-07-04  Pavel Roskin  <proski@gnu.org>

	* kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
	grub_addr_t before casting it to the void pointer to fix a
	warning.  Non-addressable regions are discarded earlier.
	(grub_arch_modules_addr): Cast _end to grub_addr_t.
	* kern/i386/linuxbios/table.c: Include grub/misc.h.
	(check_signature): Don't shadow table_header.
	(grub_linuxbios_table_iterate): Cast numeric constants to
	grub_linuxbios_table_header_t.
	* include/grub/i386/linuxbios/init.h: Add noreturn attribute to
	grub_stop().

	* kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
	prevent warnings.

	* include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
	pointer, which can cause warnings.  Support 64-bit addresses.

	* util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
	of sizeof(long).  This fixes PowerPC image generation on x86_64.

2008-07-04  Robert Millan  <rmh@aybabtu.com>

	This fixes a performance issue when pc & gpt partmap iterators
	didn't abort iteration even after our hook found what it was
	looking for (often causing expensive probes of non-existent drives).

	Some callers relied on previous buggy behaviour, since they would
	raise an error when their own hooks caused early abortion of its
	iteration.

	* kern/device.c (grub_device_open): Improve error message.
	* disk/lvm.c (grub_lvm_open): Likewise.
	* disk/raid.c (grub_raid_open): Likewise.

	* partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
	when hook requests it, independently of grub_errno.
	(pc_partition_map_probe): Do not fail when find_func() caused
	early abortion of pc_partition_map_iterate().

	* partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
	when hook requests it, independently of grub_errno.
	(gpt_partition_map_probe): Do not fail when find_func() caused
	early abortion of gpt_partition_map_iterate().

	* kern/partition.c (grub_partition_iterate): Abort parent iteration
	when hook requests it, independently of grub_errno.  Do not fail when
	part_map_iterate_hook() caused early abortion of p->iterate().

	* util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
	when grub_partition_iterate() returned with non-zero.

2008-07-03  Pavel Roskin  <proski@gnu.org>

	* disk/ata.c (grub_ata_pio_write): Check status before writing,
	like we do in grub_ata_pio_read().
	(grub_ata_readwrite): Always write individual sectors.  Fix the
	sector count for the remainder.
	(grub_ata_write): Enable writing to ATA devices.  Correctly
	report error for ATAPI devices.

2008-07-02  Pavel Roskin  <proski@gnu.org>

	* boot/i386/pc/cdboot.S: Add _start entry to fix a linker
	warning.

	* disk/ata.c (grub_ata_readwrite): Don't increment sector number
	for every read sector, we already increment it for the whole
	batch.  This fixes reading more than 256 sectors at once.

	* util/grub-editenv.c (cmd_info): Cast argument to long
	explicitly.  ptrdiff_t reduces to int on i386.

	* util/grub-editenv.c (main): Be specific which parameter is
	missing.

	* disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
	(memdisk): Make memdisk_orig_addr a pointer.

	* fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
	for file offsets, use grub_off_t instead.  Fix printf format
	warnings.

	* fs/reiserfs.c: Remove #warning, TODO list items don't belong
	there.  Real unexpected warnings should not drown in the noise
	about known problems.

	* commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
	grub_disk_addr_t for memory addresses.

	* loader/aout.c (grub_aout_load): Cast load_addr to pointer
	explicitly to fix a warning.

	* util/grub-editenv.c (cmd_info): Fix warning in printf format.

	* Makefile.in (MODULE_LDFLAGS): New variable.
	* aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
	the linker accepts --build-id=none.
	* configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
	MODULE_LDFLAGS.
	* genmk.rb: Use MODULE_LDFLAGS when linking modules.

	* fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
	those in Linux XFS code.  Provide a way to access 64-bit parent
	inode.
	(grub_xfs_iterate_dir): Use the new names.  Avoid reading past
	the end of struct grub_xfs_dir_header.

2008-07-02  Bean  <bean123ch@gmail.com>

	* include/grub/ieee1275.h (grub_ieee1275_flag): New constant
	GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
	and GRUB_IEEE1275_FLAG_NO_ANSI.

	* kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
	GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
	and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.

	* kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
	immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.

	* kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
	GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.

	* term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
	esc sequence on non ANSI terminal.
	(grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.

	* util/elf/grub-mkimage.c (add_segments): Move ELF header to the
	beginning of file.

2008-07-02  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (bin_UTILITIES): Add grub-editenv.
	(grub_editenv_SOURCES): New variable.
	(pkglib_MODULES): Add loadenv.mod.
	(loadenv_mod_SOURCES): New variable.
	(loadenv_mod_CFLAGS): Likewise.
	(loadenv_mod_LDFLAGS): Likewise.

	* include/grub/envblk.h: New file.

	* util/envblk.c: New file.

	* util/grub-editenv.c: New file.

	* commands/loadenv.c: New file.

2008-07-01  Pavel Roskin  <proski@gnu.org>

	* include/multiboot2.h (struct multiboot_tag_module): Use char,
	not unsigned char.  This fixes warnings and is consistent with
	other tags.

	* disk/fs_uuid.c (search_fs_uuid): Correctly increment count.

	* normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.

	* term/tparm.c (analyze): Always set *popcount.

	* loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
	cast to fix a warning.

	* loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
	cast to suppress a warning.

	* fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
	grub_fshelp_read_file() expects.

	* fs/fat.c: Fix UUID calculation on big-endian systems.  We
	write uuid as a 32-bit value in CPU byte order, so declare and
	use it as such.

	* disk/raid.c: Cast grub_dprintf() arguments to unsigned long
	long if the format specifier expects it.
	* partmap/gpt.c (gpt_partition_map_iterate): Likewise.
	* partmap/pc.c (pc_partition_map_iterate): Likewise.
	* fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
	long to fix a warning.
	* fs/reiserfs.c (grub_reiserfs_read): Change casts in
	grub_dprintf() arguments to fix warnings.

2008-06-30  Pavel Roskin  <proski@gnu.org>

	* util/i386/pc/grub-setup.c (setup): Write install_dos_part and
	install_bsd_part immediately before core.img is embedded or
	modified on disk.  This fixes core.img verification if core.img
	cannot be embedded.

	* util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
	core_path to calculate the blocklist.
	Patch from Javier Martín <lordhabbit@gmail.com>

2008-06-29  Robert Millan  <rmh@aybabtu.com>

	* fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
	block to disk block.
	(grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
	Patch from Niels Böhm <bitbucket@arcor.de>

2008-06-29  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (font_path): Search for fonts in
	/boot/grub first, which is more likely to be readable (we aren't
	deciding where fonts live, just looking for them).

2008-06-26  Pavel Roskin  <proski@gnu.org>

	* util/biosdisk.c (read_device_map): Don't leave dead map
	entries for devices failing stat() check.

	* util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
	core_path_dev for the core.img path on the target device.

2008-06-26  Robert Millan  <rmh@aybabtu.com>

	* disk/fs_uuid.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
	(fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
	(fs_uuid_mod_LDFLAGS): New variables.
	* include/grub/disk.h (grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_UUID_ID'.
	* kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
	implement iterate().

2008-06-26  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
	"/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
	Linux image includes no initrd.

2008-06-21  Javier Martín  <lordhabbit@gmail.com>

	* util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
	call to resolve the core image location that effectively appended the
	name twice.

2008-06-21  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
	call from here ...

	* util/grub.d/10_hurd.in: ... to here ...
	* util/grub.d/10_linux.in: ... and here.

2008-06-19  Robert Millan  <rmh@aybabtu.com>

	* kern/main.c (grub_main): Export `prefix' variable immediately
	after it has been set by grub_machine_set_prefix().

2008-06-19  Robert Millan  <rmh@aybabtu.com>

	* commands/search.c (search_label, search_fs_uuid, search_file): Print
	search result when not saving to variable, not the other way around.
	When saving to variable, abort iteration as soon as a match is found.

2008-06-19  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (prepare_grub_to_access_device): Remove
	check for partition that provides /boot/grub.  Its logic is flawed,
	as it prevents prepare_grub_to_access_device() from being called
	multiple times.

2008-06-19  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (prepare_grub_to_access_device): Issue
	"insmod" command directly when abstraction modules are needed,
	instead of relying on GRUB_PRELOAD_MODULES (which had no effect
	since it had already been processed).

2008-06-19  Pavel Roskin  <proski@gnu.org>

	* conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
	changed.  This is needed in case GRUB_LIBDIR changes.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.

2008-06-18  Pavel Roskin  <proski@gnu.org>

	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
	kernel_elf_symlist.c to symlist.c for consistency with other
	architectures.  Update all users.
	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.

2008-06-18  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
	it in prefix.

	* util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
	`must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
	a RAID device, run setup() for all members independently on whether
	LVM abstraction is being used.
	(setup): Don't handle prefix at all; let grub-mkimage take care of it.
	If grub-mkimage has set `*install_dos_part == -2', don't override this
	value.
	Perform *install_dos_part adjustments independently on whether
	we're embedding or not.
	Clarify error message when image is too big for embedding.
	Remove duplicate *install_dos_part stanza.

2008-06-17  Robert Millan  <rmh@aybabtu.com>

	* term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
	(grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
	variables.
	(grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
	values in grub_ofconsole_normal_color and
	grub_ofconsole_highlight_color (they're not directly related to
	background and foreground).
	(grub_ofconsole_setcolorstate): Extract background and foreground
	from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.

2008-06-17  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (prepare_grub_to_access_device): Use
	/boot/grub for the check in last commit, not /boot (they could be
	different partitions).

2008-06-16  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (prepare_grub_to_access_device): If we were
	asked to setup access for the same partition that provides /boot,
	don't bother using UUIDs since our root already has the value we
	want.

2008-06-16  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (convert_system_partition_to_system_disk): Detect
	I2O devices.
	Patch from Sven Mueller <sven@debian.org>.

2008-06-16  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Check for $EUID instead of $UID.
	Reported by Vincent Zweije.

2008-06-16  Bean  <bean123ch@gmail.com>

	* fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
	(grub_ext2_read_block): Likewise.
	(grub_ext2_read_inode): Likewise.
	(grub_ext2_mount): Likewise.
	(grub_ext2_close): Likewise.
	(grub_ext3_get_journal): Removed.

	* fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
	(grub_reiserfs_read_symlink): Likewise.
	(grub_reiserfs_mount): Likewise.
	(grub_reiserfs_open): Likewise.
	(grub_reiserfs_read): Likewise.
	(grub_reiserfs_close): Likewise.
	(grub_reiserfs_get_journal): Removed.

	* fs/fshelp.c (grub_fshelp_read): Removed.
	(grub_fshelp_map_block): Likewise.

	* include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
	(grub_fshelp_journal): Likewise.
	(grub_fshelp_read): Likewise.
	(grub_fshelp_map_block): Likewise.

2008-06-16  Pavel Roskin  <proski@gnu.org>

	* conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
	floating point anymore.
	* include/grub/powerpc/libgcc.h: Leave only necessary exports.

2008-06-15  Pavel Roskin  <proski@gnu.org>

	* commands/ls.c (grub_ls_list_files): Use integer calculations
	for human readable format, avoid floating point use.
	* kern/misc.c (grub_ftoa): Remove.
	(grub_vsprintf): Remove floating point support.

2008-06-15  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in: Use the underlying device for loop-AES
	devices.
	Reported by Max Vozeler.

2008-06-15  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
	in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
	skipped later.
	(main): If a memdisk was requested, add "(memdisk)" drive explicitly to
	the beginning of the prefix.

	* kern/i386/pc/init.c (make_install_device): Remove memdisk check.
	It is assumed that if we have a memdisk, grub-mkimage has set
	grub_prefix to include the "(memdisk)" drive in it.

2008-06-15  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
	Initialize keyboard controller after registering the terminal, so that
	grub_printf() can be called from grub_keyboard_controller_init().

2008-06-15  Robert Millan  <rmh@aybabtu.com>

	* fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
	extent-btree which is written as big endian on disk.
	Reported by Alain Greppin  <al@chilibi.org>.

2008-06-14  Robert Millan  <rmh@aybabtu.com>

	* util/i386/efi/grub-install.in (modules): Remove `_chain'.
	* util/i386/pc/grub-install.in (modules): Likewise.

2008-06-13  Pavel Roskin  <proski@gnu.org>

	* commands/ls.c (grub_ls_list_files): Fix format warnings.

2008-06-13  Bean  <bean123ch@gmail.com>

	* commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.

	* fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.

	* fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
	to indicate sparse block.

2008-06-12  Pavel Roskin  <proski@gnu.org>

	* fs/ext2.c (grub_ext2_read_inode): Don't normalize block
	number, grub_fshelp_read() does it for us.

	* fs/fshelp.c (grub_fshelp_read): New function.  Implement
	linear disk read with journal translation.
	* fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
	* include/grub/fshelp.h: Declare grub_fshelp_read().

2008-06-09  Pavel Roskin  <proski@gnu.org>

	* fs/minix.c (grub_minix_mount): Handle error reading
	superblock.

2008-06-08  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-setup.c (main): If install drive is an LVM,
	don't append the RAID prefix afterwards.
	Reported by Clint Adams.

2008-06-08  Robert Millan  <rmh@aybabtu.com>

	Based on description from Pavel:
	* kern/disk.c (grub_disk_check_range): Rename to ...
	(grub_disk_adjust_range): ... this.  Add a comment explaining the
	tasks performed by this function.

2008-06-08  Robert Millan  <rmh@aybabtu.com>

	* include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
	`num_serial' (for consistency with other variables).
	(struct grub_ntfs_data): Add `uuid' member.
	* fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
	(grub_ntfs_uuid): New function.
	(grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.

2008-06-07  Pavel Roskin  <proski@gnu.org>

	* util/biosdisk.c (open_device): Revert last change to the
	function, it broke installation.  The sector needs to be
	different dependent on which device is opened.

2008-06-06  Robert Millan  <rmh@aybabtu.com>

	Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
	rest of GRUB, and breakage doesn't happen if its value were modified.

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
	Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
	a constant (same value).
	* kern/i386/pc/startup.S: Replace hardcoded `0x50' with
	`GRUB_KERNEL_MACHINE_DATA_END' (same value).

2008-06-06  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (open_device): Do not modify sector offset when
	accessing a partition.  kern/disk.c already handles this for us.

2008-06-06  Robert Millan  <rmh@aybabtu.com>

	* util/grub-emu.c (grub_machine_init): Move code in this function from
	here ...
	(main): ... to here (before grub_util_biosdisk_init() call, to prevent
	segfault in case grub_printf() is called).

	* util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
	grub_probe.  Update all users not to explicitly add it again.
	(grub_device): New variable; contains corresponding device for grubdir.
	(fs_module, partmap_module, devabstraction_module): Pass
	`--device ${grub_device}' to grub_probe to avoid traversing /dev
	every time.

2008-06-05  Robert Millan  <rmh@aybabtu.com>

	* normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
	is found, print it (same layout as with labels).

2008-06-04  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (get_drive): Rename to ...
	(find_grub_drive): ... this.  Update all users.

	(get_os_disk): Rename to ...
	(convert_system_partition_to_system_disk): ... this.  Update all users.

	(find_drive): Rename to ...
	(find_system_device): ... this.  Update all users.

2008-06-04  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (get_os_disk): Handle IDA devices.
	* util/grub-mkdevicemap.c (get_mmc_disk_name)
	(make_device_map): Likewise.

2008-06-01  Robert Millan  <rmh@aybabtu.com>

	*  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
	before dereferencing it.

	* fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
	union with fat12/fat16-specific ones.  Add some new fields, including
	`num_serial' for both versions.
	(struct grub_fat_data): Add `uuid' member.
	(grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
	names.  Initialize `data->uuid' using `num_serial'.
	(grub_fat_uuid): New function.
	(grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.

	* fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
	(grub_reiserfs_uuid): New function.
	(grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
	member.

	* fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
	(grub_xfs_uuid): New function.
	(grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.

2008-06-01  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (prepare_grub_to_access_device): Generate
	code that is backward compatible with pre-uuid search command.

2008-05-31  Robert Millan  <rmh@aybabtu.com>

	* disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
	floppies after everything else, to ensure floppy drive isn't accessed
	unnecessarily (patch from Bean).

2008-05-31  Robert Millan  <rmh@aybabtu.com>

	* commands/search.c (search_label, search_fs_uuid, search_file): Do
	not print device names when we were asked to set a variable.

2008-05-31  Robert Millan  <rmh@aybabtu.com>

	* term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
	using "cursor-on" and "cursor-off" commands (understood at least by
	the Open Firmware flavour on OLPC).

2008-05-31  Michael Gorven  <michael@gorven.za.net>

	* term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
	on and off sequences.

2008-05-31  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
	* util/update-grub.in: Likewise.

2008-05-30  Pavel Roskin  <proski@gnu.org>

	* util/biosdisk.c (linux_find_partition): Simplify logic and
	make the code more universal.  Keep special processing for
	devfs, but use a simple rule for all other devices.  If the
	device ends with a number, append 'p' and the partition number.
	Otherwise, append only the partition number.

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
	* util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
	GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
	the `root' parameter to Linux.

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* commands/search.c (options): Rename --fs_uuid to --fs-uuid.
	* util/update-grub_lib.in (prepare_grub_to_access_device): Replace
	--fs_uuid with --fs-uuid.
	* util/update-grub.in: Allow filesystem UUID probes to fail (since not
	all filesystems support them).

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
	grub_printf() flags, since we're printing in units of 2 bytes.

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Remove obsolete comment referencing
	convert_system_path_to_grub_path().
	* util/update-grub.in: Likewise.
	* util/update-grub_lib.in (is_path_readable_by_grub): New function.
	(convert_system_path_to_grub_path): Add a warning message explaining
	that this function is deprecated.  Rely on is_path_readable_by_grub()
	for the readability checks.
	(font_path): Use is_path_readable_by_grub() for the readability
	check rather than convert_system_path_to_grub_path().

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (prepare_grub_to_access_device): New function.
	* util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
	converting it first.
	* util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
	grub.cfg for access to font file, and afterwards call it again to set
	the root device.

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* commands/search.c (options): Add --fs_uuid option.
	(search_fs_uuid): New function.
	(grub_cmd_search): Fix --set argument passing.
	Use search_fs_uuid() when requested via --fs_uuid.
	(grub_search_init): Update help message.
	* fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
	and redeclare it as an array of 16-bit words.
	(grub_ext2_uuid): New function.
	(grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
	* include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
	* util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
	(GRUB_DEVICE_BOOT_UUID): New variables.
	(GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
	* util/grub.d/00_header.in: Set root using `search --fs_uuid' command
	whenever possible.
	* util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
	just assume `root' variable has the right value.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub-probe.c (probe): Probe for filesystem UUID when requested
	via PRINT_FS_UUID.
	(main): Recognise `-t fs_uuid' argument.

2008-05-30  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (map): Redefine structure to hold information
	about GRUB drive name.
	(get_drive): Reimplement without assuming (and verifying) BIOS-like
	drive names.
	(call_hook): Remove.
	(grub_util_biosdisk_iterate): Access drive names via `.drive' struct
	member.  Assume drive has partitions.
	(grub_util_biosdisk_open): Access device names via `.device' struct
	member.
	(open_device): Likewise.
	(find_drive): Likewise.
	(read_device_map): Adjust map[] usage to match the new struct
	definition.  Don't check for duplicates (still possible, but not cheap
	anymore).
	(grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
	(make_device_name): Remove assumption of BIOS-like drive names.

2008-05-30  Pavel Roskin  <proski@gnu.org>

	* conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
	compiling execute.c doesn't need grub_script.tab.h anymore.
	(normal/command.c_DEPENDENCIES): Likewise.
	(normal/function.c_DEPENDENCIES): Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

2008-05-29  Pavel Roskin  <proski@gnu.org>

	* disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
	when scanning metadata for volume group name.

	* include/grub/script.h: Don't include grub_script.tab.h.  It's
	a generated file, which may only be included from the files with
	DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
	use union YYSTYPE, as the later allows forward declaration.
	* normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.

2008-05-29  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
	(OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
	[GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
	(grub_console_checkkey): Add grub_dprintf() call to report unknown
	scan codes.

2008-05-29  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
	control key combinations.

2008-05-29  Robert Millan  <rmh@aybabtu.com>

	* util/powerpc/ieee1275/grub-install.in: Move from here ...
	* util/ieee1275/grub-install.in: ... to here.
	* powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
	* i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
	(grub_install_SOURCES): Likewise.

2008-05-29  Robert Millan  <rmh@aybabtu.com>

	* fs/affs.c: Update copyright year.
	* fs/ext2.c: Likewise.
	* fs/fshelp.c: Likewise.
	* fs/hfsplus.c: Likewise.
	* fs/ntfs.c: Likewise.
	* fs/xfs.c: Likewise.
	* include/grub/fshelp.h: Likewise.
	* util/grub-mkdevicemap.c: Likewise.

2008-05-28  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Allow chmod call to fail, since /boot/grub/
	might need to be fatfs to support some firmware implementations
	(e.g. OFW or EFI).

2008-05-28  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
	devices.
	* util/grub-mkdevicemap.c (get_mmc_disk_name)
	(make_device_map): Likewise.

2008-05-20  Bean  <bean123ch@gmail.com>

	* fs/fshelp.c (grub_fshelp_map_block): New function.
	(grub_fshelp_find_file): Use 64-bit type for pos and block address.
	Use `>>' and `&' operator to avoid 64-bit divide and modulo.

	* include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
	(GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
	(grub_fshelp_journal): New structure.
	(grub_fshelp_map_block): New function prototype.
	(grub_fshelp_read_file): Use grub_disk_addr_t as block type.
	(grub_fshelp_map_block): Likewise.

	* fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
	(EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
	(EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
	(EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
	(EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
	(EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
	(EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
	(EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
	(EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
	(EXT3_JOURNAL_FLAG_DELETED): Likewise.
	(EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
	(grub_ext2_sblock): New members for journal support.
	(grub_ext3_journal_header): New structure.
	(grub_ext3_journal_revoke_header): Likewise.
	(grub_ext3_journal_block_tag): Likewise.
	(grub_ext3_journal_sblock): Likewise.
	(grub_fshelp_node): New members logfile and journal.
	(grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
	grub_fshelp_map_block to get real block number.
	(grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
	number.
	(grub_ext2_read_inode): Likewise.
	(grub_ext3_get_journal): New function.
	(grub_read_inode): Initialize journal using grub_ext3_get_journal.
	(grub_ext2_close): Release memory used by journal.

	* fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
	(REISERFS_MAGIC_DESC_BLOCK): New macro.
	(grub_reiserfs_transaction_header): Renamed to
	grub_reiserfs_description_block, replace field data with real_blocks.
	(grub_reiserfs_commit_block): New structure.
	(grub_reiserfs_data): New member journal.
	(grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
	number.
	(grub_reiserfs_read_symlink): Likewise.
	(grub_reiserfs_iterate_dir): Likewise.
	(grub_reiserfs_open): Likewise.
	(grub_reiserfs_read): Likewise.
	(grub_reiserfs_get_journal): New function.
	(grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
	three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
	using grub_reiserfs_get_journal.
	(grub_reiserfs_close): Release memory used by journal.

	* fs/affs.c (grub_affs_read_block): Change block type to
	grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.

	* fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.

	* fs/hfsplus.c (grub_hfsplus_read_block): Likewise.

	* fs/ntfs.c (grub_ntfs_read_block): Likewise.

	* fs/udf.c (grub_udf_read_block): Change block type to
	grub_disk_addr_t. Use type cast to avoid warning.

	* fs/xfs.c (grub_xfs_read_block): Likewise.

2008-05-16  Christian Franke  <franke@computer.org>

	* commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
	to ensure that break with ESC will always work.
	* commands/sleep.c (grub_interruptible_millisleep): Likewise.
	Remove ESC from keyboard queue.

2008-05-16  Christian Franke  <franke@computer.org>

	* util/biosdisk.c: [__CYGWIN__] Add includes.
	(grub_util_biosdisk_open): Use Linux code also for Cygwin.
	(get_os_disk): Move variable declarations to OS specific
	parts to avoid warning.
	[__GNU__] (get_os_disk): Fix /dev/sdXsN case.
	[__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
	(grub_util_biosdisk_get_grub_dev): Use Linux code also for
	Cygwin.
	* util/getroot.c: [__CYGWIN__] Add includes.
	(strip_extra_slashes): Fix "/" case.
	[__CYGWIN__] (get_win32_path): New function.
	[__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
	[__CYGWIN__] (find_root_device): Disable.
	[__CYGWIN__] (get_bootsec_serial): New function.
	[__CYGWIN__] (find_cygwin_root_device): Likewise.
	[__linux__] (grub_guess_root_device): Add early returns to simplify
	structure.
	[__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
	[__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
	check for Linux only.

2008-05-15  Bean  <bean123ch@gmail.com>

	* kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
	keyboard hang problem in apple's intel mac.

2008-05-09  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
	devices.
	* util/grub-mkdevicemap.c (get_virtio_disk_name)
	(make_device_map): Likewise.
	Reported by Aurelien Jarno <aurel32@debian.org>

2008-05-07  Ian Campbell  <ijc@hellion.org.uk>

	* util/biosdisk.c (get_os_disk): Recognise xvd type disks.
	* util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
	(make_device_map): Output entries for xvd type disks.

2008-05-07  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
	devices.
	* util/grub-mkdevicemap.c (get_cciss_disk_name)
	(make_device_map): Likewise.
	Reported by Roland Dreier <rdreier@cisco.com>

2008-05-07  Robert Millan  <rmh@aybabtu.com>

	* disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
	grub_strstr() call.  Correct a few mistakes in failure path handling.

2008-05-06  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (make_system_path_relative_to_its_root):
	Do not print a trailing slash (therefore, the root directory is an
	empty string).
	(convert_system_path_to_grub_path): Do not remove trailing slash
	from make_system_path_relative_to_its_root() output.

	* util/i386/pc/grub-install.in: Add trailing slash to output from
	make_system_path_relative_to_its_root().

2008-05-06  Robert Millan  <rmh@aybabtu.com>

	* util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
	ensures that output lines aren't intermangled with those sent to
	stderr (via grub_util_info()).
	* util/grub-probe.c (grub_refresh): Likewise.
	* util/i386/pc/grub-setup.c (grub_refresh): Likewise.

2008-05-05  Christian Franke  <franke@computer.org>

	* util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
	Add Cygwin device names.
	(get_ide_disk_name) [__CYGWIN__]: Likewise.
	(get_scsi_disk_name) [__CYGWIN__]: Likewise.
	(check_device): Return error instead of success on empty name.
	(make_device_map): Move label inside linux specific code to
	prevent compiler warning.

2008-04-30  Robert Millan  <rmh@aybabtu.com>

	Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
	* util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
	first boot option.
	* util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.

2008-04-29  Robert Millan  <rmh@aybabtu.com>

	* docs/grub.cfg: New file (example GRUB configuration).

2008-04-26  Robert Millan  <rmh@aybabtu.com>

	* DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
	`loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
	and `disk/ieee1275/nand.c'.

2008-04-25  Bean  <bean123ch@gmail.com>

	* Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
	i386-linuxbios.

	* commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
	change the buffer size to 4096 for cdrom device.

	* conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
	and nand.mod.
	(_linux_mod_SOURCES): New variable.
	(_linux_mod_CFLAGS): Likewise.
	(_linux_mod_LDFLAGS): Likewise.
	(linux_mod_SOURCES): Likewise.
	(linux_mod_CFLAGS): Likewise.
	(linux_mod_LDFLAGS): Likewise.
	(nand_mod_SOURCES): Likewise.
	(nand_mod_CFLAGS): Likewise.
	(nand_mod_LDFLAGS): Likewise.

	* disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
	GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
	type property. (nand device in olpc don't have this property)

	* include/grub/disk.h (grub_disk_dev_id): New macro
	GRUB_DISK_DEVICE_NAND_ID.

	* include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
	function prototype.
	(grub_rescue_cmd_initrd): Likewise.

	* include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
	(linux_kernel_params): Add new member ofw_signature, ofw_num_items,
	ofw_cif_handler and ofw_idt, adjust padding number.

	* include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
	GRUB_MACHINE_IEEE1275 is defined.

	* include/grub/ieee1275/ieee1275.h (grub_available_iterate):
	Use NESTED_FUNC_ATTR attribute on the hook parameter.

	* kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
	on nested function heap_init.
	(grub_upper_mem): New variable for i386-ieee1275.
	(grub_get_extended_memory): New function for i386-ieee1275.
	(grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.

	* kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
	NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
	property.

	* loader/i386/ieee1275/linux.c: New file.

	* loader/i386/ieee1275/linux_normal.c: New file.

	* disk/ieee1275/nand.c: New file.

2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>

	* util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
	value.
	* util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.

2008-04-18  Robert Millan  <rmh@aybabtu.com>

	Restructures early code path on ieee1275 to unify grub_main() as
	the first C function that is executed in every platform.

	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
	* kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
	cmain().
	* kern/powerpc/ieee1275/crt0.S (_start): Likewise.
	* kern/ieee1275/cmain.c (cmain): Rename to ...
	* kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
	* kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
	at the beginning.

2008-04-18  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Fix syntax error when setting
	`GRUB_PRELOAD_MODULES'.
	Reported by Stephane Chazelas <stephane@artesyncp.com>

2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>

	* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
	section into account, newer toolchains generate unique build ids
	* configure.ac: remove the test for --build-id=none acceptance,
	we want build ids to be preserved
	* genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
	far from other sections don't cause the raw binary images grow
	size

2008-04-15  Robert Millan  <rmh@aybabtu.com>

	* disk/lvm.c: Update copyright year.
	* kern/misc.c: Likewise.

2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>

	* disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
	there is no memory left for physical volume name.

2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>

	* disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
	volume name mapping to support bigger than 9 character names properly.

2008-04-13  Robert Millan  <rmh@aybabtu.com>

	* disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
	as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm

2008-04-13  Christian Franke  <franke@computer.org>

	* util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
	to create a floppy emulation boot CD when non emulation mode
	does not work.
	Enable Joliet CD filesystem extension.

2008-04-13  Robert Millan  <rmh@aybabtu.com>

	* kern/misc.c (grub_strncat): Fix off-by-one error.
	Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>

	* kern/env.c (grub_env_context_close): Clear current context, not
	previous one.
	Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>

	* kern/misc.c (grub_strcat): Minor speed optimization (same code size).

2008-04-13  Robert Millan  <rmh@aybabtu.com>

	Improve robustness when handling LVM.

	* disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
	(and leave `*p' unmodified).
	(grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
	through it.
	(grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
	iterating through it.
	(grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
	through it.
	(grub_lvm_scan_device): Check the return value (and fail gracefully
	when due) on each grub_lvm_getvalue() or grub_strstr() call.
	Don't assume `vg->pvs != NULL' when iterating through it.

2008-04-13  Robert Millan  <rmh@aybabtu.com>

	* gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
	* genmk.rb (partmap): New variable.
	(CLEANFILES, PARTMAPFILES): Add #{partmap}.
	(#{partmap}): New target rule.
	* genpartmaplist.sh: New file.
	* Makefile.in (pkglib_DATA): Add partmap.lst.
	(partmap.lst): New target rule.
	* util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
	modules (including all partition maps), instead of preloading them.

2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>

	* util/grub.d/30_os-prober.in: New script. Use `os-prober' and
	`linux-boot-prober' (if installed) to detect other operating
	systems which are installed on the computer and add them to
	the boot menu.
	* conf/common.rmk: Build and install 30_os-prober.

2008-04-12  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/init.c: Move from here ...
	* kern/ieee1275/init.c: ... to here.  Update all users.

	* kern/powerpc/ieee1275/cmain.c: Move from here ...
	* kern/ieee1275/cmain.c: ... to here.  Update all users.

	* kern/powerpc/ieee1275/openfw.c: Move from here ...
	* kern/ieee1275/openfw.c: ... to here.  Update all users.

	* loader/powerpc/ieee1275/multiboot2.c: Move from here ...
	* loader/ieee1275/multiboot2.c: ... to here.  Update all users.

2008-04-10  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Always use "_cv_" in cache variables for
	compatibility with Autoconf 2.62.

2008-04-07  Robert Millan  <rmh@aybabtu.com>

	Revert grub/machine/init.h addition by Pavel (since it breaks on
	i386-ieee1275 and others):
	* util/i386/pc/misc.c: Remove grub/machine/init.h.
	* util/powerpc/ieee1275/misc.c: Likewise.

2008-04-07  Robert Millan  <rmh@aybabtu.com>

	* util/grub-probe.c (probe): Improve error message.

2008-04-07  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (read_device_map): Skip devices that don't exist
	(this prevents the presence of a bogus entry from ruining the whole
	thing).

2008-04-06  Pavel Roskin  <proski@gnu.org>

	* util/biosdisk.c: Include grub/util/biosdisk.h.
	* util/grub-fstest.c (execute_command): Make static.
	* util/grub-mkdevicemap.c (check_device): Likewise.
	* util/i386/pc/misc.c: Include grub/machine/init.h.
	* util/powerpc/ieee1275/misc.c: Likewise.
	* util/lvm.c: Include grub/util/lvm.h.
	* util/misc.c: Include grub/kernel.h, grub/misc.h and
	grub/cache.h.
	* util/raid.c: Include grub/util/raid.h.
	(grub_util_getdiskname): Make static.

	* util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
	grub_hostfs_fini(), as they are called from grub_init_all() and
	grub_fini_all() respectively.  This fixes an infinite loop in
	grub-fstest due to double registration of hostfs.
	Reported by Christian Franke <Christian.Franke@t-online.de>

2008-04-05  Pavel Roskin  <proski@gnu.org>

	* bus/pci.c (grub_pci_iterate): For multifunction devices, probe
	all 8 functions.  Otherwise, probe function 0 only.

2008-04-04  Pavel Roskin  <proski@gnu.org>

	* commands/lspci.c (grub_lspci_iter): Print the bus number
	correctly.

	* commands/lspci.c (grub_pci_classes): Fix typos.
	(grub_lspci_iter): Don't print func twice.  Print vendor ID
	before device ID, as it's normally done.

	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
	Fix signedness warnings.
	* kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
	Likewise.
	* util/ieee1275/get_disk_name.c: Include config.h so that
	_GNU_SOURCE is defined and getline() is declared.  Mark an
	unused argument as such.  Fix a signedness warning.

2008-04-02  Pavel Roskin  <proski@gnu.org>

	* genkernsyms.sh.in: Use more robust assignments for CC and
	srcdir.  Quote srcdir.
	* gensymlist.sh.in: Likewise.  Assert at the compile time that
	the symbol table is not empty.

	* disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
	* fs/cpio.c (grub_cpio_read): Likewise.

2008-04-01  Pavel Roskin  <proski@gnu.org>

	* disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
	* disk/host.c (grub_host_open): Likewise.
	* disk/loopback.c (grub_loopback_open): Likewise.
	* disk/memdisk.c (grub_memdisk_open): Use a string pointer for
	disk->id as in disk/host.c, not a multi-character constant.

	* util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
	later is obsolete, potentially dangerous and sets a bad example.
	* util/i386/efi/grub-mkimage.c (make_header): Likewise.
	* util/misc.c (grub_util_get_image_size): Likewise.

	* disk/loopback.c (options): Improve help for "--partitions".

	* normal/arg.c (grub_arg_show_help): Fix spacing of the long
	options to align them with the short options, e.g. "echo -e".

2008-03-31  Bean  <bean123ch@gmail.com>

	* video/reader/png.c (grub_png_data): New member is_16bit and
	image_data.
	(grub_png_decode_image_header): Detect 16 bit png image.
	(grub_png_convert_image): New function to convert 16 bit image to 8 bit.
	(grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
	(grub_video_reader_png): Release memory occupied by image_data.

	* fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
	4096 bytes.
	(grub_nfs_mount): Skip the test for sector per cluster.

	* include/grub/ntfs.h (MAX_SPC): Removed.

2008-03-31  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkgdata_MODULES): Add afs.mod.
	(grub_probe_SOURCES): Add fs/afs.c.
	(grub_fstest_SOURCES): Likewise.
	(afs_mod_SOURCES): New variable.
	(afs_mod_CFLAGS): Likewise.
	(afs_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* fs/afs.c: New file.

2008-03-30  Pavel Roskin  <proski@gnu.org>

	* disk/host.c: Include grub/misc.h to fix a warning.
	* util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
	warnings about implicit declarations.

	* fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
	variable.
	* include/grub/i386/loader.h: Change declaration of
	grub_linux_boot() to match what grub_loader_set() expects.
	* util/getroot.c (grub_guess_root_device): Return const char* to
	fix a warning.
	* util/grub-probe.c (probe): Fix a warning about uninitialized
	abstraction_name variable.
	* util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
	second argument as unused to fix a warning.

	* loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
	missing grub_error() call.

	* util/update-grub_lib.in: Define datarootdir, since Autoconf
	2.60 and newer uses it to define datadir.

	* commands/sleep.c: Fix warning about implicit declaration.
	* disk/memdisk.c: Likewise.
	* loader/aout.c: Likewise.
	* loader/i386/bsd_normal.c: Likewise.
	* util/grub-probe.c: Likewise.

	* commands/i386/cpuid.c (has_longmode): Make static.
	* disk/i386/pc/biosdisk.c (cd_drive): Likewise.
	* include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.

	* kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
	GDT.  This is more robust, as %ds can change.
	(grub_biosdisk_rw_int13_extensions): Don't clear %ds before
	calling real_to_prot().
	(grub_biosdisk_get_diskinfo_int13_extensions): Likewise.

2008-03-28  Pavel Roskin  <proski@gnu.org>

	* kern/i386/pc/startup.S: Assert that uncompressed functions
	don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
	* kern/i386/pc/lzo1x.S: Remove all .align directives in the
	code, as they push parts of the code (error handlers) beyond
	GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
	code as correctness and size.

2008-03-28  Pavel Roskin  <proski@gnu.org>

	* kern/i386/pc/startup.S
	(grub_biosdisk_get_diskinfo_int13_extensions): When converting
	data block address to the real mode, keep offset minimal.  This
	works around a bug in AWARD BIOS on old Athlon systems, which
	makes CD detection hang.

2008-03-26  Pavel Roskin  <proski@gnu.org>

	* normal/color.c (grub_parse_color_name_pair): Make `name' a
	const.
	* include/grub/normal.h: Add grub_parse_color_name_pair()
	declaration.

2008-03-24  Bean  <bean123ch@gmail.com>

	* disk/i386/pc/biosdisk.c (cd_start): Removed.
	(cd_count): Removed.
	(cd_drive): New variable.
	(grub_biosdisk_get_drive): Don't check for (cdN) device.
	(grub_biosdisk_call_hook): Likewise.
	(grub_biosdisk_iterate): Change cdrom detection method.
	(grub_biosdisk_open): Replace cd_start with cd_drive.
	(GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
	detect cdrom device.

	* include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
	Removed.
	(GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
	(GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
	(GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
	(GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
	(GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
	(GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
	(GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
	(grub_biosdisk_cdrp): New structure.
	(grub_biosdisk_get_cdinfo_int13_extensions): New function.

	* include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.

	* kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
	device.

	* kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
	New function.

2008-03-20  Robert Millan  <rmh@aybabtu.com>

	Remove 2 TiB limit in ata.mod.
	* disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
	(grub_ata_dumpinfo): Print sector count with 0x%llx.
	(grub_ata_identify): Interpret `&info16[100]' as a pointer to
	grub_uint64_t instead of grub_uint32_t.

2008-03-05  Bean  <bean123ch@gmail.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
	(grub_multiboot): Set boot device.

	* boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.

2008-03-02  Bean  <bean123ch@gmail.com>

	* fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
	symlink_buffer.

2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
	texinfo.tex.

	* docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
	modified.

	* docs/fdl.texi: New file.

	* docs/mdate-sh: New file. Copied from gnulib.
	* docs/texinfo.tex: Likewise.

	* config.guess: Updated from gnulib.
	* install-sh: Likewise.

2008-02-28  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
	(aout_mod_SOURCES): New variable.
	(aout_mod_CFLAGS): Likewise.
	(aout_mod_LDFLAGS): Likewise.

	* conf/i386-ieee1275.rmk: Likewise.

2008-02-28  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Reorganise terminal validity check.  Accept
	`ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
	Based on suggestion by Franklin PIAT.

2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>

	* include/grub/util/getroot.h (grub_util_check_block_device): Export new
	function.
	* util/getroot.c (grub_util_check_block_device): New function that
	returns the given argument if it is a block device and returns NULL else.
	* util/grub-probe.c (argument_is_device): New variable.
	(probe): Promote device_name from a variable to an argument. Receive
	device_name from grub_util_check_block_device() if path is NULL and from
	grub_guess_root_device() else. Do not free() device_name anymore.
	(options): Introduce new parameter '-d, --device'.
	(main): Add description of the new parameter to the help screen.
	Rename path variable to argument. Set argument_is_device if the '-d'
	option is given. Pass argument to probe() depending on
	argument_is_device.

2008-02-24  Bean  <bean123ch@gmail.com>

	* fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
	(GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
	(GRUB_ISO9660_VOLDESC_SUPP): Likewise.
	(GRUB_ISO9660_VOLDESC_PART): Likewise.
	(GRUB_ISO9660_VOLDESC_END): Likewise.
	(grub_iso9660_primary_voldesc): New member escape.
	(grub_iso9660_data): New member joliet.
	(grub_iso9660_convert_string): New function.
	(grub_iso9660_mount): Detect joliet extension.
	(grub_iso9660_iterate_dir): Convert filename when joliet is detected.
	(grub_iso9660_iso9660_label): Likewise.

	* conf/common.rmk (pkgdata_MODULES): Add udf.mod.
	(grub_setup_SOURCES): Add fs/udf.c.
	(grub_fstest_SOURCES): Likewise.
	(udf_mod_SOURCES): New variable.
	(udf_mod_CFLAGS): Likewise.
	(udf_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* fs/udf.c: New file.

2008-02-24  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
	(normal/lexer.c_DEPENDENCIES): New variables.
	* conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
	(normal/lexer.c_DEPENDENCIES): Likewise.
	* conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
	(normal/lexer.c_DEPENDENCIES): Likewise.
	* conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
	(normal/lexer.c_DEPENDENCIES): Likewise.
	* conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
	(normal/lexer.c_DEPENDENCIES): Likewise.
	* conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
	(normal/lexer.c_DEPENDENCIES): Likewise.

2008-02-23  Robert Millan  <rmh@aybabtu.com>

	* partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
	since they were intended to be in hex.  This didn't break previously
	because of a bug in gpt_partition_map_iterate() (see below).

	(gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
	when checking the validity of GPT header.
	Remove `partno', since it always provides the same information as `i'.

2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/grub/efi/time.h: Fix a wrong comment.

2008-02-19  Pavel Roskin  <proski@gnu.org>

	* kern/rescue.c (grub_enter_rescue_mode): Improve initial
	message.

2008-02-19  Bean  <bean123ch@gmail.com>

	* conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
	(aout_mod_SOURCES): New variable.
	(aout_mod_CFLAGS): Likewise.
	(aout_mod_LDFLAGS): Likewise.
	(_bsd_mod_SOURCES): New variable.
	(_bsd_mod_CFLAGS): Likewise.
	(_bsd_mod_LDFLAGS): Likewise.
	(bsd_mod_SOURCES): New variable.
	(bsd_mod_CFLAGS): Likewise.
	(bsd_mod_LDFLAGS): Likewise.

	* include/grub/aout.h: New file.

	* include/grub/i386/loader.h (grub_unix_real_boot): New function.

	* include/grub/i386/bsd.h: New file.

	* include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
	to make it public.

	* kern/elf.c (grub_elf32_load): Get the physical address after the hook
	function is called, so that it's possible to change it inside the hook.
	(grub_elf64_load): Likewise.
	(grub_elf_file): Don't close the file if elf header is not found.
	(grub_elf_close): Close the file if grub_elf_file fails (The new
	grub_elf_file won't close it).
	(grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
	(grub_elf64_size): Likewise.

	* kern/i386/loader.S (grub_unix_real_boot): New function.

	* loader/aout.c: New file.

	* loader/i386/bsd.c: New file.

	* loader/i386/bsd_normal.c: New file.

	* loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.

	* loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
	can test other formats.

2008-02-19  Robert Millan  <rmh@aybabtu.com>

	* partmap/gpt.c: Include `<grub/gpt_partition.h>'.
	(grub_gpt_partition_type_empty): Redefine with macro from
	`<grub/gpt_partition.h>'.
	(gpt_partition_map_iterate): Adjust partition type comparison.

	Export `entry' as partmap-specific `part.data' struct.
	(grub_gpt_header, grub_gpt_partentry): Move from here ...

	* include/grub/gpt_partition.h (grub_gpt_header)
	(grub_gpt_partentry): ... to here (new file).

	* util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.

	(grub_gpt_partition_type_bios_boot): New const variable, defined
	with macro from `<grub/gpt_partition.h>'.

	(setup): Replace `first_start' with `embed_region', which keeps
	track of the embed region (and is partmap-agnostic).

	Replace find_first_partition_start() with find_usable_region(),
	which finds a usable region for embedding using partmap-specific
	knowledge (supports PC/MSDOS and GPT).

	Fix all assumptions that the embed region start at sector 1, using
	`embed_region.start' from now on.  Similarly, use `embed_region.end'
	rather than `first_start' to calculate available size.

	In grub_util_info() message, replace "into after the MBR" with an
	indication of the specific sector our embed region starts at.

2008-02-19  Robert Millan  <rmh@aybabtu.com>

	* DISTLIST: Replace `commands/ieee1275/halt.c' and
	`commands/ieee1275/reboot.c' with `commands/halt.c' and
	`commands/reboot.c'.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
	(halt_mod_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
	(halt_mod_SOURCES): Likewise.

2008-02-17  Christian Franke  <franke@computer.org>

	* commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.

2008-02-17  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
	set `first_start' to 0 for non-PC/MSDOS partition maps.

2008-02-16  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
	do not assume partition map is PC/MSDOS before performing checks that
	are specific to that layout.

2008-02-13  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
	`commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
	* kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.

2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac: Only a cosmetic change on the handling of
	-fno-stack-protector.

2008-02-12  Alexandre Boeglin  <alex@boeglin.org>

	* conf/i386-efi.rmk (grub_emu_SOURCES): Replace
	commands/i386/pc/halt.c and reboot.c by commands/halt.c and
	reboot.c.
	(grub_install_SOURCES): Add halt.mod and reboot.mod.
	(halt_mod_SOURCES): New variable.
	(halt_mod_CFLAGS): Likewise.
	(halt_mod_LDFLAGS): Likewise.
	(reboot_mod_SOURCES): Likewise.
	(reboot_mod_CFLAGS): Likewise.
	(reboot_mod_LDFLAGS): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
	commands/ieee1275/halt.c and reboot.c by commands/halt.c and
	reboot.c.
	(halt_mod_SOURCES): Likewise.
	(reboot_mod_SOURCES): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Replace
	commands/i386/pc/reboot.c by commands/reboot.c.
	(reboot_mod_SOURCES): Likewise.

	* commands/i386/pc/reboot.c: merge this file ...

	* commands/ieee1275/reboot.c: ... and this file ...

	* commands/reboot.c: ... to this file.
	Add some precompiler directive to include the correct header for
	each machine.

	* commands/ieee1275/halt.c: move this file ...

	* commands/halt.c: ... to here.
	Add some precompiler directive to include the correct header for
	each machine.

	* include/grub/efi/efi.h (grub_reboot): New function declaration.
	(grub_halt): Likewise.

	* kern/efi/efi.c (grub_reboot): New function.
	(grub_halt): Likewise.

2008-02-12  Robert Millan  <rmh@aybabtu.com>

	* util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
	/dev (like it is done for /dev/mapper).  This doesn't provide support
	for EVMS, but at least it is now easy to identify the problem when it
	arises.

2008-02-11  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
	(grub_util_biosdisk_get_grub_dev): Check open() exit status by
	comparing it with -1, not 0.

2008-02-10  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
	`disk/lvm.c'.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.

	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
	`disk/lvm.c' to the end of the list.
	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.

2008-02-10  Robert Millan  <rmh@aybabtu.com>

	* kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
	grub_print_error() instead.  This will let user know why we're entering
	rescue mode.
	Based on suggestions from Sam Morris.

2008-02-10  Alexandre Boeglin  <alex@boeglin.org>

	* normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
	on remaining N args, instead of "--" arg N times.

2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>

	* font/manager.c (unknown_glyph): Added variable for unknown glyph.
	(fill_with_default_glyph): Changed to use unknown_glyph for fill
	pattern for unknown glyphs.

2008-02-09  Robert Millan  <rmh@aybabtu.com>

	* configure.ac: Probe for `help2man'.
	* Makefile.in (builddir): New variable.
	(HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
	or otherwise add a few flags/options to it.
	(install-local): For every executable utility or script that is
	installed, invoke $(HELP2MAN) to install a manpage based on --help
	output.

	* util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
	that it doesn't prevent --help from working in build tree.

	* util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
	with `bug-grub@gnu.org'.
	* util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
	* util/update-grub.in (usage): New function.
	Implement proper argument check, with support for --help and --version
	(as well as existing -y).

2008-02-09  Christian Franke  <franke@computer.org>

	* commands/cat.c (grub_cmd_cat): Print '\r' as hex to
	avoid overwriting previous output.
	* kern/rescue.c (grub_rescue_cmd_cat): Likewise.

2008-02-09  Robert Millan  <rmh@aybabtu.com>

	* normal/menu.c (run_menu): If timeout is set to zero, don't bother
	drawing the menu.

2008-02-09  Robert Millan  <rmh@aybabtu.com>

	* commands/sleep.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
	(sleep_mod_SOURCES): New variable.
	(sleep_mod_CFLAGS): Likewise.
	(sleep_mod_LDFLAGS): Likewise.

2008-02-09  Robert Millan  <rmh@aybabtu.com>

	* disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
	situations in which we can deduce the RAID size and the superblock
	doesn't match it.

2008-02-09  Robert Millan  <rmh@aybabtu.com>

	* disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
	and return a grub_diskmemberlist_t composed of LVM physical volumes.
	[GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.

	* disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
	and return a grub_diskmemberlist_t composed of physical array members.
	[GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.

	* include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
	prototype.
	[GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
	[GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
	[GRUB_UTIL] (grub_disk_memberlist_t): New typedef.

	* util/grub-probe.c (probe): Move partmap probing code from here ...
	(probe_partmap): ... to here.
	(probe): Use probe_partmap() once for the disk we're probing, and
	additionally, when such disk contains a memberlist() struct member,
	once for each disk that is contained in the structure returned by
	memberlist().

2008-02-09  Robert Millan  <rmh@aybabtu.com>

	* util/grub-probe.c (main): When `verbosity > 1', set `debug'
	environment variable to 'all' in order to obtain debug output from
	non-util/ code.
	* util/i386/pc/grub-setup.c (main): Likewise.

2008-02-08  Robert Millan  <rmh@aybabtu.com>

	* disk/raid.c (grub_raid_scan_device): Check for
	`array->device[sb.this_disk.number]' rather than for
	`array->device[sb.this_disk.number]->name', since the latter is not
	guaranteed to be accessible.

2008-02-08  Robert Millan  <rmh@aybabtu.com>

	* disk/raid.c: Update copyright.
	* fs/cpio.c: Likewise.
	* include/grub/raid.h: Likewise.
	* loader/i386/pc/multiboot.c: Likewise.
	* util/hostfs.c: Likewise.

2008-02-08  Robert Millan  <rmh@aybabtu.com>

	* include/grub/raid.h (struct grub_raid_array): Change type of `device'
	to a grub_disk_t array.
	* disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
	`device[x]'.
	(grub_raid_scan_device): Replace `device[x].name' accesses with
	`device[x]->name'.  Simplify initialization of `array->device[x]'.

2008-02-08  Robert Millan  <rmh@aybabtu.com>

	* disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
	grub_dprintf() calls.
	* kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
	error message.

2008-02-07  Christian Franke  <franke@computer.org>

	* util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
	instead of fseek and ftell to support large files.
	(grub_hostfs_read): Likewise.

2008-02-07  Robert Millan  <rmh@aybabtu.com>

	Patch from Jeroen Dekkers.
	* disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
	failure, since successfully reading all array members might not be
	required.

2008-02-06  Robert Millan  <rmh@aybabtu.com>

	* util/grub-probe.c (probe): Simplify partmap probing (with the
	assumption that the first word up to the underscore equals to
	the module name).

2008-02-06  Christian Franke  <franke@computer.org>

	* fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
	(and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
	last block of a cpio or tar stream.
	Check for "TRAILER!!!" instead of any empty data
	block to detect last block of a cpio stream.
	(grub_cpio_dir): Fix constness of variable np.
	(grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
	cpio or tar trailer is detected.  This fixes a crash
	on open of a non existing file.

2008-02-05  Bean  <bean123ch@gmail.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
	address of entry.
	(grub_multiboot_load_elf64): Likewise.
	(grub_multiboot): Initialize mbi structure.

	* util/grub-fstest.c: Don't include unused header file script.h.

	* conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
	of file.
	(grub_fstest_SOURCES): Likewise.

2008-02-05  Robert Millan  <rmh@aybabtu.com>

	* include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
	(GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
	(GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
	(GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.

	* kern/i386/pc/startup.S: Include `<grub/term.h>'.
	(translation_table): Replace hardcoded values with macros
	provided by `<grub/term.h>'.

	* term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
	(keyboard_map): Correct/add a few values, with macros provided
	by `<grub/term.h>'.
	(keyboard_map_shift): Zero values that don't differ from their
	`keyboard_map' equivalents.
	(grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
	Discard the second scan code that is always sent by Caps lock.
	Only use `keyboard_map_shift' when it provides a non-zero value,
	otherwise fallback to `keyboard_map'.

2008-02-04  Bean  <bean123ch@gmail.com>

	* Makefile.in (enable_grub_fstest): New variable.

	* conf/common.rmk (grub_fstest_init.lst): New rule.
	(grub_fstest_init.h): Likewise.
	(grub_fstest_init.c): Likewise.
	(util/grub-fstest.c_DEPENDENCIES): New variable.
	(grub_fstest_SOURCES): Likewise.

	* configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.

	* util/grub-fstest.c: New file.

2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>

	Make grub-setup handle a separate root device.

	* util/i386/pc/grub-setup.c (setup): Always open the root device,
	so that the root device can be compared with the destination
	device.
	When embedding the core image, if the root and destination devices
	are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
	0xFF.
	When not embedding, set ROOT_DRIVE to 0xFF.

2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>

	Add support for having a grub directory in a different drive. This
	is still only the data handling part.

	* kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
	(codestart): Save %dh in GRUB_ROOT_DRIVE.
	(grub_root_drive): New variable.

	* kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
	instead of GRUB_BOOT_DRIVE to construct a device name. Set
	GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
	as it was.

	* include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.

	* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
	macro.
	(GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.

	* boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
	is bogus, because PXE booting does not specify any drive
	correctly.

	* boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
	am not sure if this is really correct.

	* boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
	is always identical to the boot drive when booting from a CD.

	* boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
	longer.
	(root_drive): New variable.
	(real_start): Unconditionally set %dh to ROOT_DRIVE.
	(setup_sectors): Push %dx right after popping it, because %dh will
	be modified later.
	(copy_buffer): Restore %dx.

2008-02-03  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
	use `cdboot.img' for cdrom images.

2008-02-03  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Issue scripting commands for GRUB to
	only setup gfxterm when `font' command has succeeded.

2008-02-03  Robert Millan  <rmh@aybabtu.com>

	* loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
	(grub_rescue_cmd_multiboot_loader)
	(grub_rescue_cmd_module_loader): Enable multiboot1 calls.

2008-02-03  Pavel Roskin  <proski@gnu.org>

	* kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
	%edx and %esi from stack only after grub_gate_a20() is called.
	grub_gate_a20() clobbers %edx.

2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac (AC_INIT): Bumped to 1.96.

	* DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
	commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
	include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
	video/readers/png.c.

2008-02-03  Bean  <bean123ch@gmail.com>

	* conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
	(cdboot_img_SOURCES): New variable.
	(cdboot_img_ASFLAGS): New variable.
	(cdboot_img_LDFLAGS): New variable.

	* boot/i386/pc/cdboot.S: New file.

	* disk/i386/pc/biosdisk.c (cd_start): New variable.
	(cd_count): Likewise.
	(grub_biosdisk_get_drive): Add support for cd device.
	(grub_biosdisk_call_hook): Likewise.
	(grub_biosdisk_iterate): Likewise.
	(grub_biosdisk_open): Likewise.
	(GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
	(grub_biosdisk_rw): Support reading from cd device.
	(GRUB_MOD_INIT): Iterate cd devices.

	* include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
	(GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
	(GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.

	* kern/i386/pc/init.c (make_install_device): Check for cd device.

2008-02-02  Robert Millan  <rmh@aybabtu.com>

	* commands/read.c: New file.
	* conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
	(read_mod_SOURCES): New variable.
	(read_mod_CFLAGS): Likewise.
	(read_mod_LDFLAGS): Likewise.

2008-02-02  Robert Millan  <rmh@aybabtu.com>

	* normal/main.c (grub_normal_execute): Check for `menu->size' when
	determining whether menu has to be displayed.

2008-02-02  Marco Gerards  <marco@gnu.org>

	* bus/pci.c: New file.

	* include/grub/pci.h: Likewise.

	* include/grub/i386/pc/pci.h: Likewise.

	* commands/lspci.c: Likewise.

	* conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
	`lspci.mod'.
	(pci_mod_SOURCES): New variable.
	(pci_mod_CFLAGS): Likewise.
	(pci_mod_LDFLAGS): Likewise.
	(lspci_mod_SOURCES): Likewise.
	(lspci_mod_CFLAGS): Likewise.
	(lspci_mod_LDFLAGS): Likewise.

2008-02-02  Bean  <bean123ch@gmail.com>

	* fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
	(grub_ufs_get_file_block): Fix indirect block calculation problem.

	* fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
	(grub_xfs_btree_node): New structure.
	(grub_xfs_btree_root): New structure.
	(grub_xfs_inode): New members nblocks, extsize, nextents and btree.
	(GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
	(GRUB_XFS_EXTENT_BLOCK): Likewise.
	(GRUB_XFS_EXTENT_SIZE): Likewise.
	(grub_xfs_read_block): Support btree format type.
	(grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
	Use directory block as basic unit.

	* fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.

	* aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
	__attribute__ ((__regparm__ (1))).

2008-02-01  Robert Millan  <rmh@aybabtu.com>

	Correct a mistake in previous commit.

	* conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
	top.
	(normal/command.c_DEPENDENCIES): New variable.

2008-02-01  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
	top.
	(normal/command.c_DEPENDENCIES): New variable.
	(grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	(grub_emu_SOURCES): Add `fs/fshelp.c'.

	* genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.

2008-02-01  Robert Millan  <rmh@aybabtu.com>

	* kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
	call at beginning of function.

2008-01-31  Pavel Roskin  <proski@gnu.org>

	* util/powerpc/ieee1275/grub-mkrescue.in: New file.
	* conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
	(grub_mkrescue_SOURCES): Likewise.
	* DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.

2008-01-30  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
	(util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
	* conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
	(grub_probe_SOURCES): ... to here.

	* conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
	(util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.

2008-01-30  Tristan Gingold  <gingold@free.fr>

	* kern/rescue.c: Silently accept empty lines.

2008-01-29  Bean  <bean123ch@gmail.com>

	* boot/i386/pc/lnxboot.S (data_start): Code cleanup.
	(real_code_2): Code cleanup and change comment style.
	(move_memory): Avoid using 32-bit address mode.

2008-01-29  Bean  <bean123ch@gmail.com>

	* conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
	(png_mod_SOURCES): New variable.
	(png_mod_CFLAGS): Likewise.
	(png_mod_LDFLAGS): Likewise.

	* video/readers/png.c: New file.

2008-01-28  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
	* kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
	`ifndef GRUB_MOD_GAP' hack.
	* util/elf/grub-mkimage.c (add_segments): Likewise.

2008-01-27  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
	`GRUB_MOD_GAP' for platforms in which it's not defined.
	* util/elf/grub-mkimage.c (add_segments): Likewise.

2008-01-27  Robert Millan  <rmh@aybabtu.com>

	Get grub-emu to build again (including parallel builds).

	* conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
	Split into ...
	(util/grub-emu.c_DEPENDENCIES): ... this, ...
	(normal/execute.c_DEPENDENCIES): ... this, ...
	(grub-emu_DEPENDENCIES): ... and this.

	* conf/i386-efi.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	(grub_emu_SOURCES): Remove duplicated `kern/file.c'.

2008-01-27  Robert Millan  <rmh@aybabtu.com>

	* NEWS: Add a few items.

2008-01-27  Robert Millan  <rmh@aybabtu.com>

	Fix parallel builds with grub-emu.  Based on earlier commit for
	grub-probe and grub-setup.

	* conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
	(util/grub-emu.c_DEPENDENCIES): ... this.
	* conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
	(util/grub-emu.c_DEPENDENCIES): ... this.
	* conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
	(util/grub-emu.c_DEPENDENCIES): ... this.
	* conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
	(util/grub-emu.c_DEPENDENCIES): ... this.
	* conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
	(util/grub-emu.c_DEPENDENCIES): ... this.

2008-01-27  Pavel Roskin  <proski@gnu.org>

	* include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
	to create a gap between _end and the modules added to the image
	with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
	* kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
	* util/elf/grub-mkimage.c (add_segments): Likewise.

2008-01-26  Pavel Roskin  <proski@gnu.org>

	* kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
	just return an error.

2008-01-26  Bean  <bean123ch@gmail.com>

	* fs/reiserfs.c (grub_fshelp_node): New member next_offset.
	(grub_reiserfs_get_item): Save offset of the next item.
	(grub_reiserfs_iterate_dir): Use next_offset to find next item.

2008-01-25  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
	make all filesystem sources appear together (possibly fixing omissions
	while at it).
	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
	add `kern/file.c'.
	* conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
	* conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
	* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.

	* util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
	(probe): Add a sanity check to make sure of our ability to read
	requested files when probing for filesystem type.

	* genmk.rb: Update copyright year (2007).

	* include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
	(grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
	(grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
	(grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
	(grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
	: Remove function prototypes.

2008-01-25  Robert Millan  <rmh@aybabtu.com>

	Revert my previous commits (based on wrong assumption of how grub_errno
	works).

	* kern/disk.c (grub_disk_open): Stop resetting grub_errno.
	* kern/file.c (grub_file_open): Likewise.

2008-01-24  Pavel Roskin  <proski@gnu.org>

	* include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
	that hang if GRUB tries to setup colors.
	* term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
	colors for firmwares that don't support it.
	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
	Recognize Open Hack'Ware, set flags to work around its
	limitations.

2008-01-24  Robert Millan  <rmh@aybabtu.com>

	* kern/file.c (grub_file_open): Do not account previous failures of
	unrelated functions when grub_errno is checked for.
	Reported by Oleg Strikov.

2008-01-24  Bean  <bean123ch@gmail.com>

	* fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
	(grub_ufs_sblock): New member volume name.
	(grub_ufs_find_file): Fix string copy bug.
	(grub_ufs_label): Implement this function properly.

	* fs/hfs.c (grub_hfs_cnid_type): New enum.
	(grub_hfs_iterate_records): Use the correct file number for extents
	and catalog file. Fix problem in next index calculation.
	(grub_hfs_find_node): Replace recursive function call with loop.
	(grub_hfs_iterate_dir): Replace recursive function call with loop.

2008-01-23  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
	`<grub/symbol.h>' and `<grub/multiboot.h>'.
	(grub_multiboot2_real_boot): New function prototype.

	* include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
	[!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.

	* kern/i386/ieee1275/init.c (grub_os_area_addr)
	(grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.

2008-01-23  Robert Millan  <rmh@aybabtu.com>

	* kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
	#ifdef'ed out grub_printf().

2008-01-23  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
	grub_dprintf calls, since they make "debug=all" mode unusable.
	(grub_console_checkkey): Likewise.

2008-01-23  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
	`term/i386/pc/at_keyboard.c'.
	(pkglib_MODULES): Add `serial.mod'.
	(serial_mod_SOURCES): New variable.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.

	* include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
	`<grub/powerpc/ieee1275/console.h>'.
	(grub_keyboard_controller_init): New function prototype.
	(grub_console_checkkey): Likewise.
	(grub_console_getkey): Likewise.

	* kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
	keyboard on i386.

	* term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
	grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.

2008-01-23  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/pc/init.c (make_install_device): When memdisk image is
	present, "(memdisk)/boot/grub" becomes the default prefix.

	* util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
	a memdisk tarball with all the modules.  Add --overlay=DIR option that
	allows users to overlay additional files into the image.

2008-01-23  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
	and `machine/memory.h'.
	(pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
	(_multiboot_mod_SOURCES): New variable.
	(_multiboot_mod_CFLAGS): Likewise.
	(_multiboot_mod_LDFLAGS): Likewise.
	(multiboot_mod_SOURCES): Likewise.
	(multiboot_mod_CFLAGS): Likewise.
	(multiboot_mod_LDFLAGS): Likewise.

	* include/grub/i386/ieee1275/loader.h: New file.

	* include/grub/i386/ieee1275/machine.h: Likewise.

	* include/grub/i386/ieee1275/memory.h: Likewise.

	* include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
	variable declaration.
	(grub_os_area_size): Likewise.

	* kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
	(grub_lower_mem, grub_upper_mem): New variables.
	(grub_stop_floppy): New function (just to make
	grub_multiboot2_real_boot() happy).

	* kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
	`<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
	(grub_stop): New function.
	Include `"../realmode.S"' and `"../loader.S"'.

	* loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
	Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.

	* loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
	rely on grub_multiboot2_real_boot() for final boot.

2008-01-22  Robert Millan  <rmh@aybabtu.com>

	* disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
	`GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
	device that doesn't look like an SD card.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
	`GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
	OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
	found.

2008-01-22  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
	avoid claiming over our own code.

2008-01-22  Bean  <bean123ch@gmail.com>

	* conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
	(jpeg_mod_SOURCES): New variable.
	(jpeg_mod_CFLAGS): Likewise.
	(jpeg_mod_LDFLAGS): Likewise.

	* video/readers/jpeg.c : New file.

2008-01-22  Bean  <bean123ch@gmail.com>

	* fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
	there are no more items.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* kern/mm.c (grub_mm_init_region): Improve debug message.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
	(kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
	address.
	(grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
	a C macro.
	* include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
	Indicates start of upper memory.
	* util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
	(generate_image): Abort when image size is big enough to corrupt
	upper memory.

	* include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
	(GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
	* term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
	instead of hardcoding 0xA0000.
	* video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
	(grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
	instead of hardcoding 0xA0000.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* disk/memdisk.c (memdisk_size): New variable.
	(grub_memdisk_open): Replace grub_arch_memdisk_size() call with
	`memdisk_size'.
	(grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
	image to dynamic memory.
	(grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
	`memdisk_size'.  Free memdisk block.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	Fix detection of very small filesystems (like tar).

	* fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
	contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
	GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
	a problem with this disk).

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
	on grub_biosdisk_rw_standard() error.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
	recent changes.
	* kern/elf.c: Likewise.
	* kern/ieee1275/ieee1275.c: Likewise.
	* kern/powerpc/ieee1275/openfw.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.

	* include/grub/kernel.h (grub_arch_memdisk_addr)
	(grub_arch_memdisk_size): Moved from here ...

	* include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
	(grub_arch_memdisk_size): ... to here.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	Mostly based on bugfix from Bean.

	* kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
	attribute with hook() parameter.
	(grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
	declaration.
	(grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
	attribute with hook() parameter.
	(grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
	declaration.

2008-01-21  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
	(pkglib_MODULES): Add `memdisk.mod'.
	(memdisk_mod_SOURCES): New variable.
	(memdisk_mod_CFLAGS): Likewise.
	(memdisk_mod_LDFLAGS): Likewise.

	* disk/memdisk.c: New file.

	* include/grub/disk.h (grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_MEMDISK_ID'.

	* include/grub/i386/pc/kernel.h
	(GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
	(GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
	(grub_kernel_image_size): New variable declaration.
	(grub_total_module_size): Likewise.
	(grub_memdisk_image_size): Likewise.

	* include/grub/i386/pc/memory.h
	(GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.

	* include/grub/kernel.h: Include `<grub/symbol.h>'.
	(grub_arch_memdisk_addr): New variable declaration.
	(grub_arch_memdisk_size): Likewise.

	* kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
	(grub_arch_memdisk_size): Likewise.

	* kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
	(codestart): Replace hardcoded `0x100000' with
	`GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.

	* util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
	(generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
	not NULL, append the contents of the file it refers to, at the end of
	the compressed kernel image.  Initialize `grub_memdisk_image_size'
	variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
	(options): Add "memdisk"|'m' option.
	(main): Parse --memdisk|-m option, and pass user-provided path as
	parameter to generate_image().

2008-01-20  Robert Millan  <rmh@aybabtu.com>

	* kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
	grub_dprintf() calls from here ...
	* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.

2008-01-20  Robert Millan  <rmh@aybabtu.com>

	Fix detection of "real mode" when /options/real-mode? doesn't exist.

	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
	declaration.
	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
	(grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
	`GRUB_IEEE1275_FLAG_REAL_MODE'.
	(cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
	property).
	* kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
	`grub_ieee1275_mmu' rather than obtaining a handler on every call.

2008-01-19  Robert Millan  <rmh@aybabtu.com>

	Get rid of confusing function (superseded by
	`grub_ieee1275_get_integer_property')
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
	prototype.
	* kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
	function.
	* term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
	grub_ieee1275_decode_int_4(), by obtaining integer properties directly
	in native endianness from grub_ieee1275_get_integer_property().

2008-01-19  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
	command after "shut-down", since implementations differ on which
	the command for halt is.

2008-01-19  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/linuxbios/console.h: Add header protection.
	(grub_keyboard_controller_init): New function prototype.
	* term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
	(KEYBOARD_COMMAND_READ): Likewise.
	(KEYBOARD_COMMAND_WRITE): Likewise.
	(KEYBOARD_SCANCODE_SET1): Likewise.
	(grub_keyboard_controller_write): New function.
	(grub_keyboard_controller_read): Likewise.
	(grub_keyboard_controller_init): Likewise.

	* term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
	(grub_console_init): On coreboot/LinuxBIOS, call
	grub_keyboard_controller_init().

2008-01-19  Robert Millan  <rmh@aybabtu.com>

	PowerPC changes provided by Pavel Roskin.

	* kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
	* kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
	don't rely on cmain() doing it.
	* kern/i386/ieee1275/startup.S (_start): Store %eax in
	grub_ieee1275_entry_fn, don't rely on cmain() doing it.

2008-01-16  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/linuxbios/memory.h
	(GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
	* kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
	receive `table_header' as argument.  Instead, probe for it in the
	known memory ranges where it can be present.
	(grub_available_iterate): Do not pass a fixed `table_header' address
	to grub_linuxbios_table_iterate().

2008-01-15  Robert Millan  <rmh@aybabtu.com>

	* configure.ac: Add `i386-ieee1275' to the list of supported targets.
	* conf/i386-ieee1275.rmk: New file.
	* include/grub/i386/ieee1275/console.h: Likewise.
	* include/grub/i386/ieee1275/ieee1275.h: Likewise.
	* include/grub/i386/ieee1275/kernel.h: Likewise.
	* include/grub/i386/ieee1275/time.h: Likewise.
	* kern/i386/ieee1275/init.c: Likewise.
	* kern/i386/ieee1275/startup.S: Likewise.

2008-01-15  Robert Millan  <rmh@aybabtu.com>

	* kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
	when pointers are 32-bit (but still do set it to one when they are
	64-bit).

2008-01-15  Robert Millan  <rmh@aybabtu.com>

	* include/grub/ieee1275/ieee1275.h
	(grub_ieee1275_get_integer_property): New function prototype.

	* kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
	(grub_ieee1275_get_integer_property): New function.  Wraps around
	grub_ieee1275_get_property() to handle endianness.

	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
	grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
	where appropriate.
	* kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
	(grub_map): Likewise.
	* kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.

2008-01-15  Bean  <bean123ch@gmail.com>

	* normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
	(grub_script_execute_cmdline): Reset grub_errno.

	* normal/main.c (read_config_file): Reset grub_errno.

	* normal/parse.y (script_init): New.
	(script): Move function and menuentry here.
	(delimiter): New.
	(command): Add delimiter at the end of command.
	(commands): Adjust to match the new command.
	(commandblock): Remove grub_script_lexer_record_start.
	(menuentry): Add grub_script_lexer_record_start, use the new commands.
	(if): Use the new commands.

	* conf/common.rmk (pkgdata_MODULES): Add echo.mod.

2008-01-15  Robert Millan  <rmh@aybabtu.com>

	* normal/menu.c (run_menu): Move timeout message from here ...
	(print_timeout): ... to here.
	(run_menu): Use print_timeout() once during initial draw to print
	the whole message, and again in every clock tick to update only
	the number of seconds.

2008-01-15  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
	actual size of `available' from grub_ieee1275_get_property(), and
	restrict parsing to that bound.

2008-01-15  Christian Franke  <franke@computer.org>

	* util/grub-emu.c: Replace <argp.h> by <getopt.h>.
	(argp_program_version): Remove variable.
	(argp_program_bug_address): Likewise.
	(options): Convert from struct argp_option to struct option.
	(struct arguments): Remove.
	(parse_opt): Remove.
	(usage): New function.
	(main): Replace struct args members by simple variables.
	Replace argp_parse() by getopt_long().
	Add switch to evaluate options.
	Add missing "(...)" around root_dev in prefix string.

2008-01-14  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
	for grub_ieee1275_exit(), in order to improve portability.

2008-01-14  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in (prefix): Define.
	(exec_prefix): Likewise.  Both definitions are later used by `libdir'.

2008-01-13  Pavel Roskin  <proski@gnu.org>

	* disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
	grub_errno if no errors have been detected.

2008-01-12  Robert Millan  <rmh@aybabtu.com>

	* include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
	(grub_util_get_dev_abstraction): New function prototype.

	* util/getroot.c: Include `<grub/util/getroot.h>'
	(grub_util_get_grub_dev): Move detection of abstraction type to ...
	(grub_util_get_dev_abstraction): ... here (new function).

	* util/grub-probe.c: Convert PRINT_* to an enum.  Add
	`PRINT_ABSTRACTION'.
	(probe): Probe for abstraction type when requested.
	(main): Understand `--target=abstraction'.

	* util/i386/efi/grub-install.in: Add abstraction module to core
	image when it is found to be necessary.
	* util/i386/pc/grub-install.in: Likewise.
	* util/powerpc/ieee1275/grub-install.in: Likewise.

	* util/update-grub_lib.in (font_path): Return system path without
	converting to GRUB path.
	* util/update-grub.in: Convert system path returned by font_path()
	to a GRUB path.  Use `grub-probe -t abstraction' to determine what
	abstraction module is needed for loading fonts (if any).  Export
	that as `GRUB_PRELOAD_MODULES'.
	* util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
	insmod commands).

2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>

	Remove some unused code from reiserfs.

	* fs/reiserfs.c (struct grub_reiserfs_key)
	[GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
	(struct grub_reiserfs_node_body): Removed.
	(grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
	Likewise.
	(grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
	Likewise.
	(grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
	Likewise.
	(grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
	Likewise.
	(grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
	Likewise.
	(grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
	Likewise.
	(grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
	(grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
	(grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.

2008-01-10  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (grub_file_is_not_garbage): New function.
	Determines if a file is garbage left by packaging systems, etc.
	* util/update-grub.in: Use grub_file_is_not_garbage() as a condition
	for processing /etc/grub.d scripts.
	* util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
	* util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
	as a condition for processing Linux images.

2008-01-10  Pavel Roskin  <proski@gnu.org>

	* include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
	to compile reiserfs.c on PowerPC.

2008-01-10  Robert Millan  <rmh@aybabtu.com>

	* kern/device.c (grub_device_iterate): Do not abort device iteration
	when one of the devices cannot be opened.
	* kern/disk.c (grub_disk_open): Do not account previous failures of
	unrelated functions when grub_errno is checked for.

2008-01-08  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
	`! grub_linux_is_bzimage', change order of address comparison to make
	it more intuitive, and improve "too big zImage" error message.

2008-01-08  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
	`$(update-grub_DATA)'.
	(distcheck): Fix race condition when invoking `$(MAKE)' on multiple
	targets.

2008-01-07  Robert Millan  <rmh@aybabtu.com>

	* boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
	which instruction is modified by grub-setup during installation
	(since it wasn't obvious by only looking at this file).

2008-01-07  Robert Millan  <rmh@aybabtu.com>

	* TODO: Rewrite.  Just refer to the wiki and the BTS instead of
	listing actual TODO items.

2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
	correctly.
	(grub_reiserfs_get_key_offset): Likewise.
	(grub_reiserfs_set_key_offset): Likewise.
	(grub_reiserfs_set_key_type): Likewise.
	(grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.

	(GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
	better to remove the bitfield version completely.

2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
	allocated from the heap, due to the fshelp implementation.
	(grub_reiserfs_dir): Free NODE, due to the same reason.

2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>

	Mostly from Vincent Pelletier:

	* fs/reiserfs.c: New file.

	* conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
	(reiserfs_mod_SOURCES): New variable.
	(reiserfs_mod_CFLAGS): Likewise.
	(reiserfs_mod_LDFLAGS): Likewise.

	* DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
	disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
	include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
	normal/color.c.

2008-01-06  Robert Millan  <rmh@aybabtu.com>

	* normal/color.c: Remove `<grub/env.h>'.

2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>

	* include/grub/normal.h: Include <grub/env.h>.

2008-01-05  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
	usage example with `(hd0,1)'.
	Reported by Samuel Thibault.

2008-01-05  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/loader.S (grub_linux_is_bzimage): New variable.
	(grub_linux_boot_zimage): Rename to ...
	(grub_linux_boot): ... this.
	(grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
	(grub_linux_boot_zimage): Conditionalize zImage copy.

	* include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
	(grub_linux_boot_bzimage): Remove prototype.
	(grub_linux_boot_zimage): Rename to ...
	(grub_linux_boot): ... this.

	* loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
	(grub_linux_boot): Remove function.

2008-01-05  Robert Millan  <rmh@aybabtu.com>

	* include/grub/normal.h (grub_env_write_color_normal): New prototype.
	(grub_env_write_color_highlight): Likewise.
	(grub_wait_after_message): Likewise.

	* normal/color.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
	(normal_mod_DEPENDENCIES): Likewise.

	* normal/menu_entry.c (run): Rely on grub_wait_after_message()
	for waiting after a message is printed.
	* normal/main.c (read_config_file): Likewise.
	(grub_normal_init): Register grub_env_write_color_normal() and
	grub_env_write_color_highlight() hooks.  Mark `color_normal' and
	`color_highlight' variables as global.

	* normal/menu.c (grub_wait_after_message): New function.
	(grub_color_menu_normal): New variable.  Replaces ...
	(GRUB_COLOR_MENU_NORMAL): ... this macro.
	(grub_color_menu_highlight): New variable.  Replaces ...
	(GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
	(draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
	`GRUB_TERM_COLOR_STANDARD'.
	(print_message): Use `grub_setcolorstate' to reload colors.  Rename
	`normal_code' and `highlight_code' to `old_color_normal' and
	`old_color_highlight', respectively.
	(grub_menu_init_page): Update colors when drawing the menu, based on
	`menu_color_normal' and `menu_color_highlight' variables.
	(grub_menu_run): Rely on grub_wait_after_message() for waiting after
	a message is printed.

2008-01-05  Robert Millan  <rmh@aybabtu.com>

	* kern/env.c (grub_env_context_open): Propagate hooks for global
	variables to new context.

	* kern/main.c (grub_set_root_dev): Export `root' variable.

2008-01-05  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
	discs unconditionally, since udev and others have options to provide
	them.

2008-01-05  Robert Millan  <rmh@aybabtu.com>

	* normal/completion.c (iterate_dir): Skip `.' and `..' directories.

2008-01-04  Christian Franke  <franke@computer.org>

	* kern/i386/pc/init.c (grub_machine_init): Fix evaluation
	of eisa_mmap.

2008-01-03  Pavel Roskin  <proski@gnu.org>

	* kern/i386/linuxbios/init.c: Put "void" to all function
	declarations with no arguments.
	* kern/powerpc/ieee1275/init.c: Likewise.
	* term/i386/pc/at_keyboard.c: Likewise.
	* term/i386/pc/vga_text.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.

2008-01-02  Robert Millan  <rmh@aybabtu.com>

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
	message when loaded image is out of bounds.
	(grub_multiboot_load_elf64): Likewise.

2008-01-02  Pavel Roskin  <proski@gnu.org>

	* util/grub.d/10_linux.in: Try version without ".old" when
	looking for initrd.  It's better to use initrd from the newer
	kernel of the same version than no initrd at all.

2008-01-01  Robert Millan  <rmh@aybabtu.com>

	* util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.

2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>

	* include/grub/video.h: Added grub_video_unmap_color and
	grub_video_get_active_render_target.
	(grub_video_adapter): Added unmap_color and get_active_render_target.

	* video/video.c: Added grub_video_unmap_color and
	grub_video_get_active_render_target.
	(grub_video_get_info): Changed method to accept NULL pointer as an
	argument to allow detection of active video adapter.

	* video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
	grub_video_vbe_unmap_color_int.
	Added grub_video_vbe_unmap_color and
	grub_video_vbe_get_active_render_target.
	(grub_video_vbe_adapter): Added unmap_color and
	get_active_render_target.

	* video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
	with grub_video_vbe_unmap_color_int.

	* term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
	(DEFAULT_NORMAL_COLOR): Likewise.
	(DEFAULT_HIGHLIGHT_COLOR) Likewise.
	(DEFAULT_FG_COLOR): Removed.
	(DEFAULT_BG_COLOR): Likewise.
	(DEFAULT_CURSOR_COLOR): Changed value.
	(grub_virtual_screen): Added standard_color_setting,
	normal_color_setting, highlight_color_setting and term_color.
	(grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
	(bitmap_width): Added.
	(bitmap_height): Likewise.
	(bitmap): Likewise.
	(set_term_color): Likewise.
	(grub_virtual_screen_setup): Changed to use new terminal coloring
	settings.
	(grub_gfxterm_init): Added init for bitmap.
	(grub_gfxterm_fini): Added destroy for bitmap.
	(redraw_screen_rect): Updated to use background bitmap and new
	terminal coloring.
	(scroll_up): Added optimization for case when there is no bitmap.
	(grub_gfxterm_cls): Fixed to use correct background color.
	(grub_virtual_screen_setcolorstate): Changed to use new terminal
	coloring.
	(grub_virtual_screen_setcolor): Likewise.
	(grub_virtual_screen_getcolor): Added.
	(grub_gfxterm_background_image_cmd): Likewise.
	(grub_video_term): Added setcolor and getcolor.
	(MOD_INIT): Added registration of background_image command.
	(MOD_TERM): Added unregistration for background_image command.

2007-12-30  Pavel Roskin  <proski@gnu.org>

	* loader/multiboot_loader.c: Fix multiboot command
	unregistration.  Fix all typos in the word "multiboot".

2007-12-29  Pavel Roskin  <proski@gnu.org>

	* util/grub.d/10_linux.in: Refactor search for initrd.  Add
	support for initrd names used in Fedora.

2007-12-26  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
	(cpio_mod_SOURCES): New variable.
	(cpio_mod_CFLAGS): Likewise.
	(cpio_mod_LDFLAGS): Likewise.

	* fs/cpio.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

2007-12-25  Robert Millan  <rmh@aybabtu.com>

	* include/grub/term.h (struct grub_term): Add `getcolor' function.
	(grub_getcolor): New function.

	* kern/term.c (grub_getcolor): New function.
	* normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
	(GRUB_COLOR_MENU_HIGHLIGHT): New macro.
	(print_entry): Set normal and highlight colors to
	`GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
	respectively, before printing and restore them to old
	values afterwards.
	(grub_menu_init_page): Likewise.  Fill an additional colored space
	that would otherwise be left blank.

	* term/efi/console.c (grub_console_getcolor): New function.
	(struct grub_console_term.getcolor): New variable.
	* term/i386/pc/console.c (grub_console_getcolor): New function.
	(struct grub_console_term.getcolor): New variable.
	* term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
	(struct grub_console_term.getcolor): New variable.

	* term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
	(struct grub_console_term.setcolor): Remove variable.
	* term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
	(struct grub_console_term.setcolor): Remove variable.
	* term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
	(struct grub_console_term.setcolor): Remove variable.
	* term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
	(struct grub_console_term.setcolor): Remove variable.

2007-12-25  Robert Millan  <rmh@aybabtu.com>

	* configure.ac: Search for possible unifont.hex locations, and
	define UNIFONT_HEX if found.

	* Makefile.in (UNIFONT_HEX): Define variable.
	(DATA): Rename to ...
	(PKGLIB): ... this.  Update all users.
	(PKGDATA): New variable.
	(pkgdata_IMAGES): Rename to ...
	(pkglib_IMAGES): ... this. Update all users.
	(pkgdata_MODULES): Rename to ...
	(pkglib_MODULES): ... this. Update all users.
	(pkgdata_PROGRAMS): Rename to ...
	(pkglib_PROGRAMS): ... this. Update all users.
	(pkgdata_DATA): Rename to ...
	(pkglib_DATA): ... this. Update all users.
	(CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
	(unicode.pff, ascii.pff): New rules.
	(all-local): Add `$(PKGDATA)' dependency.
	(install-local): Process `$(PKGDATA)'.

	* util/update-grub_lib.in (font_path): Search for *.pff files in
	a few more locations, including `${pkgdata}'.

2007-12-23  Robert Millan  <rmh@aybabtu.com>

	Patch from Bean  <bean123ch@gmail.com>:
	* disk/loopback.c (grub_loopback_read): Add missing bit shift to
	`size'.

2007-12-21  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
	(ntfscomp_mod_SOURCES): New variable.
	(ntfscomp_mod_CFLAGS): Likewise.
	(ntfscomp_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
	(grub_probe_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
	(grub_emu_SOURCES): Likewise.

	* fs/ntfs.c (grub_ntfscomp_func): New variable.
	(read_run_list): Renamed to grub_ntfs_read_run_list.
	(decomp_nextvcn): Moved to ntfscomp.c.
	(decomp_getch): Likewise.
	(decomp_get16): Likewise.
	(decomp_block): Likewise.
	(read_block): Likewise.
	(read_data): Partially moved to ntfscomp.c.
	(fixup): Change unsigned to grub_uint16_t.
	(read_mft): Change unsigned long to grub_uint32_t.
	(read_attr): Likewise.
	(read_data): Likewise.
	(read_run_data): Likewise.
	(read_run_list): Likewise.
	(read_mft): Likewise.

	* fs/ntfscomp.c: New file.

	* include/grub/ntfs.h: New file.

2007-12-16  Robert Millan  <rmh@aybabtu.com>

	* util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
	IDE disk check, since Linux is known to support 20 IDE disks.
	Reported by Colin Watson.

2007-12-15  Bean  <bean123ch@gmail.com>

	* conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
	(lnxboot_img_SOURCES): New variable.
	(lnxboot_img_ASFLAGS): Likewise.
	(lnxboot_img_LDFLAGS): Likewise.

	* boot/i386/pc/lnxboot.S: New file.

2007-11-24  Pavel Roskin  <proski@gnu.org>

	* configure.ac: Test if '--build-id=none' is supported by the
	linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
	objcopy to generate incorrect binary files (binutils
	2.17.50.0.18-1 as shipped by Fedora 8).
	* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
	linking, so that build ID doesn't break the test.

2007-11-24  Pavel Roskin  <proski@gnu.org>

	* include/grub/i386/time.h: use "void" in the argument list
	of grub_cpu_idle().
	* include/grub/powerpc/time.h: Likewise.
	* include/grub/sparc64/time.h: Likewise.

2007-11-18  Christian Franke  <franke@computer.org>

	* util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
	now return control chars instead of GRUB_CONSOLE_KEY_* constants.
	This fixes the problem that function keys did not work in grub-emu.

2007-11-18  Christian Franke  <franke@computer.org>

	* disk/host.c (grub_host_open): Remove attribute unused from
	name parameter. Add check for "host". This fixes the problem
	that grub-emu does not find partitions.

2007-11-18  Christian Franke  <franke@computer.org>

	* util/hostfs.c (is_dir): New function.
	(grub_hostfs_dir):  Handle missing dirent.d_type case.
	(grub_hostfs_read): Add missing fseek().
	(grub_hostfs_label): Clear label pointer.  This fixes a crash
	of grub-emu on "ls (host)".

2007-11-18  Christian Franke  <franke@computer.org>

	* include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
	Add attribute packed, gcc 3.4.4 on Cygwin aligns this
	to 64 bit boundary by default.

2007-11-18  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
	(hexdump_mod_SOURCES): New variable.
	(hexdump_mod_CFLAGS): Likewise.
	(hexdump_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.

	* include/grub/hexdump.h: New file.

	* commands/hexdump.c: New file.

2007-11-10  Robert Millan  <rmh@aybabtu.com>

	* commands/i386/pc/play.c (beep_off): Switch order of arguments
	in grub_outb() calls.
	(beep_on): Likewise.

2007-11-10  Christian Franke  <franke@computer.org>

	* normal/menu.c (run_menu): Check for empty menu to avoid crash.
	(grub_menu_run): Likewise.

2007-11-10  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/efi/machine.h: New file.
	* include/grub/i386/linuxbios/machine.h: Likewise.
	* include/grub/i386/pc/machine.h: Likewise.
	* include/grub/powerpc/ieee1275/machine.h: Likewise.
	* include/grub/sparc64/ieee1275/machine.h: Likewise.

	* term/i386/pc/serial.c: Include <grub/machine/machine.h>.
	(serial_hw_io_addr): New variable.
	(serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
	instead of `(unsigned short *) 0x400'.

2007-11-10  Bean  <bean123ch@gmail.com>

	* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.

2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>

	* conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
	(vga_mod_SOURCES): Added.
	(vga_mod_CFLAGS): Likewise.
	(vga_mod_LDFLAGS): Likewise.

	* term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
	grub_outb() calls.
	(set_map_mask): Likewise.
	(set_read_map): Likewise.
	(set_read_address): Likewise.
	(vga_font): Removed variable.
	(get_vga_glyph): Removed function.
	(invalidate_char): Likewise.
	(write_char): Changed to use grub_font_get_glyph() for font
	information.
	(grub_vga_putchar): Likewise.
	(grub_vga_getcharwidth): Likewise.

2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>

	* conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
	flags.
	(pxeboot_img_LDFLAGS): Likewise.
	(diskboot_img_LDFLAGS): Likewise.
	(kernel_img_LDFLAGS): Likewise.

2007-11-06  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
	in grub_outb() calls.
	(serial_hw_init): Likewise.

2007-11-05  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Allow files in ${update_grub_dir} to contain
	spaces.  Skip non-regular files.

2007-11-05  Robert Millan  <rmh@aybabtu.com>

	* kern/disk.c (grub_disk_firmware_fini)
	(grub_disk_firmware_is_tainted): New variables.

	* include/grub/disk.h (grub_disk_firmware_fini)
	(grub_disk_firmware_is_tainted): Likewise.

	* disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
	(grub_disk_biosdisk_fini): ... to here.
	(GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
	(GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
	is set.  Register grub_disk_biosdisk_fini() in
	`grub_disk_firmware_fini'.

	* disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
	(GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
	Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
	to finish existing firmware disk interface.

	* conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
	(ata_mod_SOURCES): New variable.
	(ata_mod_CFLAGS): Likewise.
	(ata_mod_LDFLAGS): Likewise.

2007-11-05  Robert Millan  <rmh@aybabtu.com>

	* disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
	(grub_ata_wait): Reimplement using grub_millisleep().

	* include/grub/misc.h (grub_div_roundup): Fix parenthesization.
	* include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.

2007-11-03  Marco Gerards  <marco@gnu.org>

	* term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
	(CRTC_ADDR_PORT): New macro.
	(CRTC_DATA_PORT): Likewise.
	(CRTC_CURSOR): Likewise.
	(CRTC_CURSOR_ADDR_HIGH): Likewise.
	(CRTC_CURSOR_ADDR_LOW): Likewise.
	(update_cursor): New function.
	(grub_console_real_putchar): Call `update_cursor'.
	(grub_console_gotoxy): Likewise.
	(grub_console_cls): Set the default color when clearing the
	screen.
	(grub_console_setcursor): Implemented.

2007-11-03  Marco Gerards  <marco@gnu.org>

	* disk/ata.c (grub_ata_pio_read): Don't wait for the command to
	become activate.
	(grub_ata_pio_write): Likewise.

	(grub_atapi_identify): Wait after issuing an ATA command.
	(grub_atapi_packet): Likewise.
	(grub_ata_identify): Likewise.
	(grub_ata_readwrite): Likewise.

2007-11-03  Marco Gerards  <marco@gnu.org>

	* disk/ata.c (grub_ata_pio_read): Detect and return the error code.
	(grub_ata_pio_write): Likewise.
	(grub_ata_readwrite): Use `grub_error', instead of
	returning `grub_errno'.

2007-11-03  Marco Gerards  <marco@gnu.org>

	* disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
	grub_ata_pio_write once for every single sector, instead of for
	multiple sectors.

2007-10-31  Robert Millan  <rmh@aybabtu.com>

	* configure.ac: Add `i386-linuxbios' to the list of supported targets.

	* conf/i386-linuxbios.rmk: New file.

	* kern/i386/pc/hardware.c: Likewise.
	* term/i386/pc/at_keyboard.c: Likewise.
	* term/i386/pc/vga_text.c: Likewise.

	* include/grub/i386/linuxbios/boot.h: Likewise.
	* include/grub/i386/linuxbios/console.h: Likewise.
	* include/grub/i386/linuxbios/init.h: Likewise.
	* include/grub/i386/linuxbios/kernel.h: Likewise.
	* include/grub/i386/linuxbios/loader.h: Likewise.
	* include/grub/i386/linuxbios/memory.h: Likewise.
	* include/grub/i386/linuxbios/serial.h: Likewise.
	* include/grub/i386/linuxbios/time.h: Likewise.

	* kern/i386/linuxbios/init.c: Likewise.
	* kern/i386/linuxbios/startup.S: Likewise.
	* kern/i386/linuxbios/table.c: Likewise.

2007-10-31  Marco Gerards  <marco@gnu.org>

	* conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
	(ata_mod_SOURCES): New variable.
	(ata_mod_CFLAGS): Likewise.
	(ata_mod_LDFLAGS): Likewise.

	* disk/ata.c: New file.

	* include/grub/disk.h (grub_disk_dev_id): Add
	`GRUB_DISK_DEV_ATA_ID'.

2007-10-31  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
	* include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.

	* include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
	* include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.

	* include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
	`<grub/types.h>'.

	* loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.

2007-10-27  Robert Millan  <rmh@aybabtu.com>

	* include/grub/types.h (ULONG_MAX): Define macro.

2007-10-22  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
	`"../realmode.S"'.
	Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.

2007-10-22  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
	(pkgdata_MODULES): Add `biosdisk.mod'.
	(biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
	variables.

	* disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
	(grub_biosdisk_init): Replace with ...
	(GRUB_MOD_INIT(biosdisk)): ... this.
	(grub_biosdisk_fini): Replace with ...
	(GRUB_MOD_FINI(biosdisk)): ... this.

	* kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
	(grub_machine_init): Remove call to grub_biosdisk_init().
	(grub_machine_fini): Remove call to grub_machine_fini().

	* util/i386/pc/grub-install.in (modules): Add `biosdisk'.

2007-10-22  Robert Millan  <rmh@aybabtu.com>

	* include/grub/time.h: New file.
	* include/grub/i386/time.h: Likewise.
	* include/grub/powerpc/time.h: Likewise.
	* include/grub/sparc64/time.h: Likewise.

	* include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.
	* include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
	instances to ...
	(KERNEL_MACHINE_TIME_HEADER): ... this.

	* kern/i386/efi/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/i386/pc/init.c: Include `<grub/time.h>'.
	(grub_millisleep): New function.
	* kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.
	* kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
	Remove `grub/machine/time.h' include.
	(grub_millisleep): New function.

	* include/grub/misc.h (grub_div_roundup): New function.

	* kern/misc.c: Include `<grub/time.h>'.
	(grub_millisleep_generic): New function.

	* conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
	Add `time.h'.
	* conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
	Add `time.h'.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
	`machine/time.h'.  Add `time.h'.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.

2007-10-21  Robert Millan  <rmh@aybabtu.com>

	* include/grub/misc.h (grub_max): New function.

2007-10-21  Robert Millan  <rmh@aybabtu.com>

	* util/misc.c (grub_util_info): Call fflush() before returning.

2007-10-20  Robert Millan  <rmh@aybabtu.com>

	* genmk.rb (Image): Copy `extra_flags' from here ...
	(PModule): ... to here.  Use it in `#{obj}: #{src}' rule.

	* commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
	to `argc' and `args' arguments.

2007-10-17  Robert Millan  <rmh@aybabtu.com>

	* kern/i386/loader.S: New file.

	* kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
	* kern/i386/loader.S (grub_linux_prot_size)... to here.
	* kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
	* kern/i386/loader.S (grub_linux_tmp_addr)... to here.
	* kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
	* kern/i386/loader.S (grub_linux_real_addr)... to here.
	* kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
	* kern/i386/loader.S (grub_linux_boot_zimage)... to here.
	* kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
	* kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
	* kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
	* kern/i386/loader.S (grub_multiboot_real_boot)... to here.
	* kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
	* kern/i386/loader.S (grub_multiboot2_real_boot)... to here.

	* kern/i386/realmode.S: New file.

	* kern/i386/pc/startup.S (protstack): Moved from here ...
	* kern/i386/realmode.S (protstack)... to here.
	* kern/i386/pc/startup.S (gdt): Moved from here ...
	* kern/i386/realmode.S (gdt)... to here.
	* kern/i386/pc/startup.S (prot_to_real): Moved from here ...
	* kern/i386/realmode.S (prot_to_real)... to here.

	* kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
	`kern/i386/realmode.S'.

2007-10-17  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/loader.h: New file.

	* include/grub/i386/pc/loader.h (grub_linux_prot_size)
	(grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
	(grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
	(grub_multiboot_real_boot, grub_multiboot2_real_boot)
	(grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
	* include/grub/i386/loader.h (grub_linux_prot_size)
	(grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
	(grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
	(grub_multiboot_real_boot, grub_multiboot2_real_boot)
	(grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.

	* include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.

2007-10-15  Robert Millan  <rmh@aybabtu.com>

	* normal/misc.c (grub_normal_print_device_info): Do not probe for
	filesystem when dev->disk is unset.
	Do probe for filesystem even when dev->disk->has_partitions is set.
	In case a filesystem is found, always report it.
	In case it isn't, if dev->disk->has_partitions is set, report that
	a partition table was found instead of reporting that no filesystem
	could be identified.

2007-10-12  Robert Millan  <rmh@aybabtu.com>

	* conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
	to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.

	* include/grub/types.h (grub_host_to_target16): New macro.
	(grub_host_to_target32): Likewise.
	(grub_host_to_target64): Likewise.
	(grub_target_to_host16): Likewise.
	(grub_target_to_host32): Likewise.
	(grub_target_to_host64): Likewise.

	* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
	Renamed from to ...
	(GRUB_MOD_ALIGN): ...this.  Update all users.

	* util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
	grub_host_to_target32.
	Replace grub_be_to_cpu32 with grub_target_to_host32.
	(load_modules): Likewise.
	(add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
	Replace grub_be_to_cpu32 with grub_target_to_host32.
	Replace grub_cpu_to_be16 with grub_host_to_target16.
	Replace grub_cpu_to_be32 grub_host_to_target32.

2007-10-12  Robert Millan  <rmh@aybabtu.com>

	* util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
	* util/elf/grub-mkimage.c: ... here.

	* DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
	`util/powerpc/ieee1275/grub-mkimage.c'.

2007-10-07  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
	and make it easier to figure out.
	Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
	(grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
	Do not avoid claiming a region above HEAP_MAX_ADDR if that would
	leave us with less than HEAP_MIN_SIZE total heap.
	Avoid our total amount of heap to surpass HEAP_MAX_SIZE.

2007-10-03  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/io.h: New file.
	* commands/i386/pc/play.c (inb): Removed.
	(outb): Removed.
	Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
	with grub_outb().
	* term/i386/pc/serial.c  (inb): Removed.
	(outb): Removed.
	Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
	with grub_outb().
	* term/i386/pc/vga.c  (inb): Removed.
	(outb): Removed.
	Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
	with grub_outb().

2007-10-02  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	Reported by Marcin Kurek.

2007-09-07  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
	SmartFirmware version updates (as released by Sven Luther), and avoid
	setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
	GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
	known broken.

2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>

	From Hitoshi Ozeki:
	* kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
	when merging two regions.

2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
	* normal/completion.c (grub_normal_do_completion): Likewise.
	Reported by Hitoshi Ozeki.

2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>

	Do not use devices at boot in chainloading.

	* loader/i386/pc/chainloader.c (boot_drive): New variable.
	(boot_part_addr): Likewise.
	(grub_chainloader_boot): Simply call grub_chainloader_real_boot
	with BOOT_DRIVE and BOOT_PART_ADDR.
	(grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
	Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.

2007-08-29  Robert Millan  <rmh@aybabtu.com>

	Patch from Simon Peter <dn.tlp@gmx.net>:
	* genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
	* conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
	util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
	util/i386/pc/grub-setup.c_DEPENDENCIES.
	* conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
	util/grub-probe.c_DEPENDENCIES.
	* conf/powerpc-ieee1275.rmk: Likewise.

2007-08-28  Robert Millan  <rmh@aybabtu.com>

	* util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
	to tell grub-mkdevicemap how to name devices.
	* util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
	feature).

	* conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
	util/i386/get_disk_name.c.
	* conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
	util/ieee1275/get_disk_name.c.

	* include/grub/util/misc.h: grub_util_get_disk_name() declaration.

	* DISTLIST: Add util/i386/get_disk_name.c and
	util/ieee1275/get_disk_name.c.

	* util/grub-mkdevicemap.c: Replace device naming logic with
	grub_util_get_disk_name() calls.

2007-08-20  Robert Millan  <rmh@aybabtu.com>

	* normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
	(so that it works for both plural and singular quantities).

2007-08-05  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
	so that [xz] isn't taken into account when determining order.

2007-08-02  Marco Gerards  <marco@gnu.org>

	* DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
	`include/multiboot2.h', `include/grub/elfload.h',
	`include/multiboot.h', `include/grub/multiboot.h',
	`include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
	`include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
	`kern/elf.c', `loader/multiboot_loader.c',
	`loader/multiboot_loader_normal.c', `loader/multiboot2.c',
	`loader/i386/pc/multiboot2.c',
	`loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
	`util/i386/pc/grub-mkrescue.in'.  Remove
	`include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
	`include/grub/i386/pc/util/biosdisk.h' and
	`include/grub/powerpc/ieee1275/multiboot.h'.

2007-08-02  Bean  <bean123ch@gmail.com>

	* conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
	(ntfs_mod_SOURCES): New variable.
	(ntfs_mod_CFLAGS): Likewise.
	(ntfs_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
	(grub_probe_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
	(grub_emu_SOURCES): Likewise.

	* conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.

	* fs/ntfs.c: New file.

2007-08-02  Bean  <bean123ch@gmail.com>

	* disk.h (grub_disk): Use NESTED_FUNC_ATTR.

	* file.h (grub_file): Likewise.

	* fshelp.h (grub_fshelp_read_file): Likewise.

	* util/i386/pc/grub-setup.c (setup): Likewise.
	(save_first_sector): Likewise.
	(save_blocklists): Likewise.

	* fs/affs.c (grub_affs_read_file): Likewise.

	* fs/ext2.c (grub_ext2_read_file): Likewise.

	* fs/fat.c (grub_fat_read_data): Likewise.

	* fs/fshelp.c (grub_fshelp_read_file): Likewise.

	* fs/hfs.c (grub_hfs_read_file): Likewise.

	* fs/hfsplus.c (grub_hfsplus_read_file): Likewise.

	* fs/jfs.c (grub_jfs_read_file): Likewise.

	* fs/minix.c (grub_minix_read_file): Likewise.

	* fs/sfs.c (grub_sfs_read_file): Likewise.

	* fs/ufs.c (grub_ufs_read_file): Likewise.

	* fs/xfs.c (grub_xfs_read_file): Likewise.

	* command/blocklist.c (read_blocklist): Likewise.
	(print_blocklist): Likewise.

2007-08-02  Marco Gerards  <marco@gnu.org>

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
	`util/hostfs.c'.

	* disk/host.c: New file.

	* util/hostfs.c: Likewise.

	* fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
	return `GRUB_ERR_BAD_FS'.
	* fs/sfs.c (grub_sfs_mount): Likewise.
	* fs/xfs.c (grub_xfs_mount): Likewise.

	* include/grub/disk.h (enum grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_HOST_ID'.

	* util/grub-emu.c (main): Initialize and de-initialize hostfs.

2007-07-24  Jerone Young  <jerone@gmail.com>

	* conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
	modules for compilation.
	* conf/powerpc-ieee1275.rmk: Likewise.

	* include/multiboot.h: Move multiboot definitions to one file. Rename
	many definitions to not get grub specific.
	* include/multiboot2.h: Create header with multiboot 2 definitions.
	* include/grub/multiboot.h: Header for grub specific function
	prototypes and definitions.
	* include/grub/multiboot2.h: Likewise.
	* include/grub/multiboot_loader.h: Likewise.
	* include/grub/i386/pc/multiboot.h: Removed.
	* include/grub/powerpc/ieee1275/multiboot.h: Removed.

	* loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
	and 2 to allow for one multiboot and module commands.
	* loader/multiboot2.c: Add multiboot2 functionality.
	* loader/i386/pc/multiboot.c: Modify for new multiboot header location
	and definition names.
	* loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
	2 functions.
	* loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
	ieee1275 specific multiboot2 code.

	* kern/i386/pc/startup.S: Change headers and definition names for
	multiboot. Add function grub_multiboot2_real_boot for multiboot 2.

2007-07-22  Robert Millan  <rmh@aybabtu.com>

	* geninitheader.sh: Process file specified in first parameter rather
	than hardcoding grub_modules_init.lst.
	* geninit.sh: Likewise.  Also, construct header name dynamically rather
	than hardcoding grub_modules_init.h.

	* conf/common.rmk: Rename grub_modules_init.[ch] files associated with
	grub-emu to grub_emu_init.[ch].  Add rules to build analogous
	grub_probe_init.[ch] and grub_setup_init.[ch].

	* conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
	grub_modules_init.h with grub_emu_init.h.
	(grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
	grub_probe_init.[ch] files.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	(grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
	grub_setup_init.[ch] files.

	* util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
	* util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
	to initialize modules rather than a list of hardcoded functions.
	* util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
	grub_init_all() to initialize modules rather than a list of hardcoded
	functions.

2007-07-22  Robert Millan  <rmh@aybabtu.com>

	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
	GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.

2007-07-22  Robert Millan  <rmh@aybabtu.com>

	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
	GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
	flag when running on SmartFirmware.
	* term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
	"output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
	was set.

	* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
	Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
	rather than decreasing it.

	* util/i386/pc/grub-setup.c (setup): When embedding is required, but
	there's not enough space to do it, fail in the same way as when it
	can't be done because there are no partitions.

	* util/powerpc/ieee1275/grub-install.in: Improve error message shown
	when nvsetenv failed.

2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>

	* conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
	because this rule is automatically generated.
	(grub-mkrescue): Removed for the same reason as above.

2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>

	Migrate to GNU General Public License Version 3.

	* COPYING: Replaced with the plain text version of GPLv3.

	* config.guess: Updated from gnulib.
	* config.sub: Likewise.

	* geninit.sh: Output a GPLv3 copyright notice.
	* geninitheader.sh: Likewise.
	* genmodsrc.sh: Likewise.
	* gensymlist.sh.in: Likewise.

	* boot/i386/pc/boot.S: Upgraded to GPLv3.
	* boot/i386/pc/diskboot.S: Likewise.
	* boot/i386/pc/pxeboot.S: Likewise.
	* commands/blocklist.c: Likewise.
	* commands/boot.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/configfile.c: Likewise.
	* commands/echo.c: Likewise.
	* commands/help.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/search.c: Likewise.
	* commands/terminal.c: Likewise.
	* commands/test.c: Likewise.
	* commands/videotest.c: Likewise.
	* commands/i386/cpuid.c: Likewise.
	* commands/i386/pc/halt.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/reboot.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/i386/pc/vbetest.c: Likewise.
	* commands/ieee1275/halt.c: Likewise.
	* commands/ieee1275/reboot.c: Likewise.
	* commands/ieee1275/suspend.c: Likewise.
	* disk/loopback.c: Likewise.
	* disk/lvm.c: Likewise.
	* disk/raid.c: Likewise.
	* disk/efi/efidisk.c: Likewise.
	* disk/i386/pc/biosdisk.c: Likewise.
	* disk/ieee1275/ofdisk.c: Likewise.
	* font/manager.c: Likewise.
	* fs/affs.c: Likewise.
	* fs/ext2.c: Likewise.
	* fs/fat.c: Likewise.
	* fs/fshelp.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/hfsplus.c: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/jfs.c: Likewise.
	* fs/minix.c: Likewise.
	* fs/sfs.c: Likewise.
	* fs/ufs.c: Likewise.
	* fs/xfs.c: Likewise.
	* hello/hello.c: Likewise.
	* include/grub/acorn_filecore.h: Likewise.
	* include/grub/arg.h: Likewise.
	* include/grub/bitmap.h: Likewise.
	* include/grub/boot.h: Likewise.
	* include/grub/cache.h: Likewise.
	* include/grub/device.h: Likewise.
	* include/grub/disk.h: Likewise.
	* include/grub/dl.h: Likewise.
	* include/grub/elfload.h: Likewise.
	* include/grub/env.h: Likewise.
	* include/grub/err.h: Likewise.
	* include/grub/file.h: Likewise.
	* include/grub/font.h: Likewise.
	* include/grub/fs.h: Likewise.
	* include/grub/fshelp.h: Likewise.
	* include/grub/gzio.h: Likewise.
	* include/grub/hfs.h: Likewise.
	* include/grub/kernel.h: Likewise.
	* include/grub/loader.h: Likewise.
	* include/grub/lvm.h: Likewise.
	* include/grub/misc.h: Likewise.
	* include/grub/mm.h: Likewise.
	* include/grub/net.h: Likewise.
	* include/grub/normal.h: Likewise.
	* include/grub/parser.h: Likewise.
	* include/grub/partition.h: Likewise.
	* include/grub/pc_partition.h: Likewise.
	* include/grub/raid.h: Likewise.
	* include/grub/rescue.h: Likewise.
	* include/grub/script.h: Likewise.
	* include/grub/setjmp.h: Likewise.
	* include/grub/symbol.h: Likewise.
	* include/grub/term.h: Likewise.
	* include/grub/terminfo.h: Likewise.
	* include/grub/tparm.h: Likewise.
	* include/grub/types.h: Likewise.
	* include/grub/video.h: Likewise.
	* include/grub/efi/api.h: Likewise.
	* include/grub/efi/chainloader.h: Likewise.
	* include/grub/efi/console.h: Likewise.
	* include/grub/efi/console_control.h: Likewise.
	* include/grub/efi/disk.h: Likewise.
	* include/grub/efi/efi.h: Likewise.
	* include/grub/efi/pe32.h: Likewise.
	* include/grub/efi/time.h: Likewise.
	* include/grub/i386/linux.h: Likewise.
	* include/grub/i386/setjmp.h: Likewise.
	* include/grub/i386/types.h: Likewise.
	* include/grub/i386/efi/kernel.h: Likewise.
	* include/grub/i386/efi/loader.h: Likewise.
	* include/grub/i386/efi/time.h: Likewise.
	* include/grub/i386/pc/biosdisk.h: Likewise.
	* include/grub/i386/pc/boot.h: Likewise.
	* include/grub/i386/pc/chainloader.h: Likewise.
	* include/grub/i386/pc/console.h: Likewise.
	* include/grub/i386/pc/init.h: Likewise.
	* include/grub/i386/pc/kernel.h: Likewise.
	* include/grub/i386/pc/loader.h: Likewise.
	* include/grub/i386/pc/memory.h: Likewise.
	* include/grub/i386/pc/multiboot.h: Likewise.
	* include/grub/i386/pc/serial.h: Likewise.
	* include/grub/i386/pc/time.h: Likewise.
	* include/grub/i386/pc/vbe.h: Likewise.
	* include/grub/i386/pc/vbeblit.h: Likewise.
	* include/grub/i386/pc/vbefill.h: Likewise.
	* include/grub/i386/pc/vbeutil.h: Likewise.
	* include/grub/i386/pc/vga.h: Likewise.
	* include/grub/ieee1275/ieee1275.h: Likewise.
	* include/grub/ieee1275/ofdisk.h: Likewise.
	* include/grub/powerpc/libgcc.h: Likewise.
	* include/grub/powerpc/setjmp.h: Likewise.
	* include/grub/powerpc/types.h: Likewise.
	* include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
	* include/grub/powerpc/ieee1275/console.h: Likewise.
	* include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
	* include/grub/powerpc/ieee1275/kernel.h: Likewise.
	* include/grub/powerpc/ieee1275/loader.h: Likewise.
	* include/grub/powerpc/ieee1275/multiboot.h: Likewise.
	* include/grub/powerpc/ieee1275/time.h: Likewise.
	* include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
	* include/grub/sparc64/libgcc.h: Likewise.
	* include/grub/sparc64/setjmp.h: Likewise.
	* include/grub/sparc64/types.h: Likewise.
	* include/grub/sparc64/ieee1275/console.h: Likewise.
	* include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
	* include/grub/sparc64/ieee1275/kernel.h: Likewise.
	* include/grub/sparc64/ieee1275/time.h: Likewise.
	* include/grub/util/biosdisk.h: Likewise.
	* include/grub/util/getroot.h: Likewise.
	* include/grub/util/lvm.h: Likewise.
	* include/grub/util/misc.h: Likewise.
	* include/grub/util/raid.h: Likewise.
	* include/grub/util/resolve.h: Likewise.
	* io/gzio.c: Likewise.
	* kern/device.c: Likewise.
	* kern/disk.c: Likewise.
	* kern/dl.c: Likewise.
	* kern/elf.c: Likewise.
	* kern/env.c: Likewise.
	* kern/err.c: Likewise.
	* kern/file.c: Likewise.
	* kern/fs.c: Likewise.
	* kern/loader.c: Likewise.
	* kern/main.c: Likewise.
	* kern/misc.c: Likewise.
	* kern/mm.c: Likewise.
	* kern/parser.c: Likewise.
	* kern/partition.c: Likewise.
	* kern/rescue.c: Likewise.
	* kern/term.c: Likewise.
	* kern/efi/efi.c: Likewise.
	* kern/efi/init.c: Likewise.
	* kern/efi/mm.c: Likewise.
	* kern/i386/dl.c: Likewise.
	* kern/i386/efi/init.c: Likewise.
	* kern/i386/efi/startup.S: Likewise.
	* kern/i386/pc/init.c: Likewise.
	* kern/i386/pc/lzo1x.S: Likewise.
	* kern/i386/pc/startup.S: Likewise.
	* kern/ieee1275/ieee1275.c: Likewise.
	* kern/powerpc/cache.S: Likewise.
	* kern/powerpc/dl.c: Likewise.
	* kern/powerpc/ieee1275/cmain.c: Likewise.
	* kern/powerpc/ieee1275/crt0.S: Likewise.
	* kern/powerpc/ieee1275/init.c: Likewise.
	* kern/powerpc/ieee1275/openfw.c: Likewise.
	* kern/sparc64/cache.S: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/sparc64/ieee1275/init.c: Likewise.
	* kern/sparc64/ieee1275/openfw.c: Likewise.
	* loader/efi/chainloader.c: Likewise.
	* loader/efi/chainloader_normal.c: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/efi/linux_normal.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/chainloader_normal.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/linux_normal.c: Likewise.
	* loader/i386/pc/multiboot.c: Likewise.
	* loader/i386/pc/multiboot_normal.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/powerpc/ieee1275/linux_normal.c: Likewise.
	* normal/arg.c: Likewise.
	* normal/cmdline.c: Likewise.
	* normal/command.c: Likewise.
	* normal/completion.c: Likewise.
	* normal/execute.c: Likewise.
	* normal/function.c: Likewise.
	* normal/lexer.c: Likewise.
	* normal/main.c: Likewise.
	* normal/menu.c: Likewise.
	* normal/menu_entry.c: Likewise.
	* normal/misc.c: Likewise.
	* normal/parser.y: Likewise.
	* normal/script.c: Likewise.
	* normal/i386/setjmp.S: Likewise.
	* normal/powerpc/setjmp.S: Likewise.
	* normal/sparc64/setjmp.S: Likewise.
	* partmap/acorn.c: Likewise.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* partmap/gpt.c: Likewise.
	* partmap/pc.c: Likewise.
	* partmap/sun.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/terminfo.c: Likewise.
	* term/efi/console.c: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* util/biosdisk.c: Likewise.
	* util/console.c: Likewise.
	* util/genmoddep.c: Likewise.
	* util/getroot.c: Likewise.
	* util/grub-emu.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/lvm.c: Likewise.
	* util/misc.c: Likewise.
	* util/raid.c: Likewise.
	* util/resolve.c: Likewise.
	* util/update-grub.in: Likewise.
	* util/update-grub_lib.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/i386/efi/grub-install.in: Likewise.
	* util/i386/efi/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-install.in: Likewise.
	* util/i386/pc/grub-mkimage.c: Likewise.
	* util/i386/pc/grub-mkrescue.in: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/i386/pc/misc.c: Likewise.
	* util/powerpc/ieee1275/grub-install.in: Likewise.
	* util/powerpc/ieee1275/grub-mkimage.c: Likewise.
	* util/powerpc/ieee1275/misc.c: Likewise.
	* video/bitmap.c: Likewise.
	* video/video.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.
	* video/i386/pc/vbeblit.c: Likewise.
	* video/i386/pc/vbefill.c: Likewise.
	* video/i386/pc/vbeutil.c: Likewise.
	* video/readers/tga.c: Likewise.

2007-07-02  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-efi.rmk: Replace obsolete reference to
	util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
	with util/getroot.c.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* util/grub-emu.c (main): Fix unchecked pointer handling.

2007-07-02  Robert Millan  <rmh@aybabtu.com>

	* util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
	invocation to fail, in order to support partition-less media.

	* util/i386/pc/grub-install.in: Likewise.

	* util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
	which fs or partmap modules are needed (akin to its sister scripts).

	Also use grub-probe to get rid of unportable /proc/mounts check.

	Print the same informational message that the other scripts do, before
	exiting.

2007-06-23  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (font_path): New function.  Determine whether
	a font file can be found and, if so, echo the GRUB path to it.

	* util/update-grub.in: Handle multiple terminals depending on user
	input, platform availability and font file presence.  Propagate
	variables of our findings to /etc/grub.d/ children.

	* util/grub.d/00_header.in: Handle multiple terminals, based on
	environment setup by update-grub.

2007-06-23  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.

2007-06-21  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
	indicate end of data section in kernel image.
	* include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
	GRUB_KERNEL_MACHINE_DATA_END.

	* kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
	space for it.
	* kern/i386/efi/startup.S: Likewise.

	* util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
	during image generation.  Implement --prefix option to override this
	patch.
	* util/i386/efi/grub-mkimage.c: Likewise.

	* util/update-grub_lib.in (convert_system_path_to_grub_path): Split
	code to make path relative to its root into a separate function.

	* util/i386/pc/grub-install.in: Use newly provided
	make_system_path_relative_to_its_root() to convert ${grubdir}, then
	pass the result to grub-install --prefix.

2007-06-13  Robert Millan  <rmh@aybabtu.com>

	* include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
	DEFAULT_DEVICE_MAP.
	* util/grub-emu.c: Use above definitions from misc.h instead of
	defining them.
	* util/grub-mkdevicemap.c: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/grub-probe.c: Likewise.
	(probe): Abort with grub_util_error() when either
	grub_guess_root_device or grub_util_get_grub_dev fails.

2007-06-12  Robert Millan  <rmh@aybabtu.com>

	* normal/command.c (grub_command_execute): Use NULL rather than 0 for
	"pager" assignment.
	* util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
	"pcdata".
	* util/grub-probe.c (probe): Likewise for "drive_name".

2007-06-11  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
	not just the cdrom one.

2007-06-11  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-mkrescue.in: Add "set -e".
	Add --pkglibdir=DIR option to override pkglibdir.
	Mention --image-type=TYPE in help output.
	Fix --grub-mkimage (it was a no-op).
	Abort gracefully when no parameter is given.

2007-06-11  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-mkrescue.in: New file.
	* conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
	* Makefile.in: Handle bin_SCRIPTS.

2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>

	* term/gfxterm.c (grub_gfxterm_init): Added support for specifying
	list of video modes.

2007-06-06  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
	file doesn't exist, or if it is in a filesystem grub can't read.

	* util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
	not abort if GRUB_DRIVE could not be defined.  Rearrange generated
	header comment to fit in 80 columns when the variables are resolved.

	* util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
	could be identified by update-grub.  Remove redundant check for
	unifont.pff existence (since convert_system_path_to_grub_path now
	handles that).

2007-06-04  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.

	* conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.

2007-06-04  Robert Millan  <rmh@aybabtu.com>

	* conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.

	* include/grub/partition.h: Declare grub_apple_partition_map_init and
	grub_apple_partition_map_fini.

	* util/biosdisk.c
	(grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
	to access >2 TiB disks).

	Print disk->total_sectors with %llu instead of %lu, since this
	variable is always 64-bit (prevents wrong disk size from being displayed
	on either >2 TiB disk or big-endian CPU).

	(grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
	into a generic case that supports all (sane) partition maps.

	Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
	breaks big-endian.

	* util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
	and grub_apple_partition_map_fini() after that.

2007-06-01  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Export GRUB_CMDLINE_LINUX.

	* util/grub.d/00_header.in: Only enable gfxterm when
	convert_system_path_to_grub_path() succeeds.

2007-05-20  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub_lib.in: New file.
	* DISTLIST: Add update-grub_lib.in.
	* conf/common.rmk: Generate update-grub_lib and install it in
	$(lib_DATA).
	* Makefile.in: Add install routine for $(lib_DATA).

	* util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
	function provided by update-grub_lib to support arbitrary paths of
	unifont.pff.
	* util/update-grub.in: Use convert_system_path_to_grub_path() to
	initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.

2007-05-19  Robert Millan  <rmh@aybabtu.com>

	* commands/i386/cpuid.c: New module.
	* DISTLIST: Add it.
	* conf/i386-efi.rmk: Enable cpuid.mod.
	* conf/i386-pc.rmk: Likewise.

2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>

	* kern/disk.c (grub_disk_read): Check return value of
	grub_realloc().

2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>

	* util/getroot.c (grub_util_get_grub_dev): Support partitionable
	arrays.
	* disk/raid.c (grub_raid_open): Likewise.

2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>

	* util/biosdisk.c (linux_find_partition): Allocate real_dev on the
	stack instead of on the heap.

	* kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
	before doing a read on it.

	* configure.ac: Only use -fno-stack-protector for the target
	environment.

2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>

	* video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
	__attribute_ ((unused)) to mode_type argument.

	* util/getroot.c (grub_guess_root_device): Fix #endif.

	* kern/misc.c (memcmp): Fix prototype.

	* include/grub/partition.h [GRUB_UTIL]
	(grub_gpt_partition_map_init): Add prototype.
	(grub_gpt_partition_map_fini): Likewise.

	* fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
	at the right place.

	* fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
	(grub_fat_read_data): Likewise.
	(grub_fat_find_dir): Likewise.

	* font/manager.c (find_glyph): Make table a const.
	(grub_font_get_glyph): Remove bitmap from if statement.

2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>

	* util/getroot.c (grub_guess_root_device): Remove RAID and LVM
	code, first search for device in /dev/mapper, then in /dev.
	(grub_util_get_grub_dev): New function.
	* include/grub/util/getroot.h (grub_util_get_grub_dev): Add
	prototype.
	* util/grub-probe.c (probe): Remove check for RAID, call
	grub_util_get_grub_dev() instead of
	grub_util_biosdisk_get_grub_dev().
	* util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
	grub_util_biosdisk_get_grub_dev().
	* util/i386/pc/grub-setup.c (main): Likewise.

2007-05-16  Robert Millan  <rmh@aybabtu.com>

	* DISTLIST: Update for the latest changes.
	* conf/i386-pc.rmk: Use the new paths for util/getroot.c,
	util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
	* util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
	grub/util/biosdisk.h.
	* util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
	grub/util/biosdisk.h.

2007-05-16  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Set default gfxmode to `640x480'.

2007-05-16  Robert Millan  <rmh@aybabtu.com>

	* util/i386/efi/grub-install.in: New.
	* conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
	newly added grub-install.
	* util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
	include.
	* util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
	grub/util/biosdisk.h.
	* util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
	grub/util/biosdisk.h.

2007-05-16  Robert Millan  <rmh@aybabtu.com>

	* include/grub/i386/pc/util/biosdisk.h: Moved to ...
	* include/grub/util/biosdisk.h: ... here.
	* util/i386/pc/biosdisk.c: Moved to ...
	* util/biosdisk.c: ... here.
	* util/i386/pc/getroot.c: Moved to ...
	* util/getroot.c: ... here.
	* util/i386/pc/grub-mkdevicemap.c: Moved to ...
	* util/grub-mkdevicemap.c: ... here.
	* util/i386/pc/grub-probe.c: Moved to ...
	* util/grub-probe.c: ... here.

2007-05-15  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Remove duplicated line in grub.cfg header
	message.

2007-05-13  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Fix a few assumptions about the devices holding
	/, /boot and /boot/grub being the same.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.

	* util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
	patterns.  Use that to define the `.old' suffix as older than `'.

	* util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.

	* util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
	the grub.cfg header message.

2007-05-11  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Create device.map if it doesn't already exist,
	before attempting to run grub-probe.
	Check for grub-probe and grub-mkdevicemap with the same code
	grub-install is using.
	Remove test mode.

2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>

	* Makefile.in: Add the datarootdir autoconf variable.

2007-05-09  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-probe.c (probe): When detecting partition map,
	fail gracefully if dev->disk->partition == NULL.

2007-05-07  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
	determine partition map module.
	* util/i386/pc/grub-install.in: Use this feature to decide which
	partition module to load, instead of hardcoding pc and gpt.

2007-05-07  Robert Millan  <rmh@aybabtu.com>

	* Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
	source directory differs from build directory.

2007-05-05  Robert Millan  <rmh@aybabtu.com>

	* util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
	initialisation.

2007-05-05  Robert Millan  <rmh@aybabtu.com>

	* util/update-grub.in: Create ${grub_prefix} if it doesn't exist.

2007-05-05  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/10_linux.in: Allow the administrator to insert Linux
	command-line arguments via ${GRUB_CMDLINE_LINUX}.

2007-05-05  Robert Millan  <rmh@aybabtu.com>

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
	(grub_probe_SOURCES): Likewise.
	* util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
	GPT and initialize dos_part and bsd_part accordingly.
	* util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
	install_bsd_part.
	(main): Activate gpt module for use during partition identification,
	and deactivate it afterwards.
	* util/i386/pc/grub-install.in: Add gpt module to core.img.
	* util/i386/pc/grub-probe.c (main): Activate gpt module for use during
	partition identification, and deactivate it afterwards.

2007-05-05  Robert Millan  <rmh@aybabtu.com>

	* term/i386/pc/console.c (grub_console_fini): Call
	grub_term_set_current() before grub_term_unregister().

2007-05-04  Robert Millan  <rmh@aybabtu.com>

	* DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
	util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
	* Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
	and update-grub_DATA.
	* conf/common.rmk: Build and install update-grub components.
	* conf/common.mk: Regenerate.
	* util/update-grub.in: New.  Core of update-grub.
	* util/grub.d/00_header.in: New.  Generates grub.cfg header.
	* util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
	* util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
	* util/grub.d/README: New.  Document grub.d directory layout.

2007-05-01  Robert Millan  <rmh@aybabtu.com>

	* util/grub-emu.c: Move initialization functions
	grub_util_biosdisk_init() and grub_init_all() before
	grub_util_biosdisk_get_grub_dev(), which relies on them.

2007-04-19  Robert Millan  <rmh@aybabtu.com>

	* util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
	it is used later.

2007-04-18  Jerone Young  <jerone@gmail.com>

	* kernel/elf.c: Add missing parenthesis for conditional statement
	stanza.

2007-04-10  Jerone Young  <jerone@gmail.com>

	* util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
	continue on and look for device node with real device name.

2007-04-10  Jerone Young  <jerone@gmail.com>

	* configure.ac: Add argument for autoconf to use transformation
	ability.
	* Makefile.in: Add autoconf package transformation code.
	* util/i386/pc/grub-install.in: Likewise.
	* util/powerpc/ieee1275/grub-install.in: Likewise.

2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
	(EXT2_GOOD_OLD_INODE_SIZE): Likewise.
	(EXT2_REVISION): Likewise.
	(EXT2_INODE_SIZE): Likewise.
	(struct grub_ext2_block_group): Added a missing member
	"used_dirs".
	(grub_ext2_read_inode): Divide by the inode size in a superblock
	instead of 128 to obtain INODES_PER_BLOCK.
	Use the macro EXT2_INODE_SIZE instead of directly using
	SBLOCK->INODE_SIZE.

2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
	superblock instead of the structure size to compute an
	offset. This fixes the problem that GRUB could not read a
	filesystem when inode size is different from 128-byte.

2007-03-05  Marco Gerards  <marco@gnu.org>

	* normal/main.c (read_config_file): When "menu" is not set, create
	an initial context.

2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
	(HEAP_LIMIT): New macro.
	(grub_claim_heap): Claim memory up to `heaplimit'.

2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
	* kern/powerpc/ieee1275/init.c (_end): Add declaration.
	(_start): Likewise.
	(grub_arch_modules_addr): Return address after `_end'.
	* util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
	(load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
	(add_segments): Calculate `_end' from phdr size and location.
	(ALIGN_UP): Moved to ...
	* include/grub/misc.h: here.
	* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
	New macro.
	(GRUB_IEEE1275_MODULE_BASE): Removed.

2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
	loop boundary.

2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
	All users updated.
	(grub_elf64_load_hook_t): Likewise.
	* kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
	debug output.

2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/mm.c: Update copyright.
	(grub_mm_debug): Correct syntax error.
	(grub_mm_dump_free): New function.
	(grub_debug_free): Call `grub_free'.
	* include/grub/mm.h: Update copyright.
	(grub_mm_dump_free): Add declaration.

2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/ieee1275/ieee1275.h: Update copyright.
	* kern/powerpc/ieee1275/init.c: Likewise.
	* kern/powerpc/ieee1275/openfw.c: Likewise.

	* loader/powerpc/ieee1275/linux.c: Likewise.
	* include/grub/elfload.h: Likewise.
	* kern/elf.c: Likewise.
	(grub_elf32_load): Pass `base' and `size' parameters.  Update all
	callers.
	(grub_elf64_load): Likewise.
	(grub_elf32_load_segment): Move to a nested function.
	(grub_elf64_load_segment): Likewise.

2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
	prototype.
	* kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
	(grub_heap_len): Likewise.
	(HEAP_SIZE): New macro.
	(grub_claim_heap): New function.
	(grub_machine_init): Don't claim heap directly.  Call
	`grub_claim_heap'.
	* kern/powerpc/ieee1275/openfw.c: Include alloca.h.
	(grub_available_iterate): New function.

2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>

	* aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
	* configure.ac: Use it for testing the HOST and TARGET compilers.

2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>

	* Makefile.in (enable_grub_emu): New variable.
	* configure.ac (--enable-grub-emu): New option.
	Do the checks for (n)curses only if `--enable-grub-emu' is requested.
	* conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.

2006-12-12  Marco Gerards  <marco@gnu.org>

	* include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.

	* kern/env.c (grub_env_unset): Don't free the member `value' when
	the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
	pointer.

	* normal/main.c (current_menu): Removed.
	(free_menu): Unset the `menu' environment variable.
	(grub_normal_menu_addentry): Make use of the environment variable
	`menu', instead of using the global `current_menu'.  Allocate
	memory for the sourcecode of this entry.
	(read_config_file): New argument `nested', changed all callers.
	Only in the case of a new context, initialize a new menu.  Set the
	`menu' environment variable.
	(grub_normal_execute): Don't set and unset the environment
	variable `menu' here anymore.  Only free the menu when leaving the
	context.

	* util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
	leak.

2006-12-11  Marco Gerards  <marco@gnu.org>

	* normal/menu_entry.c (run): Fix off by one bug so the last line
	is executed.  Move the loader check to outside the loop.

2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.

2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
	the number of sectors.	Reported by Andrey Shuvikov
	<mr_hyro@yahoo.com>.

2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>

	* kern/disk.c (grub_disk_read): When there is a read error, always
	try to read only the necessary data.

	* conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
	disk/raid.c.
	* include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
	prototype.
	[GRUB_UTIL] (grub_raid_fini): Likewise.
	[GRUB_UTIL] (grub_lvm_init): Likewise.
	[GRUB_UTIL] (grub_lvm_fini): Likewise.
	* util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
	RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
	(main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
	and grub_raid_fini().

2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>

	* include/grub/types.h (__unused): Rename to UNUSED.
	* kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
	(grub_elf64_size): Likewise.

2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/elf.c (grub_elf_file): Call grub_file_seek. Call
	grub_error_push and grub_error_pop in the error-handling path.
	(grub_elf32_load_segment): Only call grub_file_read with non-zero
	length.

2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(kernel_elf_SOURCES): Likewise.
	* conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
	* conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
	* conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
	* conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
	* conf/common.rmk (pkgdata_MODULES): Add elf.mod.
	(elf_mod_SOURCES): New variable.
	(elf_mod_CFLAGS): Likewise.
	(elf_mod_LDFLAGS): Likewise.
	* include/grub/types.h (__unused): New macro.
	* include/grub/elfload.h: New file.
	* kern/elf.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Include elfload.h.
	(ELF32_LOADMASK): New macro.
	(ELF64_LOADMASK): Likewise.
	(vmlinux): Removed.
	(grub_linux_load32): New function.
	(grub_linux_load64): Likewise.
	(grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
	Use grub_elf_t instead of grub_file_t.

2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
	`catch_result' to struct set_color_args.

2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/menu.c: Include grub/script.h.
	* normal/menu_entry.c: Likewise.
	* include/grub/normal.h: Do not include grub/script.h.

2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/disk.c (grub_disk_read): Correct debug printf formatting.

2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/disk.c (grub_disk_open): Print debug messages when opening a
	disk.
	(grub_disk_close): Print debug messages when closing a disk.
	(grub_disk_read): Print debug messages when disk read fails.
	* kern/fs.c (grub_fs_probe): Print debug messages when detecting
	filesystem type.
	* kern/partition.c: Include misc.h.
	(grub_partition_iterate): Print debug messages when detecting
	partition type.

2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>

	* disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
	is negative.
	* kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.

2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
	Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.

2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>

	* disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
	instead of sizeof(lv). Patch by Michael Guntsche.

2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>

	* disk/lvm.c: Rename VGS to VG_LIST.
	(grub_lvm_iterate): Change VGS->LV to VG-LV.
	(grub_lvm_open): Likewise.
	Thanks to Michael Guntsche for finding this bug.

2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac (AC_INIT): Bumped to 1.95.

2006-10-14  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
	with "/dev/.static/dev/md".

2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
	DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
	DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
	DRIVE_NAME are always freed.

	* util/i386/pc/biosdisk.c (make_device_name): Add one into
	DOS_PART, as a DOS partition is counted from one instead of zero
	now. Reported by Robert Millan.

2006-10-14  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/getroot.c (grub_guess_root_device): Stop using
	grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
	* util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
	string returned by grub_guess_root_device.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/i386/pc/grub-probefs.c: Likewise.

	* util/i386/pc/grub-probefs.c: Rename to ...
	* util/i386/pc/grub-probe.c: ... this.
	* DISTLIST: Remove grub-probefs, add grub-probe.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* util/i386/pc/grub-install.in: Likewise.

	* util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
	choose which information we want to print.

2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
	include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
	include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
	include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
	video/readers/tga.c and video/i386/pc/vbeutil.c.

2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>

	Added support for RAID and LVM.

	* disk/lvm.c: New file.
	* disk/raid.c: Likewise.
	* include/grub/lvm.h: Likewise.
	* include/grub/raid.h: Likewise.
	* include/grub/util/lvm.h: Likewise.
	* include/grub/util/raid.h: Likewise.
	* util/lvm.c: Likewise.
	* util/raid.c: Likewise.

	* include/grub/disk.h (grub_disk_dev_id): Add
	GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
	(grub_disk_get_size): New prototype.
	* kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
	returns a partition.
	(grub_disk_get_size): New function.

	* kern/i386/pc/init.c (make_install_device): Copy the prefix
	verbatim if grub_install_dos_part is -2.

	* util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
	and LVM devices.

	* util/i386/pc/grub-setup.c (setup): New argument
	MUST_EMBED. Force embedding of GRUB when the argument is
	true. Close FILE before	returning.
	(main): Add support for RAID and LVM.

	* conf/common.rmk: Add RAID and LVM modules.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
	util/lvm.c.
	(grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.

	* kern/misc.c (grub_strstr): New function.
	* include/grub/misc.h (grub_strstr): New prototype.

2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>

	* include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.

2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>

	* kern/misc.c (grub_strtoull): Guess the base only if not
	specified.

2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
	PowerMac support.

2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>

	* disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.

	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
	Remove `flags' argument.  All callers changed.
	* kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
	(IEEE1275_IHANDLE_INVALID): New variable.
	(IEEE1275_CELL_INVALID): New variable.
	(grub_ieee1275_finddevice, grub_ieee1275_get_property,
	grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
	grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
	grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
	grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
	codes from Open Firmware.  All callers updated.
	(grub_ieee1275_next_property): Directly return Open Firmware return
	code.
	* kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
	Standardize error checking from `grub_ieee1275_get_property'.
	* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
	`devalias' to `aliases'.  Correct comments.  Consolidate error paths.

2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
	`instance_to_package_args' to `instance_to_path_args'.

	* kern/powerpc/ieee1275/init.c (grub_machine_init): Use
	`grub_ieee1275_chosen'.

	* term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
	`grub_ieee1275_interpret'.

2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>

	* util/powerpc/ieee1275/grub-mkimage.c: Include config.h.

2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
	(__cmpdi): Likewise.

	* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
	`flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
	`grub_ssize_t'.

	* kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.

	* loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
	to type `grub_ssize_t'.
	(grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.

2006-09-22  Marco Gerards  <marco@gnu.org>

	* normal/script.c (grub_script_create_cmdmenu): Skip leading
	newlines.

2006-09-22  Marco Gerards  <marco@gnu.org>

	* commands/echo.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.

	* conf/common.rmk (echo_mod_SOURCES): New variable.
	(echo_mod_CFLAGS): Likewise.
	(echo_mod_LDFLAGS): Likewise.

2006-09-22  Marco Gerards  <marco@gnu.org>

	* normal/main.c (get_line): Malloc memory instead of using
	preallocated memory.  Removed the arguments `cmdline' and
	`max_len'.  Updated all callers.

2006-09-22  Marco Gerards  <marco@gnu.org>

	* conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
	(normal_mod_DEPENDENCIES): Likewise.

	* conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.

2006-09-22  Johan Rydberg  <jrydberg@gnu.org>

	* genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
	programs.
	* conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
	(normal_mod_DEPENDENCIES): Likewise.
	* conf/i386-pc.mk: Regenerate.
	* conf/i386-efi.mk: Likewise
	* conf/common.mk: Likewise.
	* conf/powerpc-ieee1275.mk: Likewise.
	* conf/sparc64-ieee1275.mk: Likewise.

2006-09-22  Robert Millan  <rmh@aybabtu.com>

	Sync with i386 version.
	* conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
	* conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.

2006-09-21  Robert Millan  <rmh@aybabtu.com>

	Import from GRUB Legacy (lib/device.c):
	* util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
	(init_device_map) [__linux__]: Add support for I2O devices.

2006-09-14  Marco Gerards  <marco@gnu.org>

	* conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
	`-melf_i386'.

2006-09-14  Robert Millan  <rmh@aybabtu.com>

	* util/i386/pc/grub-install.in: Skip menu.lst when removing
	/boot/grub/*.lst.

	* util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").

	* util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
	before adding it to device.map.

2006-08-15  Johan Rydberg  <jrydberg@gnu.org>

	* genmk.rb: Let GCC generate dependencies the first time it
	compiles a file; using the -MD option.
	* conf/common.mk: Regenerate.
	* conf/i386-pc.mk: Likewise.
	* conf/i386-efi.mk: Likewise.
	* conf/powerpc-ieee1275.mk: Likewise.
	* conf/sparc64-ieee1275.mk: Likewise.

2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>

	Move the prototypes of grub_setjmp and grub_longjmp to
	cpu/setjmp.h, so that each architecture may specify different
	attributes.

	* include/grub/i386/setjmp.h (grub_setjmp): New prototype.
	(grub_longjmp): Likewise.
	* include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
	(grub_longjmp): Likewise.
	* include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
	(grub_longjmp): Likewise.

	* include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
	[!GRUB_UTIL] (grub_longjmp): Removed.

2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>

	* kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
	"color!" method does not return any value.

2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>

	* include/grub/bitmap.h: New file.

	* include/grub/i386/pc/vbeutil.h: Likewise.

	* video/bitmap.c: Likewise.

	* video/readers/tga.c: Likewise.

	* video/i386/pc/vbeutil.c: Likewise.

	* commands/videotest.c: Code cleanup and updated to reflect to new
	video API.

	* term/gfxterm.c: Likewise.

	* video/video.c: Likewise.

	* conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
	(vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
	(bitmap_mod_SOURCES): New entry.
	(bitmap_mod_CFLAGS): Likewise.
	(bitmap_mod_LDFLAGS): Likewise.
	(tga_mod_SOURCES): Likewise.
	(tga_mod_CFLAGS): Likewise.
	(tga_mod_LDFLAGS): Likewise.

	* include/grub/video.h (grub_video_blit_operators): New enum type.
	(grub_video_render_target): Changed as forward declaration and moved
	actual definition to be video driver specific.
	(grub_video_adapter.blit_bitmap): Added blitting operator.
	(grub_video_adapter.blit_render_target): Likewise.
	(grub_video_blit_bitmap): Likewise.
	(grub_video_blit_render_target): Likewise.

	* include/grub/i386/pc/vbe.h (grub_video_render_target): Added
	driver specific render target definition.
	(grub_video_vbe_map_rgba): Added driver internal helper.
	(grub_video_vbe_unmap_color): Updated to use
	grub_video_i386_vbeblit_info.
	(grub_video_vbe_get_video_ptr): Likewise.

	* include/grub/i386/pc/vbeblit.h
	(grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
	grub_video_i386_vbeblit_info.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8): Likewise.
	(grub_video_i386_vbeblit_index_index): Likewise.
	(grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
	(grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
	(grub_video_i386_vbeblit_blend): Added generic blitter for blend
	operator.
	(grub_video_i386_vbeblit_replace): Added generic blitter for replace
	operator.

	* video/i386/pc/vbeblit.c: Updated to reflect changes on
	include/grub/i386/pc/vbeblit.h.

	* include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
	Updated to use grub_video_i386_vbeblit_info.
	(grub_video_i386_vbefill_R8G8B8): Likewise.
	(grub_video_i386_vbefill_index): Likewise.
	(grub_video_i386_vbefill): Added generic filler.

	* video/i386/pc/vbefill.c: Updated to reflect changes on
	include/grub/i386/pc/vbefill.h.

	* video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
	grub_video_i386_vbeblit_info.
	(grub_video_vbe_unmap_color): Likewise.
	(grub_video_vbe_blit_glyph): Likewise.
	(grub_video_vbe_scroll): Likewise.
	(grub_video_vbe_draw_pixel): Removed function.
	(grub_video_vbe_get_pixel): Likewise.
	(grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
	updated code to use it.
	(common_blitter): Added common blitter for render target and bitmap.
	(grub_video_vbe_blit_bitmap): Updated to use common_blitter.
	(grub_video_vbe_blit_render_target): Likewise.

2006-07-30  Johan Rydberg  <jrydberg@gnu.org>

	* kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
	is in text mode if there is no console control protocol instance
	available.

2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>

	* include/grub/video.h: Code cleanup.

	* include/grub/i386/pc/vbe.h: Likewise.

	* video/i386/pc/vbe.c: Likewise.

	* video/i386/pc/vbeblit.c: Likewise.

	* video/i386/pc/vbefill.c: Likewise.

	* video/video.c: Likewise.  Also added more comments.

2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>

	* disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
	(struct grub_biosdisk_dap): Likewise.

	* include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
	linkage settings for all functions.

2006-07-12  Marco Gerards  <marco@gnu.org>

	* configure.ac (--enable-mm-debug): Fix typo.

	* genkernsyms.sh.in: Use proper quoting for `CC'.

2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>

	* conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
	(normal_mod_ASFLAGS): Remove "-m32".

2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/misc.c: Include config.h.
	[!HAVE_MEMALIGN]: Do not include malloc.h.
	(grub_memalign): Use posix_memalign, if present. Then, use
	memalign, if present. Otherwise, emit an error.

	* util/grub-emu.c: Do not include malloc.h.

	* include/grub/util/misc.h: Include unistd.h. This is required for
	FreeBSD, because off_t is defined in unistd.h. Reported by Harley
	D. Eades III <hde@foobar-qux.org>.

	* configure.ac (AC_GNU_SOURCE): Added.
	(AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
	type.

2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>

	* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
	ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.

2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>

	* include/grub/types.h (grub_host_addr_t): Rename to
	grub_target_addr_t.
	(grub_host_off_t): Rename to grub_target_off_t.
	(grub_host_size_t): Rename to grub_target_size_t.
	(grub_host_ssize_t): Rename to grub_target_ssize_t.
	Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.

	* include/grub/kernel.h (struct grub_module_header): Change type
	of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
	(grub_module_info): Likewise.

2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>

	* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
	of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
	Velazquez <jesus.velazquez@gmail.com>.

2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>

	Count partitions from 1 instead of 0 in the string representation
	of partitions. Still use 0-based internally.

	* partmap/sun.c (grub_sun_is_valid): A cosmetic change.
	(sun_partition_map_iterate): Use grub_partition_t instead of
	struct grub_partition *. Cast DESC->START_CYLINDER to
	grub_uint64_t after converting the endian.
	(sun_partition_map_probe): Subtract 1 for PARTNUM.
	(sun_partition_map_get_name): Add 1 to P->INDEX.

	* partmap/pc.c (grub_partition_parse): Subtract 1 for
	PCDATA->DOS_PART.
	(pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.

	* partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
	zero instead of one.
	(gpt_partition_map_probe): Subtract 1 for PARTNUM.
	(gpt_partition_map_get_name): Add 1 into P->INDEX.

	* partmap/apple.c (apple_partition_map_iterate): Change the type
	of POS to unsigned.
	(apple_partition_map_probe): Subtract 1 for PARTNUM.
	(apple_partition_map_get_name): Add 1 into P->INDEX.

	* partmap/amiga.c (amiga_partition_map_iterate): Change the type
	of POS to unsigned.
	(amiga_partition_map_iterate): Cast NEXT to grub_off_t to
	calculate the offset of a partition.
	(amiga_partition_map_probe): Subtract 1 for PARTNUM.
	(amiga_partition_map_get_name): Add 1 into P->INDEX.

	* partmap/acorn.c (acorn_partition_map_find): Change the type of
	SECTOR to grub_disk_addr_t.
	(acorn_partition_map_iterate): Likewise.
	(acorn_partition_map_probe): Subtract 1 for PARTNUM.
	Change the type of SECTOR to grub_disk_addr_t. Declare P on the
	top.
	(acorn_partition_map_get_name): Add 1 into P->INDEX.

	* kern/i386/pc/init.c (make_install_device): Add 1 into
	GRUB_INSTALL_DOS_PART.

	* fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
	conditional.

2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>

	Clean up the code to support 64-bit addressing in disks and
	files. This change is not enough for filesystems yet.

	* util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
	type of "start" to grub_uint64_t.
	(setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
	grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
	save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
	convert addresses.

	* util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
	to grub_disk_addr_t.

	* partmap/gpt.c (gpt_partition_map_iterate): Fix the format
	string.

	* partmap/pc.c (pc_partition_map_iterate): Likewise.

	* partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
	to char *.

	* normal/script.c (grub_script_parse): Remove unused MEMFREE.

	* normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.

	* normal/lexer.c (grub_script_yyerror): Specify unused to LEX.

	* loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
	to grub_off_t, to detect an error from grub_file_seek.
	(grub_multiboot_load_elf32): Likewise.

	* kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
	maximum unsigned long value when an overflow is detected.
	(grub_strtoull): New function.
	(grub_divmod64): Likewise.
	(grub_lltoa): use grub_divmod64.

	* kern/fs.c (struct grub_fs_block): Change the type of "offset" to
	grub_disk_addr_t.
	(grub_fs_blocklist_open): Increase P if P is not NULL to advance
	the pointer to next character. Use grub_strtoull instead of
	grub_strtoul.
	(grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
	SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
	respectively.

	* kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
	return value is signed.
	(grub_file_seek): Change the type of OLD to grub_off_t. Do not
	test if OFFSET is less than zero, as OFFSET is unsigned now.

	* kern/disk.c (struct grub_disk_cache): Change the type of
	"sector" to grub_disk_addr_t.
	(grub_disk_cache_get_index): Change the type of SECTOR to
	grub_disk_addr_t. Calculate the hash with SECTOR casted to
	unsigned after shifting.
	(grub_disk_cache_invalidate): Change the type of SECTOR to
	grub_disk_addr_t.
	(grub_disk_cache_unlock): Likewise.
	(grub_disk_cache_store): Likewise.
	(grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
	START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
	grub_disk_addr_t and grub_uint64_t, respectively.
	(grub_disk_read): Use an unsigned variable REAL_OFFSET for the
	body, as the value of OFFSET is tweaked by
	grub_disk_check_range. Change the types of START_SECTOR, LEN and
	POS to grub_disk_addr_t, grub_size_t and grub_size_t,
	respectively.
	(grub_disk_write): Use an unsigned variable REAL_OFFSET for the
	body, as the value of OFFSET is tweaked by
	grub_disk_check_range. Change the types of LEN and N to
	grub_size_t.

	* io/gzio.c (struct grub_gzio): Change the types of "data_offset"
	and "saved_offset" to grub_off_t.
	(test_header): Cast BUF to char *.
	(get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
	to char *.
	(grub_gzio_read): Change the types of OFFSET and SIZE to
	grub_off_t and grub_size_t, respectively.

	* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
	Removed.
	(GRUB_BOOT_MACHINE_BOOT_DRIVE):	Changed to 0x4c.
	(GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
	(GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
	(GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
	(GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.

	* include/grub/types.h (grub_off_t): Unconditionally set to
	grub_uint64_t.
	(grub_disk_addr_t): Changed to grub_uint64_t.

	* include/grub/partition.h (struct grub_partition): Change the
	types of "start", "len" and "offset" to grub_disk_addr_t,
	grub_uint64_t and grub_disk_addr_t, respectively.
	(grub_partition_get_start): Return grub_disk_addr_t.
	(grub_partition_get_len): Return grub_uint64_t.

	* include/grub/misc.h (grub_strtoull): New prototype.
	(grub_divmod64): Likewise.

	* include/grub/fshelp.h (grub_fshelp_read_file): Change the types
	of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
	grub_off_t, respectively.
	All callers and references changed.

	* include/grub/fs.h (struct grub_fs): Change the type of LEN to
	grub_size_t in "read".
	All callers and references changed.

	* include/grub/file.h (struct grub_file): Change the types of
	"offset" and "size" to grub_off_t and grub_off_t,
	respectively. Change the type of SECTOR to grub_disk_addr_t in
	"read_hook".
	(grub_file_read): Change the type of LEN to grub_size_t.
	(grub_file_seek): Return grub_off_t. Change the type of OFFSET to
	grub_off_t.
	(grub_file_size): Return grub_off_t.
	(grub_file_tell): Likewise.
	All callers and references changed.

	* include/grub/disk.h (struct grub_disk_dev): Change the types of
	SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
	"write".
	(struct grub_disk): Change the type of "total_sectors" to
	grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
	"read_hook".
	(grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
	grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
	(grub_disk_write): Likewise.
	All callers and references changed.

	* fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
	char * for grub_strncmp to silence gcc.
	(grub_iso9660_mount): Likewise.
	(grub_iso9660_mount): Likewise.
	(grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
	return statement.
	(grub_iso9660_iterate_dir): Likewise.
	(grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.

	* fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
	LEN to grub_disk_addr_t and grub_size_t, respectively.

	* fs/hfsplus.c (grub_hfsplus_read_file): Likewise.

	* fs/jfs.c (grub_jfs_read_file): Likewise.

	* fs/minix.c (grub_jfs_read_file): Likewise.

	* fs/sfs.c (grub_jfs_read_file): Likewise.

	* fs/ufs.c (grub_jfs_read_file): Likewise.

	* fs/xfs.c (grub_jfs_read_file): Likewise.

	* fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
	and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
	respectively.

	* fs/ext2.c (grub_ext2_read_block): When an error happens, set
	BLKNR to -1 instead of returning GRUB_ERRNO.
	(grub_ext2_read_file): Change the types of SECTOR and
	LEN to grub_disk_addr_t and grub_size_t, respectively.

	* fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
	LEN to grub_disk_addr_t and grub_size_t, respectively.

	* font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
	grub_file_read.

	* disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
	string. Do not cast SECTOR explicitly.

	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
	TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
	(grub_biosdisk_rw): Change the types of SECTOR and SIZE to
	grub_disk_addr_t and grub_size_t, respectively. If the sector is
	over 2TB and LBA mode is not supported, raise an error.
	(get_safe_sectors): New function.
	(grub_biosdisk_read): Use get_safe_sectors.
	(grub_biosdisk_write): Likewise.

	* disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
	(grub_efidisk_write): Likewise.

	* disk/loopback.c (delete_loopback): Cosmetic changes.
	(grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
	correctly.
	(grub_loopback_open): Likewise.
	(grub_loopback_read): Likewise. Also, change the type of POS to
	grub_off_t, and fix the usage of grub_memset.

	* commands/i386/pc/play.c: Include grub/machine/time.h.

	* commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
	print FILE->SIZE.

	* commands/configfile.c: Include grub/env.h.

	* commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
	GRUB_ERRNO directly instead. Change the type of POS to
	grub_off_t. Follow the coding standard.

	* commands/blocklist.c: Include grub/partition.h.
	(grub_cmd_blocklist): Return an error if the underlying device is
	not a disk. Take the starting sector of a partition into account,
	if a partition is used.

	* boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
	a length field.
	(lba_mode): Support 64-bit addresses.
	(chs_mode): Likewise.
	(copy_buffer): Adapted to the new offsets of a length field and a
	segment field.
	(blocklist_default_start): Allocate 64-bit space.

	* boot/i386/pc/boot.S (force_lba): Removed.
	(boot_drive): Moved to under KERNEL_SECTOR.
	(kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
	space.
	(real_start): Set %si earlier. Remove code for FORCE_LBA, since it
	is useless.
	(lba_mode): Refactored to support a 64-bit address. More size
	optimization.
	(setup_sectors): Likewise.

2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added include/grub/i386/linux.h. Removed
	include/grub/i386/pc/linux.h

	* configure.ac (AC_INIT): Bumped to 1.94.

	* config.guess: Updated from gnulib.
	* config.sub: Likewise.
	* install-sh: Likewise.
	* mkinstalldirs: Likewise.

2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>

	* conf/common.rmk (grub_modules_init.lst): Depended on
	grub_emu_SOURCES, excluding grub_emu_init.c, instead of
	MODSRCFILES.

	* genmk.rb (PModule::rule): Reverted the previous change.

2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>

	* conf/common.rmk (grub_modules_init.lst): Depends on
	$(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
	that the target does not exist before producing.
	(grub_modules_init.h): Remove the target before generating.
	(grub_emu_init.c): Likewise.

	* genmk.rb (PModule::rule): Add source files into MODSRCFILES.

2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>

	* configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
	for the target-specific tests. Make sure that we also have the
	up-to-date target variables for those tests.

2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>

	* genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
	(PModule::rule): Likewise.

2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>

	* genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
	TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
	target-specific flags should be prefixed.
	(PModule::rule): Likewise.

2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac (CMP): Check if cmp is available explicitly.

2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
	(target_cpu): New variable.
	(pkglibdir): Use target_cpu instead of host_cpu.

	* util/i386/pc/grub-install.in (host_cpu): Removed.
	(target_cpu): New variable.
	(pkglibdir): Use target_cpu instead of host_cpu.

	* util/genmoddep.c: Removed.

	* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
	instead of GRUB_HOST_SIZEOF_VOID_P.
	* kern/dl.c: Likewise.

	* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
	...
	(GRUB_TARGET_SIZEOF_VOID_P): ... this.
	(GRUB_HOST_SIZEOF_LONG): Renamed to ...
	(GRUB_TARGET_SIZEOF_LONG): ... this.
	(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
	(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
	* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
	to ...
	(GRUB_TARGET_SIZEOF_VOID_P): ... this.
	(GRUB_HOST_SIZEOF_LONG): Renamed to ...
	(GRUB_TARGET_SIZEOF_LONG): ... this.
	(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
	(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
	* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
	to ...
	(GRUB_TARGET_SIZEOF_VOID_P): ... this.
	(GRUB_HOST_SIZEOF_LONG): Renamed to ...
	(GRUB_TARGET_SIZEOF_LONG): ... this.
	(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
	(GRUB_TARGET_WORDS_BIGENDIAN): ... this.

	* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
	GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
	[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
	instead of GRUB_HOST_SIZEOF_LONG.
	[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
	GRUB_HOST_WORDS_BIGENDIAN to define or undefine
	GRUB_CPU_WORDS_BIGENDIAN.
	Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
	define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
	grub_host_ssize_t.

	* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
	(genmoddep_SOURCES): Likewise.
	* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
	(genmoddep_SOURCES): Likewise.
	* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
	(genmoddep_SOURCES): Likewise.
	* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
	Likewise.
	(genmoddep_SOURCES): Likewise.

	* genmoddep.awk: New file.

	* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
	TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
	CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
	(PModule::rule): Likewise.
	(Program::rule): Likewise.
	(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
	BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
	respectively.

	* configure.ac: Rewritten intensively to use host and target
	instead of build and host, respectively.

	* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
	(host_cpu): Removed.
	(target_cpu): New variable.
	(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
	(BUILD_CC): Removed.
	(BUILD_CFLAGS): Likewise.
	(BUILD_CPPFLAGS): Likewise.
	(TARGET_CC): New variable.
	(TARGET_CFLAGS): Likewise.
	(TARGET_CPPFLAGS): Likewise.
	(TARGET_LDFLAGS): Likewise.
	(AWK): Likewise.
	(include): Use target_cpu instead of host_cpu.
	(moddep.lst:): Use genmoddep.awk instead of genmoddep.

	* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.

2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>

	* include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
	'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
	field 'false' to 'exec_on_false'.
	(grub_script_create_cmdif): Renamed argument names to reflect above
	changes.

	* normal/execute.c (grub_script_execute_cmdif): Likewise.

	* normal/script.c (grub_script_create_cmdif): Likewise.

2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
	top.
	(grub_hfsplus_btree_recptr): Likewise.
	(grub_hfsplus_find_block): Do not take RETRY any longer. Use
	FILEBLOCK both to pass a block number and store next block
	number.
	(grub_hfsplus_read_block): Rewritten heavily to support an extent
	overflow file correctly. Specify errors appropriately, because
	fshelp expects that GRUB_ERRNO is set when fails. Reuse
	grub_hfsplus_btree_recptr to get the pointer to a found key.
	(grub_hfsplus_btree_search): Return 1 instead of 0 when no match
	is found.

	* conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
	linux.mod.
	(_linux_mod_SOURCES): New variable.
	(_linux_mod_CFLAGS): Likewise.
	(_linux_mod_LDFLAGS): Likewise.
	(linux_mod_SOURCES): Likewise.
	(linux_mod_CFLAGS): Likewise.
	(linux_mod_LDFLAGS): Likewise.

	* DISTLIST: Added loader/i386/efi/linux.c,
	loader/i386/efi/linux_normal.c and
	include/grub/i386/efi/loader.h.

	* loader/i386/efi/linux.c: New file.
	* loader/i386/efi/linux_normal.c: Likewise.
	* include/grub/i386/efi/loader.h: Likewise.

2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>

	* commands/blocklist.c: New file.

	* DISTLIST: Added commands/blocklist.c.

	* term/efi/console.c (grub_console_highlight_color): Use a lighter
	color for the background, and a darker color for the foreground.
	(grub_console_checkkey): Return READ_KEY.
	(grub_console_cls): Set the background to
	GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.

	* kern/efi/efi.c (grub_efi_exit_boot_services): New function.

	* include/grub/i386/linux.h (struct linux_kernel_params): Fixed
	the size of "padding5", "hd0_drive_info" and "hd1_drive_info".

	* include/grub/efi/efi.h (grub_efi_exit_boot_services): New
	prototype.

	* include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
	BG. The spec is wrong again.

	* include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
	prototype.
	[GRUB_UTIL] (grub_blocklist_fini): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added
	commands/blocklist.c.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
	(blocklist_mod_SOURCES): New variable.
	(blocklist_mod_CFLAGS): Likewise.
	(blocklist_mod_LDFLAGS): Likewise.

2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
	duplication.
	(lba_mode): Use %eax more intensively to reduce the code size.

2006-05-20  Marco Gerards  <marco@gnu.org>

	* normal/lexer.c (grub_script_yylex): Don't filter out newlines.

	* normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
	for `menuentry'.
	(script): Accept leading newlines.
	(newlines): New rule to describe 0 or more newlines.
	(commands): Accept `command' with trailing newline.  Fixed the
	order in which arguments were passed to `grub_script_add_cmd'.
	Accept commands separated by newlines.
	(function): Changed to accept newlines.
	(menuentry) Rewritten.

	* normal/script.c (grub_script_create_cmdmenu): Add new entries in
	front of the list, instead of to the end.

2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-install.in (bindir): New variable.
	(grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
	Shaver <lbgwjl@gmail.com>.

2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
	grub/machine/linux.h
	* loader/i386/pc/linux.c: Likewise.

	* include/grub/i386/pc/linux.h: Moved to ...
	* include/grub/i386/linux.h: ... here.

	* include/grub/i386/linux.h (struct linux_kernel_params): New
	struct.

2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>

	* video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
	checking.
	(grub_video_vbe_blit_glyph): Likewise.
	(grub_video_vbe_blit_bitmap): Likewise.
	(grub_video_vbe_blit_render_target): Likewise.

2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac (--with-platform): Properly quote the square
	brackets.

2006-05-08  Marco Gerards  <marco@gnu.org>

	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
	this...
	(kernel_elf_HEADERS): ...to this.  Updated all users.
	(grubof_symlist.c): Renamed from this...
	(kernel_elf_symlist.c): ...to this.  Updated all users.
	(pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
	(grubof_SOURCES): Renamed from this...
	(kernel_elf_SOURCES): ...to this.
	(grubof_HEADERS): Renamed from this...
	(kernel_elf_HEADERS): ...to this.
	(grubof_CFLAGS): Renamed from this...
	(kernel_elf_CFLAGS): ...to this.
	(grubof_ASFLAGS): Renamed from this...
	(kernel_elf_ASFLAGS): ...to this.
	(grubof_LDFLAGS): Renamed from this...
	(kernel_elf_LDFLAGS): ...to this.

	* conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
	this...
	(kernel_elf_HEADERS): ...to this.  Updated all users.
	(grubof_symlist.c): Renamed from this...
	(kernel_elf_symlist.c): ...to this.  Updated all users.
	(pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
	(grubof_SOURCES): Renamed from this...
	(kernel_elf_SOURCES): ...to this.
	(grubof_HEADERS): Renamed from this...
	(kernel_elf_HEADERS): ...to this.
	(grubof_CFLAGS): Renamed from this...
	(kernel_elf_CFLAGS): ...to this.
	(grubof_ASFLAGS): Renamed from this...
	(kernel_elf_ASFLAGS): ...to this.
	(grubof_LDFLAGS): Renamed from this...
	(kernel_elf_LDFLAGS): ...to this.

	* util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
	`kernel.elf' instead of `grubof'.

2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>

	Add --with-platform to configure. Use pkglibdir instead of
	pkgdatadir. This is reported by Roger Leigh.

	* util/powerpc/ieee1275/grub-install.in (datadir): Removed.
	(host_vendor): Likewise.
	(host_os): Likewise.
	(pkgdatadir): Likewise.
	(platform): New variable.
	(pkglibdir): Likewise.
	Use PKGLIBDIR instead of PKGDATADIR.

	* util/i386/pc/grub-install.in (datadir): Removed.
	(host_vendor): Likewise.
	(host_os): Likewise.
	(pkgdatadir): Likewise.
	(platform): New variable.
	(pkglibdir): Likewise.
	Use PKGLIBDIR instead of PKGDATADIR.

	* util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
	instead of GRUB_DATADIR.
	(main): Likewise.
	* util/i386/pc/grub-mkimage.c (usage): Likewise.
	(main): Likewise.
	* util/i386/efi/grub-mkimage.c (usage): Likewise.
	(main): Likewise.

	* configure.ac (--with-platform): New option.
	Use PLATFORM instead of HOST_VENDOR to specify a platform.

	* Makefile.in: Include a makefile based on PLATFORM instead of
	HOST_VENDOR.
	(pkgdatadir): Not appended by the machine type.
	(pkglibdir): Appended by the machine type.
	(host_vendor): Removed.
	(platform): New variable.
	(BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
	(install-local): Use PKGLIBDIR instead of PKGDATADIR.
	(uninstall): Likewise.

2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>

	Use the environment context in the menu. Remove the commands
	"default" and "timeout", and use variables instead.

	* normal/menu.c: Include grub/env.h.
	(print_entry): Cast TITLE to silence gcc.
	(get_timeout): New function.
	(set_timeout): Likewise.
	(get_entry_number): Likewise.
	(run_menu): Use a default entry, a fallback entry and a timeout
	in the environment variables "default", "fallback" and
	"timeout". Also, tweak the default entry if it is not within the
	current menu entries.
	(grub_menu_run): Use a fallback entry in the environment variable
	"fallback".

	* normal/main.c (read_config_file): Do not initialize
	NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
	NEWMENU->TIMEOUT.
	(grub_normal_execute): Use a data slot to store the menu.

	* include/grub/normal.h (struct grub_menu): Removed default_entry,
	fallback_entry and timeout.
	(struct grub_menu_list): Removed.
	(grub_menu_list_t): Likewise.
	(struct grub_context): Likewise.
	(grub_context_t): Likewise.
	(grub_context_get): Likewise.
	(grub_context_get_current_menu): Likewise.
	(grub_context_push_menu): Likewise.
	(grub_context_pop_menu): Likewise.
	(grub_default_init): Likewise.
	(grub_default_fini): Likewise.
	(grub_timeout_init): Likewise.
	(grub_timeout_fini): Likewise.

	* conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
	and timeout.mod.
	(normal_mod_SOURCES): Removed normal/context.c.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
	commands/default.c, commands/timeout.c and normal/context.c.
	(normal_mod_SOURCES): Removed normal/context.c.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
	commands/timeout.c and normal/context.c.
	(normal_mod_SOURCES): Removed normal/context.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Removed
	commands/default.c, commands/timeout.c and normal/context.c.
	(normal_mod_SOURCES): Removed normal/context.c.

	* conf/common.rmk (pkgdata_MODULES): Removed default.mod and
	timeout.mod.
	(default_mod_SOURCES): Removed.
	(default_mod_CFLAGS): Likewise.
	(default_mod_LDFLAGS): Likewise.
	(timeout_mod_SOURCES): Removed.
	(timeout_mod_CFLAGS): Likewise.
	(timeout_mod_LDFLAGS): Likewise.

	* DISTLIST: Removed commands/default.c, commands/timeout.c and
	normal/context.c.

	* commands/default.c: Removed.
	* commands/timeout.c: Likewise.
	* normal/context.c: Likewise.

2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>

	* kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.

2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/env.c (struct grub_env_context): Removed "sorted". Renamed
	"next" to "prev" for readability.
	(struct grub_env_sorted_var): New struct.
	(grub_env_context): Renamed to ...
	(initial_context): ... this.
	(grub_env_var_context): Renamed to ...
	(current_context): ... this.
	(grub_env_find): Look only at CURRENT_CONTEXT.
	(grub_env_context_open): Rewritten to copy exported variables from
	previous context.
	(grub_env_context_close): Rewritten according to the new
	scheme. Also, add an assertion to prevent the initial context from
	removed.
	(grub_env_insert): Removed the code for the sorted list.
	(grub_env_remove): Likewise.
	(grub_env_export): Simply mark the variable with
	GRUB_ENV_VAR_GLOBAL.
	(grub_env_set): A cosmetic change for naming consistency.
	(grub_env_get): Likewise.
	(grub_env_unset): Likewise.
	(grub_env_iterate): Rewritten to sort variables within this
	function.
	(grub_register_variable_hook): Fixed for naming consistency. Call
	grub_env_find again, only if NAME is not found at the first time.
	(mangle_data_slot_name): New function.
	(grub_env_set_data_slot): Likewise.
	(grub_env_get_data_slot): Likewise.
	(grub_env_unset_data_slot): Likewise.

	* include/grub/env.h (grub_env_var_type): New enum.
	(GRUB_ENV_VAR_LOCAL): New constant.
	(GRUB_ENV_VAR_GLOBAL): Likewise.
	(GRUB_ENV_VAR_DATA): Likewise.
	(struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
	"type".
	(grub_env_set): Replace VAR with NAME for consistency.
	(grub_register_variable_hook): Likewise.
	(grub_env_export): Specify the name of the argument.
	(grub_env_set_data_slot): New prototype.
	(grub_env_get_data_slot): Likewise.
	(grub_env_unset_data_slot): Likewise.

2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>

	Extend the loader so that GRUB can accept a loader which comes
	back to GRUB when a loaded image exits. Also, this change adds
	support for a chainloader on EFI.

	* term/efi/console.c: Include grub/misc.h.
	(grub_console_checkkey): Display a scan code on the top for
	debugging. This will be removed once the EFI port gets stable.
	Correct the scan code mapping.

	* kern/efi/mm.c (sort_memory_map): Sort in a descending order to
	allocate memory from larger regions, in order to reduce the number
	of allocated regions. Otherwise, the MacOSX loader panics.
	(filter_memory_map): Avoid less than 1MB for compatibility with
	other loaders.
	(add_memory_regions): Allocate from the tail of a region, if
	possible, to avoid allocating a region near to 1MB, for the MacOSX
	loader.

	* kern/efi/init.c (grub_efi_set_prefix): Specify
	GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.

	* kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
	argument IMAGE_HANDLE and specify it to get a loaded image.
	(grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
	grub_efi_get_loaded_image.
	(grub_efi_get_filename): Divide the length by the size of
	grub_efi_char16_t.
	(grub_efi_get_device_path): New function.
	(grub_efi_print_device_path): Print End Device Path nodes. Divide
	the length by the size of grub_efi_char16_t for a file path device
	path node.

	* kern/loader.c (grub_loader_noreturn): New variable.
	(grub_loader_set): Accept a new argument NORETURN. Set
	GRUB_LOADER_NORETURN to NORETURN.
	All callers changed.
	(grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
	grub_machine_fini.

	* include/grub/efi/efi.h (grub_efi_get_device_path): New
	prototype.
	(grub_efi_get_loaded_image): Take an argument to specify an image
	handle.

	* include/grub/loader.h (grub_loader_set): Added one more argument
	NORETURN.

	* disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
	instead of grub_efi_open_protocol.
	(grub_efidisk_get_device_name): Likewise.
	(grub_efidisk_close): Print a newline.
	(grub_efidisk_get_device_handle): Fixed to use
	GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
	GRUB_EFI_DEVICE_PATH_TYPE.

	* disk/efi/efidisk.c (device_path_guid): Moved to ...
	* kern/efi/efi.c (device_path_guid): ... here.

	* conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
	chain.mod.
	(kernel_mod_HEADERS): Added efi/disk.h.
	(_chain_mod_SOURCES): New variable.
	(_chain_mod_CFLAGS): Likewise.
	(_chain_mod_LDFLAGS): Likewise.
	(chain_mod_SOURCES): Likewise.
	(chain_mod_CFLAGS): Likewise.
	(chain_mod_LDFLAGS): Likewise.

	* DISTLIST: Added include/grub/efi/chainloader.h,
	loader/efi/chainloader.c and loader/efi/chainloader_normal.c.

	* include/grub/efi/chainloader.h: New file.
	* loader/efi/chainloader.c: Likewise.
	* loader/efi/chainloader_normal.c: Likewise.

2006-04-30  Marco Gerards  <marco@gnu.org>

	* commands/configfile.c (grub_cmd_source): New function.
	(GRUB_MOD_INIT): Register the commands `source' and `.'.
	(GRUB_MOD_FINI): De-register the commands `source' and `.'.

2006-04-30  Marco Gerards  <marco@gnu.org>

	* normal/execute.c (grub_script_execute_cmd): Change the return
	type to `grub_err_t'.  Correctly return the error.
	(grub_script_execute_cmdline): In case a command line is not a
	command or a function, try to interpret it as an assignment.

2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
	(grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
	skip a node whose name is obviously invalid as UTF-16,
	i.e. contains a NUL character. Stop the iteration when the last
	directory entry is found. Instead of using the return value of
	grub_hfsplus_btree_iterate_node, store the value in RET and use
	it, because the iterator can be stopped by the last directory
	entry.

2006-04-30  Marco Gerards  <marco@gnu.org>

	* include/grub/env.h (grub_env_export): New prototype.  Reported
	by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.

2006-04-30  Marco Gerards  <marco@gnu.org>

	* fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
	size of the extents in a catalog file record.

2006-04-29  Marco Gerards  <marco@gnu.org>

	* commands/configfile.c (grub_cmd_configfile): Execute the
	configfile within its own context.

	* include/grub/env.h (grub_env_context_open): New prototype.
	(grub_env_context_close): Likewise.

	* kern/env.c (grub_env): Removed.
	(grub_env_sorted): Likewise.
	(grub_env_context): New variable.
	(grub_env_var_context): Likewise.
	(grub_env_find): Search both the active context and the global
	context.
	(grub_env_context_open): New function.
	(grub_env_context_close): Likewise.
	(grub_env_insert): Likewise.
	(grub_env_remove): Likewise.
	(grub_env_export): Likewise.
	(grub_env_set): Changed to use helper functions to avoid code
	duplication.
	(grub_env_iterate): Rewritten so both the current context and the
	global context are being used.

	* normal/command.c (export_command): New function.
	(grub_command_init): Register the `export' function.

2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
	explicitly to suppress gcc's warnings.
	* fs/fat.c (grub_fat_find_dir): Likewise.
	(grub_fat_label): Likewise.
	* fs/xfs.c (grub_xfs_read_inode): Likewise.
	(grub_xfs_mount): Likewise.
	(grub_xfs_label): Likewise.
	* fs/affs.c (grub_affs_mount): Likewise.
	(grub_affs_label): Likewise.
	(grub_affs_iterate_dir): Likewise.
	* fs/sfs.c (grub_sfs_mount): Likewise.
	(grub_sfs_iterate_dir): Likewise.
	* fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
	* fs/hfs.c (grub_hfs_mount): Likewise.
	(grub_hfs_cmp_catkeys): Likewise.
	(grub_hfs_find_dir): Likewise.
	(grub_hfs_dir): Likewise.
	(grub_hfs_label): Likewise.
	* fs/jfs.c (grub_jfs_mount): Likewise.
	(grub_jfs_opendir): Likewise.
	(grub_jfs_getent): Likewise.
	(grub_jfs_lookup_symlink): Likewise.
	(grub_jfs_label): Likewise.
	* fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
	(grub_hfsplus_iterate_dir): Likewise.
	(grub_hfsplus_btree_iterate_node): Made static.

	* util/grub-emu.c (prefix): New variable.
	(grub_machine_set_prefix): New function.
	(main): Do not set the environment variable "prefix" here. Only
	set PREFIX, which is used later by grub_machine_set_prefix.

	* include/grub/video.h: Do not include grub/symbol.h.
	(grub_video_register): Not exported. This symbol is not defined in
	the kernel.
	(grub_video_unregister): Likewise.
	(grub_video_iterate): Likewise.
	(grub_video_setup): Likewise.
	(grub_video_restore): Likewise.
	(grub_video_get_info): Likewise.
	(grub_video_get_blit_format): Likewise.
	(grub_video_set_palette): Likewise.
	(grub_video_get_palette): Likewise.
	(grub_video_set_viewport): Likewise.
	(grub_video_get_viewport): Likewise.
	(grub_video_map_color): Likewise.
	(grub_video_map_rgb): Likewise.
	(grub_video_map_rgba): Likewise.
	(grub_video_fill_rect): Likewise.
	(grub_video_blit_glyph): Likewise.
	(grub_video_blit_bitmap): Likewise.
	(grub_video_blit_render_target): Likewise.
	(grub_video_scroll): Likewise.
	(grub_video_swap_buffers): Likewise.
	(grub_video_create_render_target): Likewise.
	(grub_video_delete_render_target): Likewise.
	(grub_video_set_active_render_target): Likewise.

	* include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
	Undefined.
	[GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.

	* conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
	config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
	(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
	instead of $(srcdir)/genkernsyms.sh.

	* conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
	config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
	(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
	instead of $(srcdir)/genkernsyms.sh.

	* conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
	gensymlist.sh instead of $(srcdir)/gensymlist.sh.
	(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
	instead of $(srcdir)/genkernsyms.sh.

	* conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
	gensymlist.sh instead of $(srcdir)/gensymlist.sh.
	(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
	instead of $(srcdir)/genkernsyms.sh.

	* configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
	genkernsyms.sh.

	* Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
	genkernsyms.sh.
	(gensymlist.sh): New target.
	(genkernsyms.sh): Likewise.

	* DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
	genkernsyms.sh.in and gensymlist.sh.in.

	* genkernsyms.sh: Removed.
	* gensymlist.sh: Likewise.

	* genkernsyms.sh.in: New file.
	* gensymlist.sh.in: Likewise.

2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
	clobber "prefix", since we may have already set it manually.

2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/misc.c (abort): New alias for grub_abort.

2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>

	A new machine-specific function "grub_machine_set_prefix" is
	defined. This is called after loading modules, so that a prefix
	initialization can use modules. Also, this change adds an
	intensive debugging feature for the memory manager via the
	configure option "--enable-mm-debug".

	* partmap/gpt.c (gpt_partition_map_iterate): Add one more into
	PART.LEN.

	* kern/sparc64/ieee1275/init.c (abort): Removed.
	(grub_stop): Likewise.
	(grub_exit): New function.
	(grub_set_prefix): Renamed to ...
	(grub_machine_set_prefix): ... this.
	(grub_machine_init): Do not call grub_set_prefix.

	* kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
	(grub_machine_set_prefix): ... this.
	(grub_machine_init): Do not call grub_set_prefix.

	* kern/i386/pc/init.c (grub_machine_set_prefix): New function.
	(grub_machine_init): Do not set the prefix here.

	* kern/i386/efi/init.c (grub_machine_set_prefix): New function.

	* kern/efi/init.c: Include grub/mm.h.
	(grub_efi_set_prefix): New function.

	* kern/efi/efi.c (grub_exit): Call grub_efi_fini.
	(grub_efi_get_filename): New function.
	(grub_print_device_path): Renamed to ...
	(grub_efi_print_device_path): ... this.

	* kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
	[MM_DEBUG] (grub_realloc): Likewise.
	[MM_DEBUG] (grub_free): Likewise.
	[MM_DEBUG] (grub_memalign): Likewise.
	[MM_DEBUG] (grub_mm_debug): New variable.
	[MM_DEBUG] (grub_debug_malloc): New function.
	[MM_DEBUG] (grub_debug_free): New function.
	[MM_DEBUG] (grub_debug_realloc): New function.
	[MM_DEBUG] (grub_debug_memalign): New function.

	* kern/misc.c (grub_abort): Print a newline to distinguish
	the message.

	* kern/main.c (grub_main): Call grub_machine_set_prefix and
	grub_set_root_dev after loading modules. This is necessary when
	setting a prefix depends on modules.

	* include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
	(grub_efi_print_device_path): ... this.
	(grub_efi_get_filename): New prototype.
	(grub_efi_set_prefix): Likewise.

	* include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
	and grub/disk.h.
	(grub_efidisk_get_device_handle): New prototype.
	(grub_efidisk_get_device_name): Likewise.

	* include/grub/mm.h: Include config.h.
	(MM_DEBUG): Removed.
	[MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
	[MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
	[MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
	[MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
	[MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
	[MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
	[MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
	[MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
	[MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.

	* include/grub/kernel.h (grub_machine_set_prefix): New prototype.

	* disk/efi/efidisk.c: Include grub/partition.h.
	(iterate_child_devices): New function.
	(add_device): First, compare only last device path nodes, so that
	devices are sorted by the types.
	(grub_efidisk_get_device_handle): New function.
	(grub_efidisk_get_device_name): Likewise.

	* configure.ac (--enable-mm-debug): New option to enable the
	memory manager debugging feature. This makes the binary much
	bigger, so is disabled by default.

2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>

	Use grub_abort instead of grub_stop, and grub_exit must be
	define in each architecture now. Also, this change adds support
	for EFI disks.

	* util/i386/pc/grub-probefs.c: Include grub/term.h.
	(grub_getkey): New function.
	(grub_term_get_current): Likewise.

	* util/i386/pc/grub-setup.c: Include grub/term.h.
	(grub_getkey): New function.
	(grub_term_get_current): Likewise.

	* util/misc.c (grub_stop): Renamed to ...
	(grub_exit): ... this.

	* kern/powerpc/ieee1275/init.c (abort): Renamed to ...
	(grub_exit): ... this.
	(grub_machine_init): Use grub_abort instead of abort.
	(grub_stop): Removed.

	* kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
	abort.

	* kern/i386/pc/startup.S (grub_exit): New function.
	(cold_reboot): New label.

	* kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
	(grub_efi_init): Call grub_efidisk_init.
	(grub_efi_fini): Call grub_efidisk_fini.

	* kern/efi/efi.c: Include grub/mm.h.
	(grub_efi_console_control_guid): Renamed to ...
	(console_control_guid): ... this.
	(grub_efi_loaded_image_guid): Renamed to ...
	(loaded_image_guid): ... this.
	(grub_efi_locate_handle): New function.
	(grub_efi_open_protocol): Likewise.
	(grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
	GRUB_EFI_CONSOLE_CONTROL_GUID.
	(grub_efi_exit): Removed.
	(grub_stop): Likewise.
	(grub_efi_get_loaded_image): Use grub_efi_open_protocol.
	(grub_exit): New function.
	(grub_print_device_path): Likewise.

	* kern/rescue.c (grub_rescue_cmd_exit): New function.
	(grub_enter_rescue_mode): Register "exit".

	* kern/misc.c (grub_real_dprintf): A cosmetic change.
	(grub_abort): New function.

	* kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.

	* include/grub/sparc64/ieee1275/kernel.h (abort): Removed.

	* include/grub/powerpc/ieee1275/kernel.h (abort): Removed.

	* include/grub/efi/efi.h (grub_efi_exit): Removed.
	(grub_print_device_path): New prototype.
	(grub_efi_locate_handle): Likewise.
	(grub_efi_open_protocol): Likewise.

	* include/grub/efi/disk.h (grub_efidisk_fini): New file.
	* disk/efi/efidisk.c: Likewise.

	* DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.

	* include/grub/efi/console_control.h
	(GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.

	* include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
	last 8 bytes as an array.
	(GRUB_EFI_DISK_IO_GUID): New macro.
	(GRUB_EFI_BLOCK_IO_GUID): Likewise.
	(GRUB_EFI_DEVICE_PATH_GUID): Likewise.
	(grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
	grub_uint8_t.
	(struct grub_efi_guid): Use an array to specify the last 8 bytes.
	(struct grub_efi_device_path): Rename the member "sub_type" to
	"subtype".
	(GRUB_EFI_DEVICE_PATH_TYPE): New macro.
	(GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
	(GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
	(GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
	(GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
	(GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
	(GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
	(GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
	(GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
	(GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
	(struct grub_efi_pci_device_path): New structure.
	(grub_efi_pci_device_path_t): New type.
	(GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_pccard_device_path): New structure.
	(grub_efi_pccard_device_path_t): New type.
	(GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_memory_mapped_device_path): New structure.
	(grub_efi_memory_mapped_device_path_t): New type.
	(GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_vendor_device_path): New structure.
	(grub_efi_vendor_device_path_t): New type.
	(GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_controller_device_path): New structure.
	(grub_efi_controller_device_path_t): New type.
	(GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
	(GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
	(struct grub_efi_acpi_device_path): New structure.
	(grub_efi_acpi_device_path_t): New type.
	(GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_expanded_acpi_device_path): New structure.
	(grub_efi_expanded_acpi_device_path_t): New type.
	(GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
	(GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
	(GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
	(GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
	(GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
	(struct grub_efi_atapi_device_path): New structure.
	(grub_efi_atapi_device_path_t): New type.
	(GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_fibre_channel_device_path): New structure.
	(grub_efi_fibre_channel_device_path_t): New type.
	(GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_1394_device_path): New structure.
	(grub_efi_1394_device_path_t): New type.
	(GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_usb_device_path): New structure.
	(grub_efi_usb_device_path_t): New type.
	(GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_usb_class_device_path): New structure.
	(grub_efi_usb_class_device_path_t): New type.
	(GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_i2o_device_path): New structure.
	(grub_efi_i2o_device_path_t): New type.
	(GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_mac_address_device_path): New structure.
	(grub_efi_mac_address_device_path_t): New type.
	(GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_ipv4_device_path): New structure.
	(grub_efi_ipv4_device_path_t): New type.
	(GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_ipv6_device_path): New structure.
	(grub_efi_ipv6_device_path_t): New type.
	(GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_infiniband_device_path): New structure.
	(grub_efi_infiniband_device_path_t): New type.
	(GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_uart_device_path): New structure.
	(grub_efi_uart_device_path_t): New type.
	(GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_vendor_messaging_device_path): New structure.
	(grub_efi_vendor_messaging_device_path_t): New type.
	(GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
	(GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
	(struct grub_efi_hard_drive_device_path): New structure.
	(grub_efi_hard_drive_device_path_t): New type.
	(GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_cdrom_device_path): New structure.
	(grub_efi_cdrom_device_path_t): New type.
	(GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_vendor_media_device_path): New structure.
	(grub_efi_vendor_media_device_path_t): New type.
	(GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_file_path_device_path): New structure.
	(grub_efi_file_path_device_path_t): New type.
	(GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
	(struct grub_efi_protocol_device_path): New structure.
	(grub_efi_protocol_device_path_t): New type.
	(GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
	(GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
	(struct grub_efi_bios_device_path): New structure.
	(grub_efi_bios_device_path_t): New type.
	(struct grub_efi_disk_io): New structure.
	(grub_efi_disk_io_t): New type.
	(struct grub_efi_block_io_media): New structure.
	(grub_efi_block_io_media_t): New type.
	(struct grub_efi_block_io): New structure.
	(grub_efi_block_io_t): New type.

	* include/grub/misc.h (grub_stop): Removed.
	(grub_exit): New prototype.
	(grub_abort): Likewise.

	* include/grub/disk.h (enum grub_disk_dev_id): Added
	GRUB_DISK_DEVICE_EFIDISK_ID.

	* conf/i386-efi.rmk (kernel_mod_SOURCES): Added
	disk/efi/efidisk.c.
	(kernel_syms.lst): Remove the target if an error occurs.

2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
	as it was simply too buggy.

2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/misc.c (grub_lltoa): New function.
	(grub_vsprintf): Added support for the long long suffix,
	i.e. "ll".

2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>

	* Makefile.in (LDFLAGS): Add variable.
	(LD): Remove variable.
	* configure.ac: Add -m32 to LDFLAGS.
	* genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
	* conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
	(grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
	(_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
	suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
	variables.
	* conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
	* conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
	* conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.

2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>

	* term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
	length for unknown glyph.

2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>

	Add support for pre-loaded modules into the EFI port.

	* util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
	completely. Accept one more argument DIR. The caller has changed.

	* kern/i386/efi/init.c (grub_arch_modules_addr): Removed.

	* kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
	(grub_efi_loaded_image_guid): New variable.
	(grub_efi_get_loaded_image): New function.
	(grub_arch_modules_addr): Likewise.

	* include/grub/efi/efi.h (grub_efi_get_loaded_image): New
	prototype.

	* include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
	(struct grub_efi_loaded_image): New structure.
	(grub_efi_loaded_image_t): New type.

2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
	size with GRUB_OS_AREA_SIZE as grub_size_t instead of
	grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.

2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>

	* DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.

2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added include/grub/efi/console.h,
	include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
	kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.

	* include/grub/efi/console.h: New file.
	* include/grub/efi/time.h: Likewise.
	* include/grub/i386/efi/kernel.h: Likewise.
	* kern/efi/init.c: Likewise.
	* kern/efi/mm.c: Likewise.
	* term/efi/console.c: Likewise.

	* kern/i386/efi/init.c: Do not include grub/machine/time.h.
	(grub_stop): Removed.
	(grub_get_rtc): Likewise.
	(grub_machine_init): Simply call grub_efi_init.
	(grub_machine_fini): Call grub_efi_fini.

	* kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
	(grub_efi_output_string): Removed.
	(grub_efi_stall): New function.
	(grub_stop): Likewise.
	(grub_get_rtc): Likewise.

	* include/grub/efi/efi.h (grub_efi_output_string): Removed.
	(grub_efi_stall): New prototype.
	(grub_efi_allocate_pages): Likewise.
	(grub_efi_free_pages): Likewise.
	(grub_efi_get_memory_map): Likewise.
	(grub_efi_mm_init): Likewise.
	(grub_efi_mm_fini): Likewise.
	(grub_efi_init): Likewise.
	(grub_efi_fini): Likewise.

	* include/grub/i386/efi/time.h: Do not include
	grub/symbol.h. Include grub/efi/time.h.
	(GRUB_TICKS_PER_SECOND): Removed.
	(grub_get_rtc): Likewise.

	* include/grub/efi/api.h (struct grub_efi_memory_descriptor):
	Added padding. The EFI spec is buggy.
	(GRUB_EFI_BLACK): New macro.
	(GRUB_EFI_BLUE): Likewise.
	(GRUB_EFI_GREEN): Likewise.
	(GRUB_EFI_CYAN): Likewise.
	(GRUB_EFI_RED): Likewise.
	(GRUB_EFI_MAGENTA): Likewise.
	(GRUB_EFI_BROWN): Likewise.
	(GRUB_EFI_LIGHTGRAY): Likewise.
	(GRUB_EFI_BRIGHT): Likewise.
	(GRUB_EFI_DARKGRAY): Likewise.
	(GRUB_EFI_LIGHTBLUE): Likewise.
	(GRUB_EFI_LIGHTGREEN): Likewise.
	(GRUB_EFI_LIGHTCYAN): Likewise.
	(GRUB_EFI_LIGHTRED): Likewise.
	(GRUB_EFI_LIGHTMAGENTA): Likewise.
	(GRUB_EFI_YELLOW): Likewise.
	(GRUB_EFI_WHITE): Likewise.
	(GRUB_EFI_BACKGROUND_BLACK): Likewise.
	(GRUB_EFI_BACKGROUND_BLUE): Likewise.
	(GRUB_EFI_BACKGROUND_GREEN): Likewise.
	(GRUB_EFI_BACKGROUND_CYAN): Likewise.
	(GRUB_EFI_BACKGROUND_RED): Likewise.
	(GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
	(GRUB_EFI_BACKGROUND_BROWN): Likewise.
	(GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
	(GRUB_EFI_TEXT_ATTR): Likewise.

	* conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
	kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
	(kernel_mod_HEADERS): Added efi/time.h.

2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
	include/grub/efi/api.h, include/grub/efi/console_control.h,
	include/grub/efi/efi.h, include/grub/efi/pe32.h,
	include/grub/i386/efi/time.h, kern/efi/efi.c,
	kern/i386/efi/init.c, kern/i386/efi/startup.S,
	and util/i386/efi/grub-mkimage.c.

	* Makefile.in (RMKFILES): Added i386-efi.rmk.

	* genmk.rb (PModule#rule): Do not export symbols if
	#{prefix}_EXPORTS is set to "no".

	* conf/i386-efi.mk: New file.
	* conf/i386-efi.rmk: Likewise.
	* include/grub/efi/api.h: Likewise.
	* include/grub/efi/console_control.h: Likewise.
	* include/grub/efi/efi.h: Likewise.
	* include/grub/efi/pe32.h: Likewise.
	* include/grub/i386/efi/time.h: Likewise.
	* kern/efi/efi.c: Likewise.
	* kern/i386/efi/init.c: Likewise.
	* kern/i386/efi/startup.S: Likewise.
	* util/i386/efi/grub-mkimage.c: Likewise.

2006-04-17  Marco Gerards  <marco@gnu.org>

	* include/grub/script.h: Include <grub/parser.h> and
	"grub_script.tab.h".
	(struct grub_lexer_param): New struct.
	(struct grub_parser_param): Likewise.
	(grub_script_create_arglist): Pass the state in an argument.
	(grub_script_add_arglist): Likewise.
	(grub_script_create_cmdline): Likewise.
	(grub_script_create_cmdblock): Likewise.
	(grub_script_create_cmdif): Likewise.
	(grub_script_create_cmdmenu): Likewise.
	(grub_script_add_cmd): Likewise.
	(grub_script_arg_add): Likewise.
	(grub_script_lexer_ref): Likewise.
	(grub_script_lexer_deref): Likewise.
	(grub_script_lexer_record_start): Likewise.
	(grub_script_lexer_record_stop): Likewise.
	(grub_script_mem_record): Likewise.
	(grub_script_mem_record_stop): Likewise.
	(grub_script_malloc): Likewise.
	(grub_script_yylex): Likewise.
	(grub_script_yyparse): Likewise.
	(grub_script_yyerror): Likewise.
	(grub_script_yylex): Likewise.
	(grub_script_lexer_init): Return the state.

	* normal/lexer.c (grub_script_lexer_state): Removed variable.
	(grub_script_lexer_done): Likewise.
	(grub_script_lexer_getline): Likewise.
	(grub_script_lexer_refs): Likewise.
	(script): Likewise.
	(newscript): Likewise.
	(record): Likewise.
	(recording): Likewise.
	(recordpos): Likewise.
	(recordlen): Likewise.
	(grub_script_lexer_init): Return the state instead of setting
	global variables.
	(grub_script_lexer_ref): Use the newly added argument for state
	instead of globals.
	(grub_script_lexer_deref): Likewise.
	(grub_script_lexer_record_start): Likewise.
	(grub_script_lexer_record_stop): Likewise.
	(recordchar): Likewise.
	(nextchar): Likewise.
	(grub_script_yylex2): Likewise.
	(grub_script_yylex): Likewise.
	(grub_script_yyerror): Likewise.

	* normal/parser.y (func_mem): Removed variable.
	(menu_entry): Likewise.
	(err): Likewise.
	(%lex-param): New parser option.
	(%parse-param): Likewise.
	(script): Always return the AST.
	(argument): Pass the state around.
	(arguments): Likewise.
	(grubcmd): Likewise.
	(commands): Likewise.
	(function): Likewise.
	(menuentry): Likewise.
	(if_statement): Likewise.
	(if): Likewise.

	* normal/script.c (grub_script_memused): Removed variable.
	(grub_script_parsed): Likewise.
	(grub_script_malloc): Added a state argument.  Use that instead of
	global variables.
	(grub_script_mem_record): Likewise.
	(grub_script_mem_record_stop): Likewise.
	(grub_script_arg_add): Likewise.
	(grub_script_add_arglist): Likewise.
	(grub_script_create_cmdline): Likewise.
	(grub_script_create_cmdif): Likewise.
	(grub_script_create_cmdmenu): Likewise.
	(grub_script_add_cmd): Likewise.
	(grub_script_parse): Setup the state before calling the parser.

2006-04-16  Marco Gerards  <marco@gnu.org>

	* normal/command.c (grub_command_init): Remove the title command.

	* normal/lexer.c (grub_script_yylex): Renamed from this...
	(grub_script_yylex2): ... to this.
	(grub_script_yylex): New function.  Temporary
	introduced to filter some tokens.
	(grub_script_yyerror): Print a newline.

	* normal/main.c (read_config_file): Output information about the
	lines that contain errors.  Wait for a key after all lines have
	been processed.  Don't return an empty menu.

	* normal/parser.y (func_mem): Don't initialize.
	(menu_entry): Likewise.
	(err): New variable.
	(script): Don't return anything when an error was encountered.
	(ws, returns): Removed rules.
	(argument): Disabled concatenated variable support.
	(arguments): Remove explicit separators.
	(grubcmd): Likewise.
	(function): Likewise.
	(menuentry): Likewise.
	(if): Likewise.
	(commands): Likewise.  Add error handling.

	* normal/script.c (grub_script_create_cmdline): If
	`grub_script_parsed' is 0, assume the parser encountered an error.

2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac: Add support for EFI. Fix the typo
	BUILD_LDDFLAGS. Restore the LDFLAGS after testing.

2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>

	* util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
	foreign multibyte characters should be shown correctly.

2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>

	* normal/main.c (grub_normal_menu_addentry): Fixed menu size
	calculation.
	(read_config_file): Made it to close file before returning.

2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>

	* DISTLIST: Added include/grub/i386/pc/vbeblit.h,
	include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
	video/i386/pc/vbefill.c.

	* conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
	video/i386/pc/vbefill.c.

	* include/grub/video.h (grub_video_blit_format): New enum.
	(grub_video_mode_info): Added new member blit_format.
	(grub_video_get_blit_format): New function prototype.

	* include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
	function prototype.
	(grub_video_vbe_map_rgb): Likewise.
	(grub_video_vbe_unmap_color): Likewise.

	* include/grub/i386/pc/vbeblit.h: New file.

	* include/grub/i386/pc/vbefill.h: New file.

	* video/video.c (grub_video_get_blit_format): New function.
	(grub_video_vbe_get_video_ptr): Re-declared as non-static.
	(grub_video_vbe_map_rgb): Likewise.
	(grub_video_vbe_unmap_color): Likewise.

	* video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
	optimized fills.
	(grub_video_vbe_blit_render_target): Changed to use more optimized
	blits.
	(grub_video_vbe_setup): Added detection for optimized settings.
	(grub_video_vbe_create_render_target): Likewise.

	* video/i386/pc/vbeblit.c: New file.

	* video/i386/pc/vbefill.c: New file.

2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>

	* font/manager.c (grub_font_get_glyph): Removed font fixup from
	here...

	* util/unifont2pff.rb: ... and moved it to here.  Improved argument
	parsing to support both hex and dec ranges.  If filename was missing
	show usage information.

2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>

	* DISTLIST: Added include/grub/video.h, term/gfxterm.c,
	video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.

	* conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
	gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
	(video_mod_SOURCES): Added.
	(video_mod_CFLAGS): Likewise.
	(video_mod_LDFLAGS): Likewise.
	(gfxterm_mod_SOURCES): Likewise.
	(gfxterm_mod_CFLAGS): Likewise.
	(gfxterm_mod_LDFLAGS): Likewise.
	(videotest_mod_SOURCES): Likewise.
	(videotest_mod_CFLAGS): Likewise.
	(videotest_mod_LDFLAGS): Likewise.
	(vesafb_mod_SOURCES): Removed.
	(vesafb_mod_CFLAGS): Likewise.
	(vesafb_mod_LDFLAGS): Likewise.
	(vga_mod_SOURCES): Likewise.
	(vga_mod_CFLAGS): Likewise.
	(vga_mod_LDFLAGS): Likewise.

	* commands/videotest.c: New file.

	* font/manager.c (fill_with_default_glyph): Modified to use
	grub_font_glyph.
	(grub_font_get_glyph): Likewise.
	(fontmanager): Renamed from this...
	(font_manager): ... to this.

	* include/grub/font.h (grub_font_glyph): Added new structure.
	(grub_font_get_glyph): Modified to use grub_font_glyph.

	* include/grub/misc.h (grub_abs): Added as inline function.

	* include/grub/video.h: New file.

	* include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
	(GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
	(GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
	(grub_vbe_get_controller_info): Renamed from this...
	(grub_vbe_bios_get_controller_info): ... to this.
	(grub_vbe_get_mode_info): Renamed from this...
	(grub_vbe_bios_get_mode_info): ... to this.
	(grub_vbe_set_mode): Renamed from this...
	(grub_vbe_bios_set_mode): ... to this.
	(grub_vbe_get_mode): Renamed from this...
	(grub_vbe_bios_get_mode): ... to this.
	(grub_vbe_set_memory_window): Renamed from this...
	(grub_vbe_bios_set_memory_window): ... to this.
	(grub_vbe_get_memory_window): Renamed from this...
	(grub_vbe_bios_get_memory_window): ... to this.
	(grub_vbe_set_scanline_length): Renamed from this...
	(grub_vbe_set_scanline_length): ... to this.
	(grub_vbe_get_scanline_length): Renamed from this...
	(grub_vbe_bios_get_scanline_length): ... to this.
	(grub_vbe_set_display_start): Renamed from this...
	(grub_vbe_bios_set_display_start): ... to this.
	(grub_vbe_get_display_start): Renamed from this...
	(grub_vbe_bios_get_display_start): ... to this.
	(grub_vbe_set_palette_data): Renamed from this...
	(grub_vbe_bios_set_palette_data): ... to this.
	(grub_vbe_set_pixel_rgb): Removed.
	(grub_vbe_set_pixel_index): Likewise.

	* kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
	from this...
	(grub_vbe_bios_get_controller_info): ... to this.
	(grub_vbe_get_mode_info): Renamed from this...
	(grub_vbe_bios_get_mode_info): ... to this.
	(grub_vbe_set_mode): Renamed from this...
	(grub_vbe_bios_set_mode): ... to this.
	(grub_vbe_get_mode): Renamed from this...
	(grub_vbe_bios_get_mode): ... to this.
	(grub_vbe_set_memory_window): Renamed from this...
	(grub_vbe_bios_set_memory_window): ... to this.
	(grub_vbe_get_memory_window): Renamed from this...
	(grub_vbe_bios_get_memory_window): ... to this.
	(grub_vbe_set_scanline_length): Renamed from this...
	(grub_vbe_set_scanline_length): ... to this.
	(grub_vbe_get_scanline_length): Renamed from this...
	(grub_vbe_bios_get_scanline_length): ... to this.
	(grub_vbe_set_display_start): Renamed from this...
	(grub_vbe_bios_set_display_start): ... to this.
	(grub_vbe_get_display_start): Renamed from this...
	(grub_vbe_bios_get_display_start): ... to this.
	(grub_vbe_set_palette_data): Renamed from this...
	(grub_vbe_bios_set_palette_data): ... to this.
	(grub_vbe_bios_get_controller_info): Fixed problem with registers
	getting corrupted after calling it.  Added more pushes and pops.
	(grub_vbe_bios_set_mode): Likewise.
	(grub_vbe_bios_get_mode): Likewise.
	(grub_vbe_bios_get_memory_window): Likewise.
	(grub_vbe_bios_set_scanline_length): Likewise.
	(grub_vbe_bios_get_scanline_length): Likewise.
	(grub_vbe_bios_get_display_start): Likewise.
	(grub_vbe_bios_set_palette_data): Likewise.

	* normal/cmdline.c (cl_set_pos): Refresh the screen.
	(cl_insert): Likewise.
	(cl_delete): Likewise.

	* term/gfxterm.c: New file.

	* term/i386/pc/vesafb.c: Removed file.

	* video/video.c: New file.

	* video/i386/pc/vbe.c (real2pm): Added new function.
	(grub_video_vbe_draw_pixel): Likewise.
	(grub_video_vbe_get_video_ptr): Likewise.
	(grub_video_vbe_get_pixel): Likewise
	(grub_video_vbe_init): Likewise.
	(grub_video_vbe_fini): Likewise.
	(grub_video_vbe_setup): Likewise.
	(grub_video_vbe_get_info): Likewise.
	(grub_video_vbe_set_palette): Likewise.
	(grub_video_vbe_get_palette): Likewise.
	(grub_video_vbe_set_viewport): Likewise.
	(grub_video_vbe_get_viewport): Likewise.
	(grub_video_vbe_map_color): Likewise.
	(grub_video_vbe_map_rgb): Likewise.
	(grub_video_vbe_map_rgba): Likewise.
	(grub_video_vbe_unmap_color): Likewise.
	(grub_video_vbe_fill_rect): Likewise.
	(grub_video_vbe_blit_glyph): Likewise.
	(grub_video_vbe_blit_bitmap): Likewise.
	(grub_video_vbe_blit_render_target): Likewise.
	(grub_video_vbe_scroll): Likewise.
	(grub_video_vbe_swap_buffers): Likewise.
	(grub_video_vbe_create_render_target): Likewise.
	(grub_video_vbe_delete_render_target): Likewise.
	(grub_video_vbe_set_active_render_target): Likewise.
	(grub_vbe_set_pixel_rgb): Remove function.
	(grub_vbe_set_pixel_index): Likewise.
	(index_color_mode): Remove static variable.
	(active_mode): Likewise.
	(framebuffer): Likewise.
	(bytes_per_scan_line): Likewise.
	(grub_video_vbe_adapter): Added new static variable.
	(framebuffer): Likewise.
	(render_target): Likewise.
	(initial_mode): Likewise.
	(mode_in_use): Likewise.
	(mode_list): Likewise.

2006-03-10  Marco Gerards  <marco@gnu.org>

	* configure.ac (AC_INIT): Bumped to 1.93.

	* DISTLIST: Added `include/grub/hfs.h'.

2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>

	* boot/i386/pc/boot.S (general_error): Before looping, try INT
	18H, which might help the BIOS falling back to next boot media.

2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-install.in: Escape a backslash. Reported by
	Poe Chen <poe.poechen@gmail.com>.

2006-01-17  Marco Gerards  <marco@gnu.org>

	* include/grub/normal.h: Include <grub/script.h>.
	(grub_command_list): Removed struct.
	(grub_command_list_t): Removed type.
	(grub_menu_entry): Remove members `num' and `command_list'.  Add
	members `commands' and `sourcecode'.
	* include/grub/script.h: Add inclusion guards.
	(grub_script_cmd_menuentry): New struct.
	(grub_script_execute_menuentry): New prototype.
	(grub_script_lexer_record_start): Likewise.
	(grub_script_lexer_record_stop): Likewise.
	* normal/execute.c (grub_script_execute_menuentry): New function.
	* normal/lexer.c (record, recording, recordpos, recordlen): New
	variables.
	(grub_script_lexer_record_start): New function.
	(grub_script_lexer_record_stop): Likewise.
	(recordchar): Likewise.
	(nextchar): Likewise.
	(grub_script_yylex): Use `nextchar' to fetch new characters.  Use
	2048 as the buffer size.  Add the tokens `menuentry' and `@'.
	* normal/main.c: Include <grub/parser.h> and <grub/script.h>
	(current_menu): New variable.
	(free_menu): Mainly rewritten.
	(grub_normal_menu_addentry): New function.
	(read_config_file): Rewritten.
	* normal/menu.c (run_menu_entry): Mainly rewritten.
	* normal/menu_entry.c (make_screen): Rewritten the code to insert
	the menu entry.
	(run): Mainly rewritten.
	* normal/parser.y (menu_entry): New variable.
	(GRUB_PARSER_TOKEN_MENUENTRY): New token.
	(menuentry): New rule.
	(command): Add `menuentry'.
	(if_statement): Allow additional returns before `fi'.
	* normal/script.c (grub_script_create_cmdmenu): New function.

2006-01-03  Marco Gerards  <marco@gnu.org>

	* INSTALL: GNU Bison is required.
	* configure.ac: Rewritten the test to detect Bison.
	* Makefile.in (YACC): New variable.  Reported by Xun Sun
	<xun.sun.cn@gmail.com>.

2006-01-03  Marco Gerards  <marco@gnu.org>

	* fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
	the HFS+ filesystem to filesystem blocks.
	(grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
	GCC warning is silenced.

2006-01-03  Marco Gerards  <marco@gnu.org>

	* partmap/apple.c (apple_partition_map_iterate): Convert the data
	read from disk from big	endian to host byte order.

2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>

	* fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
	documentation.
	(GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
	(grub_hfs_mount): Grammar fix in error. Make sure this is not an
	embedded HFS+ filesystem.
	(GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
	(grub_hfs_sblock): Move from here...
	* include/grub/hfs.h: To here...  New file.
	* fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
	documentation.
	(GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
	New macros.
	(grub_hfsplus_volheader): Change type of member `magic' to
	`grub_uint16_t'.
	(grub_hfsplus_data): Add new member `embedded_offset'.
	(grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
	returned block.
	(grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
	Calculate the offset.

2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
	Removed.
	(GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.

2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/env.c (grub_env_set): Check if ENV->VALUE instead of
	ENV->NAME is NULL after	allocating ENV->VALUE.

2005-12-25  Marco Gerards  <marco@gnu.org>

	* kern/env.c (grub_env_set): Rewritten the error handling code.

2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* geninit.sh: Made more robust, and more portable.

2005-12-25  Marco Gerards  <marco@gnu.org>

	Add support for Apple HFS+ filesystems.

	* fs/hfsplus.c: New file.

	* DISTLIST: Added `fs/hfsplus.c'.

	* conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
	(hfsplus_mod_SOURCES): New variable.
	(hfsplus_mod_CFLAGS): Likewise.
	(hfsplus_mod_LDFLAGS): Likewise.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
	(grub_setup_SOURCES): Likewise.
	(grub_mkdevicemap_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* fs/fshelp.c (grub_fshelp_log2blksize): New function.

	* include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.

2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
	commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
	include/grub/parser.h, include/grub/script.h, kern/parser.c,
	kern/sparc64/cache.S, normal/execute.c, normal/function.c,
	normal/lexer.c, normal/parser.y, normal/script.c, and
	partmap/gpt.c.
	Removed kern/sparc64/cache.c.

	* conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
	grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
	grub_emu_init.c.

	* configure.ac (AC_INIT): Bumped to 1.92.

2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>

	* kern/err.c (grub_error_push): Added new function to support error
	stacks.
	(grub_error_pop): Likewise.
	(grub_error_stack_items): New local variable to support error stacks.
	(grub_error_stack_pos): Likewise.
	(grub_error_stack_assert): Likewise.
	(GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
	stack depth.
	(grub_print_error): Added support to print errors from error stack.

	* include/grub/err.h (grub_error_push): Added function prototype.
	(grub_error_pop): Likewise.

2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>

	* configure.ac: Accept `powerpc64' as host_cpu.
	(amd64): Rename to `biarch32'.

	* kern/powerpc/cache.S (grub_arch_sync_caches): Handle
	non-cacheline-aligned addresses.

	* kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
	(grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
	if `size' is non-zero.

2005-12-03  Marco Gerards  <mgerards@xs4all.nl>

	* conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
	and `cd' to make sure the filename is not prefixed with a
	directory name.
	(pkgdata_MODULES): Add `gpt.mod'.
	(gpt_mod_SOURCES): New variable.
	(gpt_mod_CFLAGS): Likewise.
	(gpt_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.

	* include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
	New macro.

	* partmap/gpt.c: New file.

	* partmap/pc.c (pc_partition_map_iterate): Don't continue when a
	GPT partition map is detected.

2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>

	* commands/i386/pc/play.c: New file.
	* conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
	(play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
	macros.

2005-11-27  Marco Gerards  <mgerards@xs4all.nl>

	* include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
	((unused))' to silence gcc warning.

2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>

	* configure.ac: Correct `AC_PROG_YACC' test.

2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>

	* util/powerpc/ieee1275/grub-install.in: Run the mount point
	check before installing files.

2005-11-22  Mike Small  <smallm@panix.com>

	* util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
	number regex so multidigit numbers are recognized correctly.

2005-11-22  Mike Small  <smallm@panix.com>

	* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
	debugging message before attempting to claim memory.
	(grub_rescue_cmd_initrd): Add a claim debugging message and try
	multiple addresses in case of failure.

2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>

	* term/tparm.c (get_space): Remove empty `if' statement.

	* fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.

	* kern/parser.c (check_varstate): Rename `state' to 's'.

2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>

	* partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
	variable definitions to the beginning of each function.  Sort stack
	variables by size.
	(find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
	`buf' argument to `char *'.

2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/powerpc-ieee1275.rmk: Include conf/common.mk.
	(pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
	minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
	hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
	help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
	sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
	configfile.mod, search.mod, gzio.mod and test.mod.
	(symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
	(fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
	(fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
	(ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
	(ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
	(minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
	(hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
	(jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
	(iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
	(xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
	(affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
	(sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
	(hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
	(boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
	(terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
	(ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
	(cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
	(help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
	(font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
	(terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
	(amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
	(apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.

	* conf/common.mk (grub_modules_init.lst): Use `find' instead of
	`grep --include'.
	(pkgdata_MODULES): Add test.mod.

2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>

	* genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
	appending to variables with "+=".
	(PModule): Use full pathname to generate *.lst filenames.

	* Makefile.in: Fixed list rules moved from genmk.rb.
	(.DELETE_ON_ERROR): New special target.
	(RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.

	* conf/i386-pc.rmk: Include conf/common.mk.
	(pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
	minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
	hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
	help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
	sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
	configfile.mod, search.mod, gzio.mod and test.mod.
	(symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
	(fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
	(fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
	(ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
	(ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
	(minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
	(hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
	(jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
	(iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
	(xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
	(affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
	(sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
	(hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
	(boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
	(terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
	(ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
	(cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
	(help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
	(font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
	(terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
	(amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
	(apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
	here...
	* conf/common.rmk: ... to here.  New file.

	* conf/common.mk: New file.

2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
	(grub_script.tab.c): ... here.

	* conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
	(grub_script.tab.c): ... here.

	* conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
	(grub_script.tab.c): ... here.

	* normal/command.c (grub_command_find): Fixed a memory leak of
	MODULE_NAME. Reported by Mike Small <smallm@panix.com>.

2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>

	* include/grub/symbol.h: (FUNCTION): Use double quotes instead of
	"@" which marks the start of a comment on ARM.
	(VARIABLE): Likewise.

2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>

	Add support for Linux/ADFS partition tables.

	* partmap/acorn.c: New file.

	* include/grub/acorn_filecore.h: Likewise.

	* DISTLIST: Added `partmap/acorn.c' and
	`include/grub/acorn_filecore.h'.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`partmap/acorn.c'.
	(pkgdata_MODULES): Add `acorn.mod'.
	(acorn_mod_SOURCES): New variable.
	(acorn_mod_CFLAGS): Likewise.

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
	`partmap/acorn.c'.
	(pkgdata_MODULES): Add `acorn.mod'.
	(acorn_mod_SOURCES): New variable.
	(acorn_mod_CFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
	(pkgdata_MODULES): Add `acorn.mod'.
	(acorn_mod_SOURCES): New variable.
	(acorn_mod_CFLAGS): Likewise.
	(acorn_mod_LDFLAGS): Likewise.

	* include/types.h (grub_disk_addr_t): New typedef.

2005-11-13  Marco Gerards  <mgerards@xs4all.nl>

	* geninit.sh: New file.

	* geninitheader.sh: Likewise.

	* commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
	* commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
	* commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
	* commands/configfile.c (grub_configfile_init)
	(grub_configfile_fini): Likewise.
	* commands/default.c (grub_default_init, grub_default_fini):
	Likewise.
	* commands/help.c (grub_help_init, grub_help_fini): Likewise.
	* commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
	* commands/search.c (grub_search_init, grub_search_fini): Likewise.
	* commands/terminal.c (grub_terminal_init, grub_terminal_fini):
	Likewise.
	* commands/test.c (grub_test_init, grub_test_fini): Likewise.
	* commands/timeout.c (grub_timeout_init, grub_timeout_fini):
	Likewise.
	* commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
	* commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
	Likewise.
	* commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
	Likewise.
	* commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
	Likewise.
	* disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
	* fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
	* fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
	* fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
	* fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
	* fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
	* fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
	* fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
	* fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
	* fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
	* fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
	* normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
	* partmap/amiga.c (grub_amiga_partition_map_init)
	(grub_amiga_partition_map_fini): Likewise.
	* partmap/apple.c (grub_apple_partition_map_init)
	(grub_apple_partition_map_fini): Likewise.
	* partmap/pc.c (grub_pc_partition_map_init)
	(grub_pc_partition_map_fini): Likewise.
	* partmap/sun.c (grub_sun_partition_map_init,
	grub_sun_partition_map_fini): Likewise.
	* term/terminfo.c (grub_terminal_init, grub_terminal_fini):
	Likewise.

	* util/grub-emu.c: Include <grub_modules_init.h>.
	(main): Don't initialize and de-initialize any modules directly,
	use `grub_init_all' and `grub_fini_all' instead.

	* term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
	`grub_vesafb_mod_init'.
	(grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
	all users.
	* term/i386/pc/vga.c (grub_vga_init): Renamed to
	`grub_vga_mod_init'.  Updated all users.
	(grub_vga_fini): Renamed to `grub_vga_mod_fini'.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
	rules.

	* include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
	Generate a function to initialize the module in utilities.
	Updated all callers.
	(GRUB_MOD_FINI): Add argument `name'.  Generate a function to
	initialize the module in utilities.  Updated all callers.

2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>

	* term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
	escape sequence and a literal ^L to clear the screen.

	* commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
	when returning from Open Firmware.

2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>

	* term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
	(grub_ofconsole_height): Likewise.
	(grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
	manually insert a '\n'.
	(grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
	`grub_ofconsole_height'.  Return early if these are already set.

2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>

	* conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
	`commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
	`normal/execute.c', `normal/lexer.c', `io/gzio.c',
	`kern/parser.c', `grub_script.tab.c', `normal/function.c'
	and `normal/script.c'.
	(normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(test_mod_SOURCES): New	variable.
	(test_mod_CFLAGS): Likewise.
	(test_mod_LDFLAGS): Likewise.
	(pkgdata_MODULES): Add `test.mod'.
	(grub_script.tab.c): New rule.
	(grub_script.tab.h): Likewise.

2005-11-07  Marco Gerards  <mgerards@xs4all.nl>

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`commands/test.c', `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(test_mod_SOURCES): New variable.
	(test_mod_CFLAGS): Likewise.
	(pkgdata_MODULES): Add `test.mod'.
	(grub_script.tab.c): New rule.
	(grub_script.tab.h): Likewise.

2005-11-06  Marco Gerards  <mgerards@xs4all.nl>

	Add initial scripting support.

	* commands/test.c: New file.
	* include/grub/script.h: Likewise.
	* normal/execute.c: Likewise.
	* normal/function.c: Likewise.
	* normal/lexer.c: Likewise.
	* normal/parser.y: Likewise.
	* normal/script.c: Likewise.

	* configure.ac: Add `AC_PROG_YACC' test.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
	`normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
	`normal/function.c' and `normal/script.c'.
	(normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
	(test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
	variables.
	(pkgdata_MODULES): Add `test.mod'.
	(grub_script.tab.c): New rule.
	(grub_script.tab.h): Likewise.

	* include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.

	* include/grub/normal.h (grub_test_init): New prototype.
	(grub_test_fini): Likewise.

	* normal/command.c: Include <grub/script.h>.
	(grub_command_execute): Rewritten.

	* util/grub-emu.c (main): Call `grub_test_init' and
	`grub_test_fini'.

2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
	to 0.
	* term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
	there are no pending characters.

2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
	`grub_strndup' to drop device arguments. Replace unnecessary
	`grub_strndup' with `grub_strdup'.

2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
	`debug' environment variable has been set.

2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>

	* Makefile.in (install-local): Use $(DATA).
	(uninstall): Likewise.
	* conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
	(sbin_UTILITIES): ... to here.
	(sbin_SCRIPTS): New variable.
	(grub_install_SOURCES): New variable.
	* util/powerpc/ieee1275/grub-install.in: New file.
	* util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
	variable.
	(add_segments): Call `grub_util_get_path'.

2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>

	From Timothy Baldwin:
	* commands/ls.c (grub_ls_list_files): Close FILE with
	grub_file_close.
	* kern/misc.c (grub_vsprintf): Terminate the string S with NUL.

2005-10-24  Marco Gerards  <mgerards@xs4all.nl>

	* include/grub/parser.h: New file.

	* kern/parser.c: Likewise.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
	(grub_setup_SOURCES): Likewise.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(kernel_img_HEADERS): Add `parser.h'.

	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
	(grub_emu_SOURCES): Add `kern/parser.c'.
	(grubof_SOURCES): Likewise.

	* conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
	(grubof_SOURCES): Add `kern/parser.c'.

	* include/grub/misc.h (grub_split_cmdline): Removed prototype.

	* kern/misc.c (grub_split_cmdline): Removed function.

	* kern/rescue.c: Include <grub/parser.h>.
	(grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
	of `grub_split_cmdline'.

	* normal/command.c: Include <grub/parser.h>.
	(grub_command_execute):  Use `grub_parser_split_cmdline' instead
	of `grub_split_cmdline'.

	* normal/completion.c: Include <grub/parser.h>.
	(cmdline_state): New variable.
	(iterate_dir): End the filename with a quote depending on the
	command line state.
	(get_state): new function.
	(grub_normal_do_completion): Use `grub_parser_split_cmdline' to
	split the arguments and determine the current argument.  When the
	argument string is not quoted, escape all spaces.

2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>

	* normal/sparc64/setjmp.S: New file.

2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>

	* include/grub/sparc64/libgcc.h: New file.
	* conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
	(normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
	normal/sparc64/setjmp.c.

2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>

	* kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
	* kern/sparc64/cache.S: New file.
	* kern/sparc64/cache.c: Removed.
	* conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
	(COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
	-mtune=ultrasparc.
	(COMMON_LDFLAGS): Add -melf64_sparc.
	(grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
	(grubof_SOURCES): Use cache.S instead of cache.c.
	(grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
	--oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
	(pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
	commented though.
	(normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
	(_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
	(linux_mod_CFLAGS): Commented out.
	(_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
	out because module isn't built.
	(fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
	(ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
	(jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
	(hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
	(ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
	(font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
	(pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
	(suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
	(help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
	(configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
	(xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
	(affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
	(sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
	(gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.

2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
	grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
	longer, because HFS should not be used on PC.

2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>

	* io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
	consistently within the loop.

2005-10-15  Marco Gerards  <mgerards@xs4all.nl>

	* fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
	directory can not be read.

2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac (AC_INIT): Increase the version number to 1.91.

	* DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
	include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
	term/i386/pc/serial.c.

2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/file.c (grub_file_seek): Seeking to an offset equal to a
	file size must be permitted.

	* kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
	between %ah and %al.

2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
	grub_uint64_t.
	Call the hook with a NUL-terminated filename.
	(grub_xfs_mount): Use grub_be_to_cpu32 instead of
	grub_cpu_to_be32.

	* kern/term.c (cursor_state): New variable.
	(grub_term_set_current): Reset the cursor state on a new
	terminal.
	(grub_setcursor): Rewritten to use CURSOR_STATE.
	(grub_getcursor): New function.

	* include/grub/term.h (grub_getcursor): New prototype.

	* io/gzio.c (test_header): Align BUF for accessing it as 32-bit
	integers on ARM. Reported by Timothy Baldwin
	<T.E.Baldwin99@members.leeds.ac.uk>.

2005-10-11  Marco Gerards  <mgerards@xs4all.nl>

	* fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
	allocated.
	(grub_sfs_dir): Likewise.

2005-10-09  Marco Gerards  <mgerards@xs4all.nl>

	Add support for the SFS filesystem.

	* fs/sfs.c: New file.

	* DISTLIST: Added `fs/sfs.c'.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `sfs.mod'.
	(sfs_mod_SOURCES): New variable.
	(sfs_mod_CFLAGS): Likewise.
	(sfs_mod_LDFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
	(pkgdata_MODULES): Add `sfs.mod'.
	(sfs_mod_SOURCES): New variable.
	(sfs_mod_CFLAGS): Likewise.

	* util/grub-emu.c (main): Call `grub_sfs_init' and
	`grub_sfs_fini'.

	* include/grub/fs.h (grub_sfs_init): New prototype.
	(grub_sfs_fini): Likewise.

2005-10-07  Marco Gerards  <mgerards@xs4all.nl>

	Add support for the AFFS filesystem.

	* fs/affs.c: New file.

	* DISTLIST: Added `fs/affs.c'.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `affs.mod'.
	(affs_mod_SOURCES): New variable.
	(affs_mod_CFLAGS): Likewise.
	(affs_mod_LDFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
	(pkgdata_MODULES): Add `affs.mod'.
	(affs_mod_SOURCES): New variable.
	(affs_mod_CFLAGS): Likewise.

	* util/grub-emu.c (main): Call `grub_affs_init' and
	`grub_affs_fini'.

	* include/grub/fs.h (grub_affs_init): New prototype.
	(grub_affs_fini): Likewise.

2005-10-01  Marco Gerards  <mgerards@xs4all.nl>

	* fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.

2005-10-01  Marco Gerards  <mgerards@xs4all.nl>

	* configure.ac: Accept `x86_64' as host_cpu.  In that case add
	`-m32' to CFLAGS.

	* genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
	linking.

	* conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
	(COMMON_LDFLAGS): New variable.
	(kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
	(_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
	(ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
	(hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
	(xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
	(normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
	(terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
	(cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
	(halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
	(terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
	(multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
	(pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
	(default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
	(vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
	(vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
	variables.
	(normal_mod_ASFLAGS): Add `-m32'.

	* include/grub/types.h (grub_host_addr_t, grub_host_off_t)
	(grub_host_size_t, grub_host_ssize_t): New types.
	(grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
	dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
	`GRUB_HOST_SIZEOF_VOID_P'.

	* include/grub/kernel.h (struct grub_module_header): Type of
	member offset changed to `grub_host_off_t'.  Type of member size
	changed to `grub_host_size_t'.
	(struct grub_module_info): Type of member offset changed to
	`grub_host_off_t'.  Type of member size changed to
	`grub_host_size_t'.

2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>

	Make GRUB's kernel compliant to Multiboot Specification.

	* kern/i386/pc/startup.S (multiboot_header): New label.
	(multiboot_entry): Likewise.
	(multiboot_trampoline): Likewise.

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
	Increased to 0x4A0.

	* fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
	put parentheses after a question mark.
	[!GRUB_UTIL] (my_mod): New variable.

	* util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.

2005-09-28  Marco Gerards  <mgerards@xs4all.nl>

	Adds support for the XFS filesystem.  Btrees are not supported
	yet.

	* fs/xfs.c: New file.

	* DISTLIST: Added `fs/xfs.c'.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
	(grub_probefs_SOURCES): Likewise.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `xfs.mod'.
	(xfs_mod_SOURCES): New variable.
	(xfs_mod_CFLAGS): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
	(pkgdata_MODULES): Add `xfs.mod'.
	(xfs_mod_SOURCES): New variable.
	(xfs_mod_CFLAGS): Likewise.

	* util/grub-emu.c (main): Call `grub_xfs_init' and
	`grub_xfs_fini'.

	* include/grub/fs.h (grub_xfs_init): New prototype.
	(grub_xfs_fini): Likewise.


2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>

	* video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
	color modes, allow greater than 16 colors to be configured as
	a default palette.

2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/completion.c (complete_arguments): Add the qualifier
	const into OPTIONS.

	From Omniflux <omniflux+lists@omniflux.com>:
	* include/grub/terminfo.h: New file.
	* include/grub/tparm.h: Likewise.
	* include/grub/i386/pc/serial.h: Likewise.
	* term/terminfo.c: Likewise.
	* term/tparm.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
	serial.mod.
	(terminfo_mod_SOURCES): New variable.
	(terminfo_mod_CFLAGS): Likewise.
	(serial_mod_SOURCES): Likewise.
	(serial_mod_CFLAGS): Likewise.

2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
	boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
	and kern/powerpc/ieee1275/cmain.c, respectively.

	* boot/powerpc/ieee1275/crt0.S: Moved to ...
	* kern/powerpc/ieee1275/crt0.S: ... here.

	* boot/powerpc/ieee1275/cmain.c: Moved to ...
	* kern/powerpc/ieee1275/cmain.c: ... here.

	* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
	kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
	instead of boot/powerpc/ieee1275/crt0.S and
	boot/powerpc/ieee1275/cmain.c, respectively.

	* boot/i386/pc/boot.S (lba_mode): Do not store the total number of
	sectors. It was not used anyway.

2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>

	* term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
	`unused parameter' warning.

2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>

	* term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
	function.
	(grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
	getcharwidth.

2005-08-28  Marco Gerards  <metgerards@student.han.nl>

	* include/grub/normal.h (enum grub_completion_type): Added
	`GRUB_COMPLETION_TYPE_ARGUMENT'.

	* normal/cmdline.c (print_completion): Handle
	the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
	* normal/menu_entry.c (store_completion): Likewise.

	* normal/completion.c (complete_arguments): New function.
	(grub_normal_do_completion): Call `complete_arguments' when the
	current words start with a dash.

2005-08-27  Marco Gerards  <metgerards@student.han.nl>

	* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
	`gzio.mod' instead of `io.mod').

2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>

	* gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
	(DISTDIRS): Added io and video.
	Rewrite the search routine to make an output consistently.

	* DISTLIST: Added conf/sparc64-ieee1275.mk,
	conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
	include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
	io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
	kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
	util/powerpc/ieee1275/misc.c.

	* include/grub/gzio.h: New file.
	* io/gzio.c: Likewise.

	* kern/file.c (grub_file_close): Call grub_device_close only if
	FILE->DEVICE is not NULL.

	* include/grub/mm.h [!NULL] (NULL): New macro.

	* include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
	(pkgdata_MODULES): Added gzio.mod.
	(gzio_mod_SOURCES): New variable.
	(gzio_mod_CFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
	(pkgdata_MODULES): Added gzio.mod.
	(gzio_mod_SOURCES): New variable.
	(gzio_mod_CFLAGS): Likewise.

	* commands/cat.c: Include grub/gzio.h.
	(grub_cmd_cat): Use grub_gzfile_open instead of
	grub_file_open.

	* commands/cmp.c: Include grub/gzio.h.
	(grub_cmd_cmp): Use grub_gzfile_open instead of
	grub_file_open.

	* loader/i386/pc/multiboot.c: Include grub/gzio.h.
	(grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
	grub_file_open.
	(grub_rescue_cmd_module): Likewise.

2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>

	* conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
	kern/sparc64/ieee1275/init.c because it contains _start.
	* conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.

2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>

	* configure.ac: Add support for sparc64 host with ieee1275
	firmware.
	* configure: Generated from configure.ac.
	* disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
	instead of int.
	(grub_ofdisk_read): Likewise.
	(grub_ofdisk_open): Use %p to print pointer values, and cast the
	pointers as (void *) to remove a warning.
	(grub_ofdisk_close): Likewise.
	(grub_ofdisk_read): Likewise.
	* kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
	returns, so make it return void to remove a warning.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
	Corresponding prototype change.
	* kern/mm.c (grub_mm_init_region): Use %p to print pointer
	values, and cast the pointers as (void *) to remove a warning.
	(grub_mm_dump): Likewise.
	* conf/sparc64-ieee1275.mk: New file.
	* conf/sparc64-ieee1275.rmk: Likewise.
	* include/grub/sparc64/setjmp.h: Likewise.
	* include/grub/sparc64/types.h: Likewise.
	* include/grub/sparc64/ieee1275/console.h: Likewise.
	* include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
	* include/grub/sparc64/ieee1275/kernel.h: Likewise.
	* include/grub/sparc64/ieee1275/time.h: Likewise.
	* kern/sparc64/cache.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/sparc64/ieee1275/init.c: Likewise.
	* kern/sparc64/ieee1275/openfw.c: Likewise.

2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/console.c (grub_ncurses_putchar): If C is greater than
	0x7f, set C to a question mark.
	(grub_ncurses_getcharwidth): New function.
	(grub_ncurses_term): Specify grub_ncurses_getcharwidth as
	getcharwidth.

	* normal/menu.c (print_entry): Made aware of Unicode. First,
	convert TITLE to UCS-4, and predict the cursor position by
	grub_getcharwidth.

	* include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
	const to SRC.
	* kern/misc.c (grub_utf16_to_utf8): Likewise.

2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
	the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
	grub_strcat.

	* loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
	file by the option BOOT_IMAGE. Use grub_stpcpy instead of
	grub_strcpy and grub_strlen. Take it into account that a space
	character is inserted as a delimiter.

2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* partmap/pc.c (pc_partition_map_iterate): Include the value of an
	invalid magic in the error.

	* commands/search.c: New file.

	* util/grub-emu.c (main): Call grub_search_init and
	grub_search_fini.

	* kern/rescue.c (grub_rescue_print_disks): Removed.
	(grub_rescue_print_devices): New function.
	(grub_rescue_cmd_ls): Use grub_device_iterate with
	grub_rescue_print_devices instead of grub_disk_dev_iterate with
	grub_rescue_print_disks.

	* kern/partition.c (grub_partition_iterate): Return the result of
	PARTMAP->ITERATE instead of GRUB_ERRNO.

	* kern/device.c: Include grub/partition.h.
	(grub_device_iterate): New function.

	* include/grub/partition.h (grub_partition_iterate): Return int
	instead of grub_err_t.

	* include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
	prototype.
	[GRUB_UTIL] (grub_search_fini): Likewise.

	* include/grub/device.h (grub_device_iterate): New prototype.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
	commands/search.c.
	(pkgdata_MODULES): Added search.mod.
	(search_mod_SOURCES): New variable.
	(search_mod_CFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
	(pkgdata_MODULES): Added search.mod.
	(search_mod_SOURCES): New variable.
	(search_mod_CFLAGS): Likewise.

	* commands/ls.c (grub_ls_list_disks): Renamed to ...
	(grub_ls_list_devices): ... this, and use grub_device_iterate.
	All callers changed.

	* DISTLIST: Added commands/search.c.

2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
	conversion.
	(grub_getcharwidth): New function.

	* kern/misc.c (grub_utf8_to_ucs4): New function.

	* include/grub/term.h (struct grub_term): Added a new member
	"getcharwidth".
	(grub_getcharwidth): New prototype.

	* include/grub/misc.h (grub_utf8_to_ucs4): New prototype.

	* term/i386/pc/console.c (map_char): New function. Segregated from
	grub_console_putchar.
	(grub_console_putchar): Use map_char.
	(grub_console_getcharwidth): New function.
	(grub_console_term): Specified grub_console_getcharwidth as
	getcharwidth.

	* term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
	(grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.

	* term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
	GRUB_ERRNO.
	(grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
	on grub_strtoul completely.
	(write_char): Declare local variables in the beginning of the
	function.
	(grub_vesafb_getcharwidth): New function.
	(grub_vesafb_term): Specified grub_vesafb_getcharwidth as
	getcharwidth.

2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
	commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
	commands/i386/pc/vbetest.c.

	* video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
	call grub_vbe_get_controller_info again, because the returned
	information is volatile.
	(grub_vbe_set_video_mode): Mostly rewritten.
	(grub_vbe_get_video_mode): Use grub_vbe_probe and use
	grub_vbe_status_t correctly.
	(grub_vbe_get_video_mode_info): Likewise.
	(grub_vbe_set_pixel_rgb): Use a switch statement rather than
	several if statements.

	* commands/i386/pc/vbe_list_modes.c: Renamed to ...
	* commands/i386/pc/vbeinfo.c: ... this.

	* commands/i386/pc/vbe_test.c: Renamed to ...
	* commands/i386/pc/vbetest.c: ... this.

	* commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
	...
	(grub_cmd_vbeinfo): ... this. Save video modes before
	iterating. Skip a video mode, if it is not available, not enough
	information is given or it is monochrome. Show the memory
	model. Leave the interpretation of MODEVAR to grub_strtoul
	completely.
	(GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
	(GRUB_MOD_FINI): Likewise.

	* commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
	(grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
	grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
	duplicated grub_env_get. Leave the interpretation of MODEVAR to
	grub_strtoul completely.
	(real2pm): Removed.
	(GRUB_MOD_INIT): Rename vbe_test to vbetest.
	(GRUB_MOD_FINI): Likewise.

	* normal/misc.c: Include grub/mm.h.

	* conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
	vbe_list_modes with vbetest.mod and vbeinfo.mod.
	(vbe_list_modes_mod_SOURCES): Removed.
	(vbe_list_modes_mod_CFLAGS): Likewise.
	(vbe_test_mod_SOURCES): Likewise.
	(vbe_test_mod_CFLAGS): Likewise.
	(vbeinfo_mod_SOURCES): New variable.
	(vbeinfo_mod_CFLAGS): Likewise.
	(vbetest_mod_SOURCES): Likewise.
	(vbetest_mod_CFLAGS): Likewise.

2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/misc.c: New file.

	* DISTLIST: Added normal/misc.c.

	* partmap/amiga.c (amiga_partition_map_iterate): Add an argument
	DISK to HOOK. Call HOOK with DISK.
	* partmap/apple.c (apple_partition_map_iterate): Likewise.
	* partmap/pc.c (pc_partition_map_iterate): Likewise.
	* partmap/sun.c (sun_partition_map_iterate): Likewise.

	* normal/menu_entry.c (struct screen): Added a new member
	"completion_shown".
	(completion_buffer): New global variable.
	(make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
	(store_completion): New function.
	(complete): Likewise.
	(clear_completions): Likewise.
	(grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
	call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
	a tab, call complete.

	* normal/completion.c (disk_dev): Removed.
	(print_simple_completion): Likewise.
	(print_partition_completion): Likewise.
	(print_func): New global variable.
	(add_completion): Do not take the arguments WHAT or PRINT any
	longer. Added a new argument TYPE. Instead of printing directly,
	call PRINT_FUNC if not NULL.
	All callers changed.
	(complete_device): Use a local variable DEV instead of
	DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
	(grub_normal_do_completion): Take a new argument HOOK. Do not
	initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
	empty string, return NULL instead.
	All callers changed.

	* normal/cmdline.c (print_completion): New function.

	* kern/partition.c (grub_partition_iterate): Add an argument DISK
	to HOOK.
	All callers changed.

	* kern/disk.c (grub_print_partinfo): Removed.

	* include/grub/partition.h (struct grub_partition_map): Add a new
	argument DISK into HOOK of ITERATE.
	(grub_partition_iterate): Add a new argument DISK to HOOK.

	* include/grub/normal.h (enum grub_completion_type): New enum.
	(grub_completion_type_t): New type.
	(GRUB_COMPLETION_TYPE_COMMAND): New constant.
	(GRUB_COMPLETION_TYPE_DEVICE): Likewise.
	(GRUB_COMPLETION_TYPE_PARTITION): Likewise.
	(GRUB_COMPLETION_TYPE_FILE): Likewise.
	(grub_normal_do_completion): Added a new argument HOOK.
	(grub_normal_print_device_info): New prototype.

	* include/grub/disk.h (grub_print_partinfo): Removed.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
	(normal_mod_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* commands/ls.c (grub_ls_list_disks): Use
	grub_normal_print_device_info instead of grub_print_partinfo. Free
	PNAME.
	(grub_ls_list_files): Use grub_normal_print_device_info instead of
	duplicating the code.

2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>

	* commands/i386/pc/vbe_list_modes.c: Update source formatting to
	follow GCS more precisely.
	* commands/i386/pc/vbe_test.c: Likewise.
	* include/grub/i386/pc/vbe.h: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.

2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>

	* DISTLIST: Added term/i386/pc/vesafb.c
	DISTLIST: Added video/i386/pc/vbe.c
	DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
	DISTLIST: Added commands/i386/pc/vbe_test.c.
	* commands/i386/pc/vbe_list_modes.c: New file.
	* commands/i386/pc/vbe_test.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.
	* include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
	(grub_vbe_probe) Added prototype.
	(grub_vbe_set_video_mode) Likewise.
	(grub_vbe_get_video_mode) Likewise.
	(grub_vbe_get_video_mode_info) Likewise.
	(grub_vbe_set_pixel_rgb) Likewise.
	(grub_vbe_set_pixel_index) Likewise.
	* conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
	(pkgdata_MODULES): Added vesafb.mod.
	(pkgdata_MODULES): Added vbe_list_modes.mod.
	(pkgdata_MODULES): Added vbe_test.mod.
	(vbe_mod_SOURCES): Added.
	(vbe_mod_CFLAGS): Likewise.
	(vesafb_mod_SOURCES): Likewise.
	(vesafb_mod_CFLAGS): Likewise.
	(vbe_list_modes_mod_SOURCES): Likewise.
	(vbe_list_modes_mod_CFLAGS): Likewise.
	(vbe_test_mod_SOURCES): Likewise.
	(vbe_test_mod_CFLAGS): Likewise.

2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/command.c (grub_command_execute): If INTERACTIVE is
	false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
	CMDLINE. Disable the pager if INTERACTIVE is true.
	All callers are changed.

	* normal/main.c (grub_normal_execute): Read command.lst and fs.lst
	before reading a config file.
	* normal/main.c (read_config_file): Even if a command is not
	found, register it if it is within an entry.

	* util/grub-emu.c: Include sys/types.h and unistd.h.
	(options): Added --hold.
	(struct arguments): Added a new member "hold".
	(parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
	missing.
	(main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
	cleared by a debugger, if it is not zero.

	* include/grub/normal.h (grub_command_execute): Add an argument
	INTERACTIVE.

2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>

	* DISTLIST: Added include/grub/i386/pc/vbe.h.

2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>

	* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
	program with another one, because the old one didn't detect a bug
	in gcc-3.4. Always use regparm 2, because the new test is still
	not enough for gcc-4.0. Someone must investigate a simple test
	case which detects a bug in gcc-4.0.

2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added normal/completion.c.

	* normal/completion.c: New file.

	* term/i386/pc/console.c (grub_console_getwh): New function.
	(grub_console_term): Assign grub_console_getwh to getwh.

	* normal/cmdline.c (grub_tab_complete): Removed. Now the same
	function is defined in normal/completion.c as
	grub_normal_do_completion.
	(grub_cmdline_get): Use grub_normal_do_completion instead of
	grub_tab_complete.

	* kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
	returns non-zero, otherwise return 0.
	(grub_partition_iterate): First, probe the partition map. Then,
	call ITERATE only for this partition map.

	* kern/misc.c (grub_strncmp): Rewritten.

	* kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
	returns non-zero. Otherwise return 0.

	* include/grub/partition.h (grub_partition_map_iterate): Return
	int instead of void.

	* include/grub/normal.h (grub_normal_do_completion): New prototype.

	* include/grub/misc.h (grub_strncmp): Change the type of N to
	grub_size_t.

	* include/grub/disk.h (grub_disk_dev_iterate): Return int instead
	of void.

	* normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
	unsigned explicitly before comparing it with I.

	* kern/main.c (grub_env_write_root): Add the attribute unused into
	VAR.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
	normal/completion.c.
	(normal_mod_SOURCES): Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

	* normal/command.c (grub_iterate_commands): If ITERATE returns
	non-zero, return one immediately.

2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>

	* conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
	* kern/i386/pc/startup.S: Updated Global Descriptor table's
	descriptions.
	(grub_vbe_get_controller_info): New function.
	(grub_vbe_get_mode_info): Likewise.
	(grub_vbe_set_mode): Likewise.
	(grub_vbe_get_mode): Likewise.
	(grub_vbe_set_memory_window): Likewise.
	(grub_vbe_get_memory_window): Likewise.
	(grub_vbe_set_scanline_length): Likewise.
	(grub_vbe_get_scanline_length): Likewise.
	(grub_vbe_set_display_start): Likewise.
	(grub_vbe_get_display_start): Likewise.
	(grub_vbe_set_palette_data): Likewise.
	* include/grub/i386/pc/vbe.h: New file.

2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
	kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
	* DISTLIST: Likewise.
	* kern/ieee1275/of.c: Moved to ...
	* kern/ieee1275/ieee1275.c: ... here.

2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>

	* term/ieee1275/ofconsole.c: Include <grub/mm.h>.
	(grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
	Pass 0 as `end' parameter to grub_strtoul().

2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/powerpc/ieee1275/console.h: Do not include
	<grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
	ifdef.
	(grub_console_cur_color): Remove i386-specific prototype.
	(grub_console_real_putchar): Likewise.
	(grub_console_checkkey): Likewise.
	(grub_console_getkey): Likewise.
	(grub_console_getxy): Likewise.
	(grub_console_gotoxy): Likewise.
	(grub_console_cls): Likewise.
	(grub_console_setcursor): Likewise.
	* kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
	Include <grub/machine/console.h>.
	* term/ieee1275/ofconsole.c: Likewise.

2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>

	* Makefile.in (LIBLZO): New variable.

	* configure.ac: Check for LZO version 2.

	* util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
	lzo/lzo1x.h instead of lzo1x.h.

	* conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
	of -llzo.

	* util/i386/pc/grub-setup.c (main): Do not free PREFIX
	twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.

	* partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
	copying the data from PARTITION to P.

2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
	negative, unload the module.

	* util/i386/pc/grub-setup.c (setup): The name of the PC partition
	map is "pc_partition_map" but not "pc".
	(usage): Fix the description. The options are --boot-image and
	--core-image but not --boot-file or --core-file.
	(main): If not specified explicitly, make BOOT_FILE and CORE_FILE
	based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
	DEFAULT_DIRECTORY.

	* util/i386/pc/grub-install.in: Do not specify --boot-file or
	--core-file. Specify INSTALL_DEVICE as an argument.

	* util/console.c: Include config.h.
	[HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
	[HAVE_NCURSES_H]: Include ncurses.h.
	[HAVE_CURSES_H]: Include curses.h.
	[!A_NORMAL] (A_NORMAL): Defined as zero.
	[!A_STANDOUT] (A_STANDOUT): Likewise.

	* conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
	-lncurses.
	* conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.

	* configure.ac: Check for curses libraries and headers.

	* Makefile.in (LIBCURSES): New variable.

	* genmk.rb (Script::rule): Set the executable bits.

	* util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
	name of the PC partition map is "pc_partition_map" but not "pc".

2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-install.in (grub_probefs): New variable.
	(modules): Likewise.
	(usage): Added descriptions for --modules and --grub-probefs.
	Handle --modules and --grub-probefs. Save the arguments in MODULES
	and GRUB_PROBEFS, respectively.
	Auto-detect a filesystem module against GRUBDIR. If the result is
	empty and modules are not specified explicitly, abort the
	installation. Add the result to MODULES.

	* DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
	disk/powerpc/ieee1275/ofdisk.c,
	include/grub/powerpc/ieee1275/init.h and
	term/powerpc/ieee1275/ofconsole.c.
	Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
	term/ieee1275/ofconsole.c.

	* include/grub/powerpc/ieee1275/console.h: Resurrected.

	* COPYING: Upgraded to the latest version. Only the address of the
	FSF office has changed.

2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>

	* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
	kern/ieee1275.c with kern/ieee1275/of.c.

	* kern/ieee1275.c: Moved to ...
	* kern/ieee1275/of.c: ... here.

2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>

	* conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
	readability.

	* config.guess: Updated to the latest version from gnulib.
	* config.sub: Likewise.
	* install.sh: Likewise.
	* mkinstalldirs: Likewise.

	* include/grub/console.h: Removed. This file is arch-specific. Do
	not put this in include/grub.

	* include/grub/i386/pc/console.h: Resurrected.

	* util/console.c: Include grub/machine/console.h instead of
	grub/console.h.
	* util/grub-emu.c: Likewise.

2005-08-04  Marco Gerards  <metgerards@student.han.nl>

	* kern/term.c (grub_putcode): Use `grub_getwh' instead of
	hardcoded value.

	From Vincent Pelletier  <subdino2004@yahoo.fr>
	* include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
	Redefined to use grub_getwh.
	(grub_term): New member named getwh.
	(grub_getwh): New prototype.
	* kern/term.c (grub_getwh): New function.
	* term/i386/pc/console.c (grub_console_getwh): New function.
	(grub_console_term): New member `getwh'.
	* term/i386/pc/vga.c (grub_vga_getwh): New function.
	(grub_vga_term): New member `getwh'.
	* term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
	grub_ssize_t.
	(grub_ofconsole_getw): New function.
	(grub_ofconsole_init): Use grub_ssize_t and unsigned char.
	(grub_ofconsole_term): New field named getwh and new initial
	value.

2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/powerpc/ieee1275/ieee1275.h: Move ...
	* include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
	Move `abort', `grub_reboot', and `grub_halt' prototypes ...
	* include/grub/powerpc/ieee1275/kernel.h: ... to here.
	* commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
	of <grub/machine/ieee1275.h>.
	* commands/ieee1275/reboot.c: Likewise.
	* boot/powerpc/ieee1275/ieee1275.c: Move ...
	* kern/ieee1275.c: ... to here.  All users updated.  Change all
	parameter structs to use new type `grub_ieee1275_cell_t'.
	* term/powerpc/ieee1275/ofconsole.c: Move ...
	* term/ieee1275/ofconsole.c: ... to here.  All users updated.
	* disk/powerpc/ieee1275/ofdisk.c: Move ...
	* disk/ieee1275/ofdisk.c: ... to here.  All users updated.
	* boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
	to return int.
	* include/grub/i386/pc/console.h: Move to include/grub/console.h.
	Remove unused prototypes.  All users updated.
	* include/grub/powerpc/ieee1275/console.h: Removed.
	* include/grub/powerpc/ieee1275/ieee1275.h: Define
	`grub_ieee1275_cell_t'.
	* kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
	Cast comparisons with -1 to the correct type.
	* loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
	type to match `grub_ieee1275_entry_fn'.

2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added util/i386/pc/grub-probefs.c.

	* conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
	(grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
	partmap/sun.c.
	(grub_probefs_SOURCES): New variable.

	* util/i386/pc/grub-probefs.c: New file.

	* util/i386/pc/grub-setup.c (main): Call
	grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
	grub_hfs_init and grub_jfs_init to initialize the system. Call
	grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
	grub_pc_partition_map_fini to finish the system.

2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>

	* loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
	function.
	(grub_multiboot_load_elf32): Likewise.
	(grub_multiboot_is_elf64): Likewise.
	(grub_multiboot_load_elf64): Likewise.
	(grub_multiboot_load_elf): Likewise.
	(grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
	an ELF32 or ELF64 file.
	This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.

	From Serbinenko Vladimir <serbinenko.vova@list.ru>:
	* kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
	NULL before calling FS->LABEL.
	* fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
	* commands/ls.c (grub_ls_list_files): Show labels, if possible.
	(grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
	before calling FS->LABEL.

2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/grub-install.in (datadir): New variable.
	(libdir): Removed.
	(pkgdatadir): New variable.
	(pkglibdir): Removed.

2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: Added util/i386/pc/grub-install.in.

	* util/i386/pc/grub-install.in: New file.

	* conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
	(grub_install_SOURCES): Likewise.

	* genmk.rb: Added support for scripts.
	(Script): New class.
	(scripts): New variable.

	* Makefile.in (install-local): Install sbin_SCRIPTS by
	INSTALL_SCRIPT.
	(uninstall): Remove sbin_SCRIPTS.

	* util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
	device, try to get a GRUB device by
	grub_util_biosdisk_get_grub_dev.
	Free DEST_DEV.

	* util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
	description for --device-map.

2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>

	Change the semantics of variable hooks. They now return	strings
	instead of error values.

	* util/i386/pc/grub-setup.c: Include grub/env.h.
	(setup): Use grub_device_set_root instead of grub_env_set.

	* kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
	grub_env_get instead of grub_device_set_root and
	grub_device_get_root, respectively.

	* kern/main.c (grub_env_write_root): New function.
	(grub_set_root_dev): Register grub_env_write_hook for "root". Use
	grub_env_set instead of grub_device_set_root.

	* kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
	many variables.
	(grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
	rather than calling ENV->WRITE_HOOK afterwards.
	(grub_env_get): Return the result of ENV->READ_HOOK rather than
	passing a pointer of a pointer.
	(grub_register_variable_hook): Change the types of "read_hook" and
	"write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
	respectively.
	Allocate the default empty string on the heap, because this string
	may be freed later.

	* kern/device.c: Include grub/env.h.
	(grub_device_set_root): Removed.
	(grub_device_get_root): Likewise.
	(grub_device_open): Use grub_env_get instead of
	grub_device_get_root.

	* include/grub/env.h (grub_env_read_hook_t): New type.
	(grub_env_write_hook_t): Likewise.
	(grub_env_var): Change the types of "read_hook" and "write_hook"
	to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
	(grub_register_variable_hook): Likewise.

	* include/grub/device.h (grub_device_set_root): Removed.
	(grub_device_set_root): Likewise.

	* fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
	make sure that DIRNAME terminates with '/', so that
	grub_fat_find_dir will fail if PATH is not a directory.

	* commands/ls.c (grub_ls_list_files): Remove the qualifier const
	from DIRNAME.
	Use the qualifier auto for print_files and print_files_long.
	If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
	as a regular file.
	Put a newline only if there is no error.
	(grub_cmd_ls): Remove grub_ls_print_files, because this is not
	used.

2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/partition.c (grub_partition_probe): Initialize PART to
	NULL. Otherwise, when no partition map is registered, this returns
	a garbage.

2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>

	* partmap/apple.c (apple_partition_map_iterate): Check if POS
	equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
	valid.

2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* commands/ls.c (grub_ls_list_disks): Print the filesystem
	information on each device, if it does not have partitions. Print
	"Device" instead of "Disk", because this function is not specific
	to disk devices.

	* normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
	static to ensure that it is put on the memory rather than a
	register.

2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

	* commands/cat.c (GRUB_MOD_INIT): Use better documentation.
	(grub_cat_init): Likewise.
	* loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
	(options): Likewise.
	* commands/configfile.c (GRUB_MOD_INIT): Likewise.
	(grub_configfile_init): Likewise.
	* font/manager.c (GRUB_MOD_INIT): Likewise.
	* commands/help.c (GRUB_MOD_INIT): Likewise.
	(grub_help_init): Likewise.
	* normal/command.c (grub_command_init): Likewise.
	* loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
	* disk/loopback.c (grub_loop_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* commands/ls.c (grub_ls_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	(options): Likewise.
	* commands/boot.c (grub_boot_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
	* commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* commands/cmp.c (grub_cmp_init): Likewise.
	(GRUB_MOD_INIT): Likewise.

	* normal/arg.c: Use <> instead of "" to include header files.
	(SHORT_ARG_HELP): New macro.
	(SHORT_ARG_USAGE): Likewise.
	(help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
	of 'h' and 'u' for help and usage, respectively. Use more GNU-like
	descriptions.
	(find_short): Check if C is 'h' or 'u' explicitly.
	(grub_arg_show_help): Use space characters instead of tabs. Treat
	SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
	are shown with --help and --usage only if they are not used for
	the command itself.
	(parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
	'h' and 'u'.

	* include/grub/arg.h (struct grub_arg_option): Add the qualifier
	const into "longarg". Change the type of "shortarg" to int.

2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

	* boot/i386/pc/boot.S (boot_drive_check): New label.

	* include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
	macro.

	* util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
	which do not pass a boot drive correctly. Copied from GRUB Legacy.

2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

	* kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
	When turning off Gate A20, skip the check and return immediately,
	because this is not fatal usually.

2005-07-17  Yoshinori Okuji  <okuji@enbug.org>

	* conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
	be 0x7C00 instead of 0x8000.

	* boot/i386/pc/pxeboot.S: Rewritten.

	* kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
	EXT_C.
	(gate_a20_check_state): Read a byte from 0x108000. Invert the
	result.

2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
	robustness. This routine now supports a BIOS call and System
	Control Port A to modify the gate A20.

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
	Increased to 0x440.

2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>

	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
	device path and resulting ihandle.
	(grub_ofdisk_close): dprintf the ihandle being closed.
	(grub_ofdisk_read): dprintf function parameters.
	* kern/mm.c (grub_mm_init_region): Likewise.
	* loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
	(grub_linux_boot): dprintf the Linux entry point, initrd address and
	size, and boot arguments.
	(grub_rescue_cmd_linux): dprintf each ELF segment's address and size
	before loading into memory.
	(grub_rescue_cmd_initrd): dprintf the initrd's address and size
	before loading into memory.

2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/mm.c: Added much documentation.
	(GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
	8, set to 5 instead of 8.

2005-07-10  Yoshinori Okuji  <okuji@enbug.org>

	* DISTLIST: Added util/i386/pc/grub-mkimage.c.

	* conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
	(grub_mkdevicemap_SOURCES): New variable.

	* util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
	lib/device.c of GRUB Legacy.

2005-07-10  Yoshinori Okuji  <okuji@enbug.org>

	* commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
	instead of PATH is NULL.

2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>

	* commands/cmp.c (BUFFER_SIZE): New macro.
	(grub_cmd_cmp): Close the right file at the right time.  Compare
	only data just read.  Don't report files of different  size as
	identical.  Dynamically allocate buffers.  Move variable
	declarations at the beginning of function.

2005-07-09  Yoshinori Okuji  <okuji@enbug.org>

	* aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
	reverse.

2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>

	* normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
	when backspace is pressed at beginning of line.

2005-07-03  Yoshinori Okuji  <okuji@enbug.org>

	* DISTLIST: Added genfslist.sh.

	* normal/main.c (fs_module_list): New variable.
	(autoload_fs_module): New function.
	(read_fs_list): Likewise.
	(grub_normal_execute): Call read_fs_list.

	* kern/fs.c (grub_fs_autoload_hook): New variable.
	(grub_fs_probe): Added support for auto-loading.

	* include/grub/normal.h (struct grub_fs_module_list): New struct.
	(grub_fs_module_list_t): New type.

	* include/grub/fs.h (grub_fs_autoload_hook_t): New type.
	(grub_fs_autoload_hook): New prototype.

	* genfslist.sh: New file.

	* genmk.rb: Added a rule to generate a filesystem list.

2005-06-30  Marco Gerards  <metgerards@student.han.nl>

	* configure.ac: Fix the test for cross-compiling.

	* genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
	define GRUB_UTIL anymore.

	* util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
	so this function works on other systems than just big endian.
	(load_modules): Likewise.
	(add_segments): Likewise.

2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
	contains `l' modifier, get a long from va_arg().

2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/mm.c (grub_free): If the next free block which is being
	merged is the first free block, set the first block to the block
	being freed.
	Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.

2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c (cmain): Initialize
	`grub_ieee1275_chosen'.

2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c	(module_info): Remove definition.
	(grub_ieee1275_chosen): New variable.
	(cmain): Initialize and use `grub_ieee1275_chosen' instead of
	`chosen'.
	* boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
	Rename first argument to `phandle' for consistency.
	(grub_ieee1275_get_property_length): Likewise.
	(grub_ieee1275_next_property): Likewise.  Change type of first argument
	to grub_ieee1275_phandle_t.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
	Move export next to declaration.
	(grub_ieee1275_chosen): New variable.
	* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
	Correct cosmetic typo.
	* kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
	`grub_ieee1275_chosen'.
	* kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
	* loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
	(grub_rescue_cmd_linux): Set `initrd_addr' to 0.
	* term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
	`grub_ieee1275_chosen'.

2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
	/chosen/bootargs.
	* kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
	/chosen/bootargs as "variable=value" pairs.

2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>

	* include/grub/misc.h (grub_dprintf): New macro.
	(grub_real_dprintf): New prototype.
	(grub_strword): Likewise.
	(grub_iswordseparator): Likewise.
	* kern/misc.c (grub_real_dprintf): New function.
	(grub_strword): Likewise.
	(grub_iswordseparator): Likewise.

2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
	(roundup): Remove macro.
	(grub_ieee1275_flags): Make static.
	(grub_ieee1275_realmode): Remove.
	(grub_ieee1275_test_flag): New function.
	(grub_ieee1275_set_flag): Likewise.
	(find_options): Rename to `grub_ieee1275_find_options'; update
	callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
	GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
	(cmain): New prototype.
	(cmain): Use `grub_ieee1275_set_flag' instead of accessing
	`grub_ieee1275_flags' directly.
	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
	machine/biosdisk.h.
	* disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
	Don't include grub/machine/init.h.
	(grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
	Remove prototype.
	(grub_ieee1275_realmode): Likewise.
	(grub_ieee1275_flag): New enum.
	(grub_ieee1275_test_flag): New prototype.
	(grub_ieee1275_set_flag): New prototype.
	* include/grub/powerpc/ieee1275/init.h: Remove file.
	* include/grub/powerpc/ieee1275/ofdisk.h: New file.
	* kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
	Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
	(grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
	comment.
	* kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
	`grub_ieee1275_test_flag'.
	(grub_ieee1275_encode_devname): Likewise.

2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_encode_devname): New prototype.
	(grub_ieee1275_get_filename): Likewise.
	* kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
	function.
	(grub_set_prefix): Likewise.
	(grub_machine_init): Call grub_set_prefix.
	* kern/powerpc/ieee1275/openfw.c: Fix typos.
	(grub_parse_type): New enum.
	(grub_ieee1275_get_devargs): New function.
	(grub_ieee1275_get_devname): Likewise.
	(grub_ieee1275_parse_args): Likewise.
	(grub_ieee1275_get_filename): Likewise.
	(grub_ieee1275_encode_devname): Likewise.

2005-03-30  Marco Gerards  <metgerards@student.han.nl>

	* kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
	`grub_loader_unset'.

2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>

	* commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
	instead of grub_ieee1275_interpret.
	(grub_halt_init): New function.
	(grub_halt_fini): Likewise.
	(GRUB_MOD_INIT): Correct message grammar.
	* commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
	instead of grub_ieee1275_interpret.
	(grub_reboot_init): New function.
	(grub_reboot_fini): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
	commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
	util/i386/pc/misc.c with commands/ieee1275/halt.c,
	commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
	function.
	* include/grub/powerpc/ieee1275/console.h (grub_console_fini):
	Add prototype.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
	prototype.
	(grub_halt): Likewise.
	* include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
	(cmain): Remove __attribute__((unused)).
	* kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
	(grub_heap_len): Likewise.
	(grub_machine_fini): New function.
	* kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
	(grub_halt): Likewise.
	* term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
	function.
	* util/powerpc/ieee1275/misc.c: New file.

2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>

	* DISTLIST: New file.
	* gendistlist.sh: Likewise.

	* Makefile.in (COMMON_DISTFILES): Removed.
	(BOOT_DISTFILES): Likewise.
	(CONF_DISTFILES): Likewise.
	(DISK_DISTFILES): Likewise.
	(FS_DISTFILES): Likewise.
	(INCLUDE_DISTFILES): Likewise.
	(KERN_DISTFILES): Likewise.
	(LOADER_DISTFILES): Likewise.
	(TERM_DISTFILES): Likewise.
	(UTIL_DISTFILES): Likewise.
	(DISTFILES): Likewise.
	(uninstall): Uninstall files in $(pkgdata_DATA).
	(DISTLIST): New target.
	(distdir): Use the contents of the file DISTLIST to get a list of
	distributed files.

2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
	descriptor. This is ported from GRUB Legacy.

	* gencmdlist.sh: Added an extra semicolon to make it work with
	old sed versions. Reported by Robert Bihlmeyer
	<robbe@orcus.priv.at>.

2005-03-08  Yoshinori Okuji  <okuji@enbug.org>

	Automatic loading of commands is supported.

	* normal/main.c (read_command_list): New function.
	(grub_normal_execute): Call read_command_list.

	* normal/command.c (grub_register_command): Return zero or CMD.
	Allocate CMD->NAME from the heap.
	Initialize CMD->MODULE_NAME to zero.
	Find the same name as well. If the same command is found and it is
	a dummy command, overwrite members. If it is not a dummy command,
	return zero.
	(grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
	(grub_command_find): If a dummy command is found, load a module
	and retry to find a command only once.

	* normal/cmdline.c (grub_tab_complete): Call grub_command_find to
	make sure that each command is loaded.

	* include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
	macro.
	(struct grub_command): Remove const from the member `name'.
	Add a new member `module_name'.
	(grub_register_command): Return grub_command_t.

	* commands/help.c (grub_cmd_help): Call grub_command_find to make
	sure that each command is loaded.

	* genmk.rb (PModule::rule): Specify a module name without the
	suffix ".mod" to gencmdlist.sh.

2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>

	* gencmdlist.sh: New file.

	* genmk.rb (PModule::rule): Generate a rule for a command list.
	Clean command.lst.
	Generate command.lst from $(COMMANDFILES).

	* Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
	(DATA): Added $(pkgdata_DATA).
	(install-local): Install files in $(pkgdata_DATA).

2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>

	* term/i386/pc/vga.c (debug_command): Removed.
	(GRUB_MOD_INIT): Do not register the command "debug".

	From Hollis Blanchard:
	* commands/configfile.c: New file.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Added
	commands/configfile.c.
	(pkgdata_MODULES): Added configfile.mod.
	(configfile_mod_SOURCES): New variable.
	(configfile_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
	commands/configfile.c.
	(pkgdata_MODULES): Added configfile.mod.
	(configfile_mod_SOURCES): New variable.
	(configfile_mod_CFLAGS): Likewise.
	* util/grub-emu.c (main): Call grub_configfile_init and
	grub_configfile_fini.
	* include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
	prototype.
	[GRUB_UTIL] (grub_configfile_fini): Likewise.

2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/arg.c (grub_arg_show_help): Do not show the bug report
	address.

	* commands/help.c (grub_cmd_help): Do not print newlines after
	the last command in print_command_help.

2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>

	* commands/default.h: New file.
	* commands/timeout.h: Likewise.
	* normal/context.c: Likewise.

	* util/misc.c: Do not include sys/times.h.
	Include sys/time.h and grub/machine/time.h.
	(grub_get_rtc): Rewritten with gettimeofday.

	* util/grub-emu.c (main): Call grub_default_init and
	grub_timeout_init before grub_normal_init, and call
	grub_timeout_fini and grub_default_fini after grub_main.

	* util/console.c (grub_ncurses_checkkey): Return the read
	character or -1.

	* normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
	timeouts.

	* normal/main.c (read_config_file): Push MENU. If this fails,
	print an error and wait for a user input.
	Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
	If a menu is empty or an error occurs, pop MENU.
	(grub_normal_execute): Pop and free MENU after grub_menu_run
	returns.

	* kern/loader.c (grub_loader_boot): Call grub_machine_fini.

	* include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
	include	time.h.
	[GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
	without GRUB_UTIL.
	* include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
	time.h.
	[GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
	without GRUB_UTIL.

	* include/grub/normal.h (struct grub_menu_list): New struct.
	(grub_menu_list_t): New type.
	(struct grub_context): New struct.
	(grub_context_t): New type.
	(grub_register_command): Got rid of EXPORT_FUNC.
	(grub_unregister_command): Likewise.
	(grub_context_get): New prototype.
	(grub_context_get_current_menu): Likewise.
	(grub_context_push_menu): Likewise.
	(grub_context_pop_menu): Likewise.
	[GRUB_UTIL] (grub_default_init): Likewise.
	[GRUB_UTIL] (grub_default_fini): Likewise.
	[GRUB_UTIL] (grub_timeout_init): Likewise.
	[GRUB_UTIL] (grub_timeout_fini): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
	commands/timeout.c and normal/context.c.
	(pkgdata_MODULES): Added default.mod and timeout.mod.
	(normal_mod_SOURCES): Added normal/context.c.
	(default_mod_SOURCES): New variable.
	(default_mod_CFLAGS): Likewise.
	(timeout_mod_SOURCES): Likewise.
	(timeout_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
	conf/i386-pc.rmk.
	(pkgdata_MODULES): Added default.mod and timeout.mod.
	(normal_mod_SOURCES): Added normal/context.c.
	(default_mod_SOURCES): New variable.
	(default_mod_CFLAGS): Likewise.
	(timeout_mod_SOURCES): Likewise.
	(timeout_mod_CFLAGS): Likewise.

	* Makefile.in (all-local): Added $(MKFILES).

2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `sun.mod'.
	(sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`partmap/sun.c'.
	(pkgdata_MODULES): Add `sun.mod'.
	(sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
	* include/grub/partition.h (grub_sun_partition_map_init): New
	prototype.
	(grub_sun_partition_map_fini): Likewise.
	* partmap/sun.c: New file.
	* util/grub-emu.c (main): Initialize and de-initialize the sun
	partitionmap support.

2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>

	This implements an Emacs-like menu entry editor.

	* normal/menu_entry.c: New file.

	* util/console.c (grub_ncurses_putchar): Translate some Unicode
	characters to ASCII.
	(saved_char): New variable.
	(grub_ncurses_checkkey): Rewritten completely.
	(grub_ncurses_getkey): Likewise.
	(grub_ncurses_init): Call raw instead of cbreak.

	* normal/menu.c (print_entry): Do not put a space.
	(init_page): Renamed to ...
	(grub_menu_init_page): ... this. All callers changed.
	(edit_menu_entry): Removed.
	(run_menu): Call grub_menu_entry_run instead of edit_menu_entry.

	* normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.

	* kern/misc.c (grub_vprintf): Call grub_refresh.

	* normal/menu.c (DISP_LEFT): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
	* normal/menu.c (DISP_UP): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
	* normal/menu.c (DISP_RIGHT): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
	* normal/menu.c (DISP_DOWN): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
	* normal/menu.c (DISP_HLINE): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
	* normal/menu.c (DISP_VLINE): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
	* normal/menu.c (DISP_UL): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
	* normal/menu.c (DISP_UR): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
	* normal/menu.c (DISP_LL): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
	* normal/menu.c (DISP_LR): Renamed to ...
	* include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
	* normal/menu.c (TERM_WIDTH): Renamed to ...
	* include/grub/term.h (GRUB_TERM_WIDTH): ... this.
	* normal/menu.c (TERM_HEIGHT): Renamed to ...
	* include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
	* normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
	* include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
	* normal/menu.c (TERM_MARGIN): Renamed to ...
	* include/grub/term.h (GRUB_TERM_MARGIN): ... this.
	* normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
	* include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
	* normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
	* include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
	* normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
	* include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
	* normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
	* include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
	* normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
	* include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
	* normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
	* include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
	* normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
	* include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
	* normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
	* include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
	* normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
	* include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
	* normal/menu.c (TERM_CURSOR_X): Renamed to ...
	* include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
	All callers changed.

	* include/grub/normal.h: New prototype.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added
	normal/menu_entry.c.
	(normal_mod_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
	(normal_mod_SOURCES): Likewise.

2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/grub/normal.h (grub_halt_init): New prototype.
	(grub_halt_fini): Likewise.
	(grub_reboot_init): Likewise.
	(grub_reboot_fini): Likewise.

	* util/grub-emu.c: Include signal.h.
	(main_env): New global variable.
	(grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
	catch C-c.
	(grub_machine_fini): New function.
	(main): Call grub_halt_init and grub_reboot_init before
	grub_main, and grub_reboot_fini and grub_halt_fini after it.
	Call setjmp with MAIN_ENV to go back afterwards.
	Call grub_machine_fini right before return.

	* include/grub/util/misc.h: Include setjmp.h.
	(main_env): New prototype.

	* include/grub/kernel.h (grub_machine_fini): New prototype.
	* include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
	* include/grub/i386/pc/console.h (grub_console_fini): Likewise.

	* disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
	* kern/i386/pc/init.c (grub_machine_fini): Likewise.
	* term/i386/pc/console.c (grub_console_fini): Likewise.

	* util/i386/pc/misc.c: New file.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Added
	util/i386/pc/misc.c, commands/i386/pc/halt.c and
	commands/i386/pc/reboot.c.

2005-02-14  Guillem Jover  <guillem@hadrons.org>

	* include/grub/dl.h (grub_dl_check_header): New prototype.
	(grub_arch_dl_check_header): Change return type to grub_err_t,
	remove size parameter and export function.  Update all callers.
	* kern/dl.c (grub_dl_check_header): New function.
	(grub_dl_load_core): Use `grub_dl_check_header' instead of
	`grub_arch_dl_check_header'.  Check ELF type.  Check if sections
	are inside the core.
	* kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
	independent ELF header checks.
	* kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
	* loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
	`grub_dl_check_header' instead of explicit checks.  Check for the
	ELF type.
	* loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
	`grub_dl_check_header' instead of explicit checks.  Remove arch
	specific ELF header checks.

	* util/grub-emu.c (grub_arch_dl_check_header): Remove the
	argument SIZE.

2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
	* include/grub/powerpc/libgcc.h (__mulsf3): New prototype.

2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/partition.c (grub_partition_probe): Clear `grub_errno' and
	return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
	(part_map_iterate): Clear `grub_errno' and return 0 if
	`partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
	* partmap/amiga.c (amiga_partition_map_iterate): Return
	GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
	* partmap/apple.c (apple_partition_map_iterate): Likewise.

2005-02-01  Guillem Jover  <guillem@hadrons.org>

	* loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
	help info.

2005-01-31  Marco Gerards  <metgerards@student.han.nl>

	* include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
	Removed prototype.
	(grub_rescue_cmd_linux): New prototype.
	(grub_rescue_cmd_initrd): Likewise.
	* powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
	`bi_rec'.
	(grub_linux_release_mem): Release the memory for the initrd.
	(grub_load_linux): Renamed from this...
	(grub_rescue_cmd_linux): ...To this.  Changed all callers.
	Changed `entry' not to be static.  Loop over memory regions to
	find another one when the default fails.
	(grub_rescue_cmd_initrd): New function.
	(grub_linux_init): Remove function.
	(grub_linux_fini): Likewise.
	(GRUB_MOD_INIT): Register `initrd'.
	(GRUB_MOD_FINI): Unregister `initrd'.
	* powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
	Function removed.
	(grub_linux_normal_fini): Likewise.
	(GRUB_MOD_INIT): Register `initrd'.
	(GRUB_MOD_FINI): Unregister `initrd'.

2005-01-31  Marco Gerards  <metgerards@student.han.nl>

	* commands/help.c: New file.
	* normal/arg.c (show_help): Renamed to...
	(grub_arg_show_help): ... this.
	* commands/i386/pc/halt.c: New file.
	* commands/i386/pc/reboot.c: Likewise.
	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
	(pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
	(help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
	(reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
	variables.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`commands/help.c'.
	(pkgdata_MODULES): Add `help.mod'.
	(help_mod_SOURCES, help_mod_CFLAGS): New variables.
	* grub/i386/pc/init.h (grub_reboot): New prototype.
	(grub_halt): Likewise.
	* include/grub/normal.h (grub_arg_show_help): New prototype.
	(grub_help_init): Likewise.
	(grub_help_fini): Likewise.
	* util/grub-emu.c (main): Initialize and deinitialize the help
	command.

	* normal/cmdline.c (grub_cmdline_get): Doc fix.

	* normal/command.c (grub_command_init): Fixed the description of
	the `set' and `unset' commands.

2005-01-31  Marco Gerards  <metgerards@student.han.nl>

	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
	function.
	* commands/ieee1275/halt.c: New file.
	* commands/ieee1275/reboot.c: Likewise.
	* commands/ieee1275/suspend.c (grub_cmd_suspend): Use
	`__attribute__ ((unused))'.  Some GCS related fixed.
	(grub_suspend_init) [GRUB_UTIL]: Function removed.
	(grub_suspend_fini): Likewise.
	* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
	and `halt.mod'.
	(reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
	(halt_mod_CFLAGS): New variables.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_interpret): New prototype.

2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/grub/misc.h (memmove): New prototype.
	(memcpy): Likewise.

2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>

	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
	`devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.

2005-01-22  Marco Gerards  <metgerards@student.han.nl>

	* kern/misc.c (grub_strndup): Function rewritten.

2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>

	* normal/menu.c (TERM_WIDTH): Macro redefined.
	(TERM_TOP_BORDER_Y): Likewise.
	(draw_border): Replaced while-loop by a for-loop.  Make the number
	of lines consistent with the number of lines displayed in
	print_entries.  Added a margin below the rectangle.
	(print_entry): Make the entry fit in the rectangle.
	(print_entries): Display the scroll arrows next to the right
	border.

2005-01-21  Marco Gerards  <metgerards@student.han.nl>

	* fs/minix.c (grub_minix_find_file): Reserve more space for
	`fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
	`grub_strncpy' to copy `path' into it.

2005-01-21  Marco Gerards  <metgerards@student.han.nl>

	Add the loopback device, a device via which files can be accessed
	as devices.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
	(pkgdata_MODULES): Add loopback.mod.
	(loopback_mod_SOURCES): New variable.
	(loopback_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`disk/loopback.c'.
	(pkgdata_MODULES): Add loopback.mod.
	(loopback_mod_SOURCES): New variable.
	(loopback_mod_CFLAGS): Likewise.
	* disk/loopback.c: new file.
	* include/grub/normal.h (grub_loop_init): New prototype.
	(grub_loop_fini): New prototype.
	* util/grub-emu.c (main): Initialize and de-initialize loopback
	support.
	* include/grub/disk.h (grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_LOOPBACK_ID'.

2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
	function.
	* conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
	(suspend_mod_SOURCES): New variable.
	(suspend_mod_CFLAGS): Likewise.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
	New prototype.
	* commands/ieee1275/suspend.c: New file.

2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>

	* include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
	((unused))' to `__attribute__ ((used))'.
	(GRUB_MOD_FINI): Likewise.
	* kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
	* genmk.rb (PModule): Assign space to common symbols when linking
	modules.

2005-01-20  Marco Gerards  <metgerards@student.han.nl>

	* include/grub/mm.h (grub_mm_init_region): Change the type of the
	`unsigned' arguments to `grub_size_t'.
	(grub_malloc): Likewise.
	(grub_realloc): Likewise.
	(grub_memalign): Likewise.
	* kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
	* kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
	* util/misc.c (grub_malloc): Likewise.
	(grub_realloc): Likewise.
	* kern/mm.c (get_header_from_pointer): Change the casts to
	`unsigned' into a cast to `grub_size_t'.

	* fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
	point to `currnode' when `currnode' is changed.

	* util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
	Schottelius <nico-linux@schottelius.org>.

2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>

	* util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
	(note_path): Remove variable.
	(GRUB_IEEE1275_NOTE_NAME): New macro.
	(GRUB_IEEE1275_NOTE_TYPE): Likewise.
	(grub_ieee1275_note_hdr): New structure.
	(grub_ieee1275_note_desc): Likewise.
	(grub_ieee1275_note): Likewise.
	(load_note): Remove `dir' argument.  All callers updated.  Remove
	`note_img' and `path'.  Do not load a file from `note_path'.
	Initialize a struct grub_ieee1275_note and write that to `out'.
	Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.

2005-01-05  Marco Gerards  <metgerards@student.han.nl>

	* util/misc.c (grub_util_read_image): Revert last change.  It
	called `grub_util_read_at', which seeks from the beginning of the
	file.

2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>

	* TODO: Add note about endianness in grub-mkimage.
	* boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
	section.
	* conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
	(grub_mkimage_SOURCES): New target.
	* include/grub/kernel.h (grub_start_addr): Remove variable.
	(grub_end_addr): Likewise.
	(grub_total_module_size): Likewise.
	(grub_kernel_image_size): Likewise.
	(GRUB_MODULE_MAGIC): New constant.
	(grub_module_info): New structure.
	(grub_arch_modules_addr): New prototype.
	(grub_get_end_addr): Remove prototype.
	* include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
	* include/grub/powerpc/ieee1275/kernel.h: New file.
	* include/grub/util/misc.h (grub_util_get_fp_size): New
	prototype.
	(grub_util_read_at): Likewise.
	(grub_util_write_image_at): Likewise.
	* kern/main.c (grub_get_end_addr): Remove function.
	(grub_load_modules): Call grub_arch_modules_addr instead of using
	grub_end_addr.  Look for a grub_module_info struct in memory.  Use
	the grub_module_info fields instead of calling grub_get_end_addr
	as loop conditions.  Move grub_add_unused_region code here.
	(grub_add_unused_region): Remove function.
	* kern/i386/pc/init.c: Include grub/cache.h.
	(grub_machine_init): Remove call to grub_get_end_addr.  Remove
	one call to add_mem_region.
	(grub_arch_modules_addr): New function.
	* kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
	(grub_total_module_size): Likewise.
	Include grub/machine/kernel.h.
	(grub_arch_modules_addr): New function.
	* util/grub-emu.c (grub_end_addr): Remove variable.
	(grub_total_module_size): Likewise.
	(grub_arch_modules_addr): New function.
	* util/misc.c: Include unistd.h.
	(grub_util_get_fp_size): New function.
	(grub_util_read_at): Likewise.
	(grub_util_write_image_at): Likewise.
	(grub_util_read_image): Call grub_util_read_at.
	(grub_util_write_image): Call grub_util_write_image_at.
	* util/i386/pc/grub-mkimage.c (generate_image): Allocate
	additional memory in kernel_img for a struct grub_module_info.
	Fill in that grub_module_info.
	* util/powerpc/ieee1275/grub-mkimage.c: New file.

2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
	New function.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_milliseconds): New prototype.
	* include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
	Change to 1000.
	* kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
	grub_ieee1275_milliseconds.

2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
	variable.
	(find_options): New function.
	(cmain): Call find_options.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_realmode): New extern variable.
	* kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
	grub_map if grub_ieee1275_realmode is false.

2004-12-29  Marco Gerards  <metgerards@student.han.nl>

	* normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
	lines are inserted and make it work like readline.  Reported by
	Vincent Pelletier <subdino2004@yahoo.fr>.

2004-12-28  Marco Gerards  <metgerards@student.han.nl>

	* boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
	`kern/powerpc/cache.S'.

2004-12-27  Marco Gerards  <metgerards@student.han.nl>

	* genmk.rb: Handle the `Program' class in the main loop.  Written
	by Johan Rydberg <jrydberg@gnu.org>.
	(Program): New class.
	(programs): New variable.
	* boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
	instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
	instead of "grub/kernel.h".  Include <grub/machine/init.h>.
	(help_arch): Function removed.
	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
	`powerpc/libgcc.h' and `loader.h'.
	(pkgdata_PROGRAMS): New variable.
	(sbin_UTILITIES): Variable removed.
	(grub_emu_SOURCES): Added kern/powerpc/cache.S.
	(grubof_SOURCES): Variable re-defined so it only includes the
	core functionality.
	(grubof_CFLAGS): Remove `-DGRUBOF'.
	(pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
	(fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
	(ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
	(minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
	(hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
	(iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
	(_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
	(normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
	(hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
	(boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
	(ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
	(cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
	(font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
	(apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
	(pc_mod_CFLAGS): New variables.
	* disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
	(grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
	* include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
	* include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
	Moved from here...
	* include/grub/i386/pc/init.h (grub_os_area_addr)
	(rub_os_area_size): ... to here.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_entry_fn): Export symbol.
	* include/grub/powerpc/ieee1275/init.h: New file.
	* include/grub/powerpc/libgcc.h: Likewise.
	* include/grub/cache.h: Likewise.
	* kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
	<hollis@penguinppc.org>.
	* kern/dl.c: Include <grub/cache.h>.
	(grub_dl_flush_cache): New function.
	(grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
	for this module.
	* kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
	(grub_console_init): Removed prototypes.
	(grub_machine_init): Don't initialize the modules anymore.
	* kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
	static.
	* include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
	Macro undef removed.
	(GRUB_HOST_WORDS_BIGENDIAN): New macro.
	* kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
	relocation `R_PPC_REL32'.  Return an error when the relocation is
	unknown.
	* Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
	* kern/i386/pc/init.c (grub_arch_sync_caches): New function.
	* util/misc.c (grub_arch_sync_caches): Likewise.

2004-12-19  Marco Gerards  <metgerards@student.han.nl>

	* conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
	`symlist.c', add `grubof_symlist.c'.
	(symlist.c): Variable removed.
	(grubof_HEADERS): Variable added.
	(grubof_symlist.c): New target.
	(kernel_syms.lst): Use `grubof_HEADERS' instead of
	`kernel_img_HEADERS'.
	(grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
	* kern/powerpc/dl.c: New file.
	* kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
	Function removed.
	(grub_arch_dl_relocate_symbols): Likewise.
	(grub_register_exported_symbols): Likewise.

2004-12-13  Marco Gerards  <metgerards@student.han.nl>

	* fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
	(grub_ext2_dir): Likewise.  Don't return in case of an error, jump
	to fail instead.  Reported by Vincent Pelletier
	<subdino2004@yahoo.fr>.

	* fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
	it is not allocated.  Reported by Vincent Pelletier
	<subdino2004@yahoo.fr>.

	* normal/cmdline.c (grub_tab_complete): Add a blank line to the
	output so the output looks better.

2004-12-04  Marco Gerards  <metgerards@student.han.nl>

	Modulize the partition map support and add support for the amiga
	partition map.

	* commands/ls.c: Include <grub/partition.h> instead of
	<grub/machine/partition.h>.
	* kern/disk.c: Likewise.
	* kern/rescue.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* normal/cmdline.c: Likewise.
	* kern/powerpc/ieee1275/init.c: Likewise.
	(grub_machine_init): Call `grub_pc_partition_map_init',
	`grub_amiga_partition_map_init' and
	`grub_apple_partition_map_init'.
	* conf/i386-pc.rmk (kernel_img_SOURCES): Remove
	`disk/i386/pc/partition.c'.  Add `kern/partition.c'.
	(kernel_img_HEADERS): Remove `machine/partition.h'.  Add
	`partition.h' and `pc_partition.h'.
	(grub_setup_SOURCES): Remove
	`disk/i386/pc/partition.c'.  Add `kern/partition.c',
	`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
	(amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
	(apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
	`disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
	`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
	(grubof_SOURCES): Likewise.
	* disk/i386/pc/partition.c: File removed.
	* disk/powerpc/ieee1275/partition.c: Likewise.
	* include/grub/powerpc/ieee1275/partition.h: Likewise.
	* include/grub/i386/pc/partition.h: Likewise.
	* kern/partition.c: New file.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* partmap/pc.c: Likewise.
	* include/grub/partition.h: Likewise..
	* include/grub/pc_partition.h: Likewise.
	* util/grub-emu.c: Include <grub/partition.h> instead of
	<grub/machine/partition.h>.
	(main): Call `grub_pc_partition_map_init',
	`grub_amiga_partition_map_init' and
	`grub_apple_partition_map_init' and deinitialize afterwards.
	* util/i386/pc/biosdisk.c: Include `#include
	<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
	`<grub/machine/partition.h>'.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/i386/pc/biosdisk.c: Likewise.
	(grub_util_biosdisk_get_grub_dev): Only access the PC specific
	partition information in case of a PC partition.
	* util/i386/pc/grub-setup.c: Include `#include
	<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
	`<grub/machine/partition.h>'.
	(setup): Only access the PC specific partition information in case
	of a PC partition.

2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
	(grub_longjmp): Likewise.
	* include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
	20.
	* normal/powerpc/setjmp.S: New file.
	* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
	`normal/powerpc/setjmp.S'.
	(grubof_CFLAGS): Add `-DGRUBOF'.
	* include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
	[GRUB_UTIL && !GRUBOF].

2004-11-16  Marco Gerards  <metgerards@student.han.nl>

	* kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
	property named `name'.  Correctly handle the error returned by
	`grub_ieee1275_finddevice' if a device can not be opened.

2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>

	* term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
	`actual' for negativity.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
	kern/fshelp.c.

2004-11-01  Marco Gerards  <metgerards@student.han.nl>

	* term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
	(PAGE_OFFSET): New macro.
	(CRTC_ADDR_PORT): Likewise.
	(CRTC_DATA_PORT): Likewise.
	(START_ADDR_HIGH_REGISTER): Likewise.
	(START_ADDR_LOW_REGISTER): Likewise.
	(GRAPHICS_ADDR_PORT): Likewise.
	(GRAPHICS_DATA_PORT): Likewise.
	(READ_MAP_REGISTER): Likewise.
	(INPUT_STATUS1_REGISTER): Likewise.
	(INPUT_STATUS1_VERTR_BIT): Likewise.
	(page): New variable.
	(wait_vretrace): New function.
	(set_read_map): Likewise.
	(set_start_address): Likewise.
	(grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
	the right page.
	(check_vga_mem): Take the page into account.
	(write_char): Likewise.
	(write_cursor): Likewise.
	(scroll_up): Likewise.  Copy the page to the page that is not
	shown and switch between both pages.
	(grub_vga_putchar): Fix off by one error.
	(grub_vga_cls): Wait for the vertical retrace.  Take the page into
	account.

2004-11-01  Marco Gerards  <metgerards@student.han.nl>

	Add support for iso9660 (including rockridge).

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
	(iso9660_mod_SOURCES): New variable.
	(iso9660_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
	* include/grub/fs.h (grub_iso9660_init): New prototype.
	* util/grub-emu.c (main): Call `grub_iso9660_init'.
	* fs/iso9660.c: New file.

	* include/grub/misc.h (grub_strncat): New prototype.
	* kern/misc.c (grub_strncat): New function.

	* fs/hfs.c (grub_hfs_mount): Translate the error
	`GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
	* fs/jfs.c (grub_jfs_mount): Likewise.
	* fs/ufs.c (grub_ufs_mount): Likewise.

2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
	which initialized BAT registers.
	* boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
	grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
	Move from here...
	* include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
	grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
	... to here.
	* kern/powerpc/ieee1275/openfw.c (grub_map): New function.
	(grub_mapclaim): Likewise.
	* loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
	grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
	hand.

2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>

	* conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
	(COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
	-ffreestanding and -msoft-float.

2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>

	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
	append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
	set in grub_ieee1275_flags.

2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>

	* include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
	prototype.
	* kern/powerpc/ieee1275/init.c (grub_machine_init): Call
	grub_console_init first.
	Change the memory range used for grub_ieee1275_claim and
	grub_mm_init_region.
	Print an error message if the claim fails.
	Include <grub/misc.h>.

2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>

	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
	Call grub_children_iterate for device nodes of type `scsi',
	`ide', or `ata'.
	(grub_ofdisk_open): Remove manual device alias resolution.
	Fix memory leak when device cannot be opened.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_children_iterate): New prototype.
	* kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
	New function.
	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
	Return -1 if args.size was -1.

2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
	(cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
	World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
	Open Firmware's memory for it; claim memory from _start to _end.
	* boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
	(_end): New extern.
	(_start): Zero BSS from __bss_start to _end.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
	New extern.
	(GRUB_IEEE1275_NO_PARTITION_0): New #define.

2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
	-1 if args.base was -1.

2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>

	* term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
	escape sequence instead of a literal ^L. Also call
	grub_ofconsole_gotoxy.

2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>

	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
	void *	arguments to grub_addr_t.  All callers updated.  Also make
	the `result' argument optional.
	(grub_ieee1275_release): change void * arguments to grub_addr_t.
	All callers updated.

2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>

	* commands/ls.c (grub_ls_list_files): Use the string following the
	initial ')', if present, as the filesystem path.
	* kern/rescue.c (grub_rescue_cmd_ls): Likewise.

	* conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.

2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>

	Make the source code of the menu interface more readable.

	* normal/menu.c: Include grub/mm.h.
	(TERM_WIDTH): New macro.
	(TERM_HEIGHT): Likewise.
	(TERM_INFO_HEIGHT): Likewise.
	(TERM_MARGIN): Likewise.
	(TERM_SCROLL_WIDTH): Likewise.
	(TERM_TOP_BORDER_Y): Likewise.
	(TERM_LEFT_BORDER_X): Likewise.
	(TERM_BORDER_WIDTH): Likewise.
	(TERM_MESSAGE_HEIGHT): Likewise.
	(TERM_BORDER_HEIGHT): Likewise.
	(TERM_NUM_ENTRIES): Likewise.
	(TERM_FIRST_ENTRY_Y): Likewise.
	(TERM_ENTRY_WIDTH): Likewise.
	(TERM_CURSOR_X): Likewise.
	(draw_border): Use macros instead of magic numbers.
	(print_entry): Likewise.
	(print_entries): Likewise.
	(run_menu): Likewise. Also, handle the key 'e'.
	(run_menu_entry): Ignore empty command lines.
	(print_message): Added a new argument EDIT. If EDIT is true,
	print a different message.
	(init_page): Likewise.
	(edit_menu_entry): New function. Not implemented yet.

2004-09-17  Marco Gerards  <metgerards@student.han.nl>

	Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
	can be loaded from normal mode.

	* conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
	`multiboot.mod'.
	(linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
	(multiboot_mod_CFLAGS): New variables.
	* loader/i386/pc/linux_normal.c: New file.
	* loader/i386/pc/multiboot_normal.c: Likewise.

	* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
	attribute `unused'.

	* fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
	`fdiro' to read the mode information from instead of `diro'.

	* fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
	looking up a symlink.

	* include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
	macro.
	* normal/command.c (grub_command_execute): Don't parse the
	arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
	flags of the command.

	* normal/menu.c (grub_menu_run): Fix typo.

2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>

	* kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.

	* term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
	`y + 1' instead of `y - 1'.

	* conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.

2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>

	From Hollis Blanchard <hollis@penguinppc.org>:
	* kern/misc.c (memmove): New alias for grub_memmove.
	(memcmp): New alias for grub_memcmp.
	(memset): New alias for grub_memset.
	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
	Change "int handle" to "grub_ieee1275_phandle_t handle".
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_get_property): Likewise.

2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>

	Added normal mode command `chainloader' as module chain.mod, which
	depends on normal.mod and _chain.mod.

	* conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
	(chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
	* include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
	Deleted prototype.
	* loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
	but arguments parsing moved to ...
	(grub_chainloader_cmd): ... here.  New function.
	* include/grub/i386/pc/chainloader.h: New file.
	* loader/i386/pc/chainloader_normal.c: Likewise.

2004-09-11  Marco Gerards  <metgerards@student.han.nl>

	* conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
	(grub_mkimage_LDFLAGS): Likewise.
	(grub_emu_SOURCES): Likewise.
	(kernel_img_HEADERS): Added fshelp.h.
	* fs/ext2.c: Include <grub/fshelp.h>.
	(FILETYPE_REG): New macro.
	(FILETYPE_INO_REG): Likewise.
	(grub_ext_sblock): Renamed to `grub_ext2_sblock'.
	Changed all users.
	(ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
	all users.
	(grub_fshelp_node): New struct.
	(grub_ext2_data): Added member `diropen'.  Changed member `inode'
	to a pointer.
	(grub_ext2_get_file_block): Removed function.
	(grub_ext2_read_block): New function.
	(grub_ext2_read_file): Replaced parameter `data' by `node'.
	This function was written.
	(grub_ext2_mount): Read the root inode.  Create a diropen struct.
	(grub_ext2_find_file): Removed function.
	(grub_ext2_read_symlink): New function.
	(grub_ext2_iterate_dir): Likewise.
	(grub_ext2_open): Rewritten.
	(grub_ext2_dir): Rewritten.
	* include/grub/fshelp.h: New file.
	* fs/fshelp.c: Likewise.

2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>

	* normal/menu.c: Include grub/loader.h and grub/machine/time.h.
	(print_message): Add a missing newline.
	(run_menu): Added timeout support.
	(run_menu_entry): New local function.
	(grub_menu_run): Added support for booting.

	* kern/loader.c (grub_loader_is_loaded): New function.

	* include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
	(grub_get_rtc): Exported.

	* include/grub/i386/pc/time.h: Include grub/symbol.h.
	(grub_get_rtc): Exported.

	* include/grub/normal.h (struct grub_command_list): Remove
	constant from the member `command'.

	* include/grub/loader.h (grub_loader_is_loaded): Declared.

	* include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.

	* conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.

2004-08-28  Marco Gerards  <metgerards@student.han.nl>

	Add support for the JFS filesystem.

	* fs/jfs.c: New file.
	* include/grub/fs.h (grub_jfs_init): New prototype.
	(grub_jfs_fini): New prototype.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add jfs.mod.
	(jfs_mod_SOURCES): New variable.
	(jfs_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
	(grubof_SOURCES): Likewise.
	* util/grub-emu.c (main): Initialize and deinitialize JFS support.

	* fs/fat.c (grub_fat_find_dir): Convert the filename little
	endian to the host endian.
	(grub_fat_utf16_to_utf8): Move function from there...
	* kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
	the endianness of the source string anymore.
	* include/grub/misc.h (grub_utf16_to_utf8): New prototype.

2004-08-24  Marco Gerards  <metgerards@student.han.nl>

	* commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
	(grub_boot_fini) [GRUB_UTIL]: Likewise.
	(GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
	(GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.

	* fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
	(grub_hfs_iterate_dir): Make the function static.  Add prototypes
	for `node_found' and `it_dir'.
	(grub_hfs_dir): Add prototype for `dir_hook'.

	* fs/minix.c (grub_minix_get_file_block): Add prototype for
	`grub_get_indir'.  Rename `indir' in two blocks to `indir16'
	and `indir32' to silence a gcc warning.

	* include/grub/fs.h (grub_hfs_init): New prototype.
	(grub_hfs_fini): Likewise.


2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>

	Each disk device has its own id now. This is useful to make use
	of multiple disk devices.

	* include/grub/disk.h (grub_disk_dev_id): New enum.
	(GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
	(GRUB_DISK_DEVICE_OFDISK_ID): Likewise.

	* disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
	GRUB_DISK_DEVICE_BIOSDISK_ID as an id.

	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
	GRUB_DISK_DEVICE_OFDISK_ID as an id.

	* util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
	GRUB_DISK_DEVICE_BIOSDISK_ID as an id.

	* include/grub/disk.h (struct grub_disk_dev): Added a new member
	"id" which is used by the cache manager.

	* normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
	of just "GRUB".

2004-08-18  Marco Gerards  <metgerards@student.han.nl>

	* fs/hfs.c: New file.
	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add hfs.mod.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
	(grubof_SOURCES): Likewise.
	* util/grub-emu.c (main): Initialize and deinitialize HFS support.

	* include/grub/misc.h (grub_strncasecmp): Add prototype.
	* kern/misc.c (grub_strncasecmp): Add function.

2004-08-14  Marco Gerards  <metgerards@student.han.nl>

	* include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
	with parentheses.

	* fs/ext2.c (FILETYPE_UNKNOWN): New macro.
	(grub_ext2_dir): In case the directory entry type is unknown, read
	it from the inode.

2004-08-02  Peter Bruin  <pjbruin@dds.nl>

	* loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
	grub_load_linux instead of grub_rescue_cmd_linux as second
	argument of grub_rescue_register_command.

	* Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.

2004-07-27  Marco Gerards  <metgerards@student.han.nl>

	* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
	function.
	* commands/boot.c: Remove the check for `GRUB_UTIL'.
	* conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
	`loader/powerpc/ieee1275/linux.c',
	`loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_release): New prototype.
	* include/grub/powerpc/ieee1275/loader.h: Rewritten.
	* kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
	normal, boot, linux and linux_normal.
	* loader/powerpc/ieee1275/linux.c: New file.
	* loader/powerpc/ieee1275/linux_normal.c: Likewise.

2004-07-12  Marco Gerards  <metgerards@student.han.nl>

	* normal/arg.c (grub_arg_parse): Correct error handling after
	reallocating the argumentlist (check if `argl' is not null instead
	of checking if `args' is not null).
	* kern/mm.c (grub_realloc): Return the same pointer when using the
	same region, instead of returning the header address.

2004-07-11  Marco Gerards  <metgerards@student.han.nl>

	* disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
	one block instead of two when looking for the initial partition.
	(grub_partition_probe): Initialize the local variable `p' with 0.
	Use base 10 for the grub_strtoul call.
	* kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
	need for one local variable.
	(grub_strtoul): Don't add the new value to `num', instead of that
	just assign it.

2004-07-11  Marco Gerards  <metgerards@student.han.nl>

	* conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
	(pxeboot_img_SOURCES): New variable.
	(pxeboot_img_ASFLAGS): Likewise.
	(pxeboot_img_LDFLAGS): Likewise.
	* boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
	GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
	<lode_leroy@hotmail.com>.

2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>

	* kern/rescue.c (grub_enter_rescue_mode): Don't continue when
	there was no input.

2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>

	* normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
	the history buffer logic.

2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>

	* fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
	(FILETYPE_INO_SYMLINK): New macros.
	(grub_ext2_find_file): Check if the node is a directory using the
	inode stat information instead of using the filetype in the
	dirent.  Exclude the first character of an absolute symlink.
	(grub_ext2_dir): Mask out the filetype part of the mode member of
	the inode.

2004-05-24  Marco Gerards  <metgerards@student.han.nl>

	Add support for UFS version 1 and 2.  Add support for the minix
	filesystem version 1 and 2, both the variants with 14 and 30 long
	filenames.

	* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
	fs/minix.c.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add ufs.mod and minix.mod.
	(ufs_mod_SOURCES): New variable.
	(ufs_mod_CFLAGS): Likewise.
	(minix_mod_SOURCES): Likewise.
	(minix_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
	fs/minix.c.
	(grubof_SOURCES): Likewise.
	* fs/ufs.c: New file.
	* fs/minix.c: New file.
	* include/grub/fs.h (grub_ufs_init): New prototype.
	(grub_ufs_fini): Likewise.
	(grub_minix_init): Likewise.
	(grub_minix_fini): Likewise.
	* util/grub-emu.c (main): Initialize and deinitialize UFS and
	minix fs.

2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
	commands/ls.c, commands/terminal.c, commands/boot.c,
	commands/cmp.c and commands/cat.c.
	(grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.

	* kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
	"env.h"

2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>

	All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
	and grub_, respectively. Because the conversion is trivial and
	mechanical, I omit the details here. Please refer to the CVS
	if you need more information.

2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/pupa: Renamed to ...
	* include/grub: ... this.
	* util/i386/pc/pupa-mkimage.c: Renamed to ...
	* util/i386/pc/grub-mkimage.c: ... this.
	* util/i386/pc/pupa-setup.c: Renamed to ...
	* util/i386/pc/grub-setup.c: ... this.
	* util/pupa-emu.c: Renamed to ...
	* util/grub-emu.c: ... this.

2004-03-29  Marco Gerards  <metgerards@student.han.nl>

	Add support for the newworld apple macintosh (PPC).  This has been
	tested on the powerbook 2000 only.  It only adds support for
	generic ieee1275 functions, console and disk support.  This should
	be easy to port to other architectures with support for Open
	Firmware.

	* configure.ac: Accept the powerpc as host_cpu.  In the case of
	the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
	specific tests are only executed while building for the i386.
	Inverse test for crosscompile.
	* genmk.rb (Utility): Allow assembler files.
	* normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
	* conf/powerpc-ieee1275.rmk: New file.
	* disk/powerpc/ieee1275/ofdisk.c: Likewise.
	* disk/powerpc/ieee1275/partition.c: Likewise.
	* include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
	* include/pupa/powerpc/ieee1275/console.h: Likewise.
	* include/pupa/powerpc/ieee1275/partition.h: Likewise.
	* include/pupa/powerpc/ieee1275/time.h: Likewise.
	* include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
	* include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
	* include/pupa/powerpc/ieee1275/loader.h
	* include/pupa/powerpc/setjmp.h: Likewise.
	* include/pupa/powerpc/types.h: Likewise.
	* kern/powerpc/ieee1275/init.c: Likewise.
	* kern/powerpc/ieee1275/openfw.c: Likewise.
	* term/powerpc/ieee1275/ofconsole.c: Likewise.

	These files were written by Johan Rydberg
	(jrydberg@night.trouble.net) and I only modified them slightly.

	* boot/powerpc/ieee1275/cmain.c: New file.
	* boot/powerpc/ieee1275/crt0.S: Likewise.
	* boot/powerpc/ieee1275/ieee1275.c: Likewise.
	* include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.

2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>

	* Makefile.in: Update copyright.
	* genmodsrc.sh: Likewise.
	* gensymlist.sh: Likewise.
	* term/i386/pc/vga.c: Indent correctly.

	* util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
	bugreporting address.
	* util/i386/pc/pupa-setup.c (usage): Likewise,
	(main): Call pupa_ext2_init and pupa_ext2_fini.

	* fs/fat.c (log2): Renamed to ...
	(fat_log2): ... this.
	All callers changed.
	* kern/misc.c (memcpy): Alias to pupa_memmove.
	* loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
	lvalue cast.
	* util/console.c (pupa_ncurses_fini): Return 0.

	* util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
	Move fail label here.
	[__GNU__]: Don't warn when using stat.
	(open_device)[!__linux__]: Check if FD < 0 instead of !FD.
	(pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
	long int. Use strtol instead of strtoul.

2004-03-14  Marco Gerards  <metgerards@student.han.nl>

	* commands/boot.c: New file.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/terminal.c: Likewise.
	* normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
	(pupa_register_command): Changed interface to match the new
	argument parser.
	(pupa_command_execute): Changed (almost rewritten) so it uses
	pupa_split_command.  Added support for setting variables using the
	syntax `foo=bar'.
	(rescue_command): Changed to work with the new argument parser.
	(terminal_command): Moved from here to commands/terminal.c.
	(set_command): New function.
	(unset_command): New function.
	(insmod_command): New function.
	(rmmod_command): New function.
	(lsmod_command): New function.
	(pupa_command_init): Don't initialize the command terminal
	anymore.  Initialize the commands set, unset, insmod, rmmod and
	lsmod.
	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
	(kernel_img_HEADERS): Add arg.h and env.h.
	(pupa_mkimage_LDFLAGS): Add kern/env.c.
	(pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
	commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
	normal/arg.c.
	(pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
	terminal.mod.
	(normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
	(boot_mod_SOURCES): New variable.
	(terminal_mod_SOURCES): Likewise.
	(ls_mod_SOURCES): Likewise.
	(cmp_mod_SOURCES): Likewise.
	(cat_mod_SOURCES): Likewise.

	* normal/arg.c: New file.
	* kern/env.c: Likewise.
	* include/pupa/arg.h: Likewise.
	* include/pupa/env.h: Likewise.
	* font/manager.c (font_command): Changed to match argument parsing
	interface changes.
	(PUPA_MOD_INIT): Likewise.
	* hello/hello.c (pupa_cmd_hello): Likewise.
	(PUPA_MOD_INIT): Likewise.
	* include/pupa/disk.h: Include <pupa/device.h>.
	(pupa_print_partinfo): New prototype.
	* include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
	(pupa_dl_get_prefix): Likewise.
	* include/pupa/misc.h: Include <pupa/err.h>.
	(pupa_isgraph): New prototype.
	(pupa_isdigit): Likewise.
	(pupa_split_cmdline): Likewise.
	* include/pupa/normal.h: Include <pupa/arg.h>.
	(pupa_command): Changed the prototype of the member `func' to
	match the argument parsing interface.  Added member `options'.
	(pupa_register_command): Updated to match function.
	(pupa_arg_parse): New prototype.
	(pupa_hello_init) [PUPA_UTIL]: New prototype.
	(pupa_hello_fini) [PUPA_UTIL]: Likewise.
	(pupa_ls_init) [PUPA_UTIL]: Likewise.
	(pupa_ls_fini) [PUPA_UTIL]: Likewise.
	(pupa_cat_init) [PUPA_UTIL]: Likewise.
	(pupa_cat_fini) [PUPA_UTIL]: Likewise.
	(pupa_boot_init) [PUPA_UTIL]: Likewise.
	(pupa_boot_fini) [PUPA_UTIL]: Likewise.
	(pupa_cmp_init) [PUPA_UTIL]: Likewise.
	(pupa_cmp_fini) [PUPA_UTIL]: Likewise.
	(pupa_terminal_init) [PUPA_UTIL]: Likewise.
	(pupa_terminal_fini) [PUPA_UTIL]: Likewise.
	* kern/disk.c: Include <pupa/file.h>.
	(pupa_print_partinfo): New function.
	* kern/dl.c: Include <pupa/env.h>.
	(pupa_dl_dir): Variable removed.
	(pupa_dl_load): Use the environment variable `prefix' instead of
	the variable pupa_dl_dir.
	(pupa_dl_set_prefix): Function removed.
	(pupa_dl_get_prefix): Likewise.
	* kern/i386/pc/init.c: Include <pupa/env.h>.
	(pupa_machine_init): Use the environment variable `prefix' instead of
	using pupa_dl_set_prefix to set the prefix.
	* kern/main.c: Include <pupa/env.h>.
	(pupa_set_root_dev): Use the environment variable `prefix' instead of
	using pupa_dl_get_prefix to get the prefix.
	* kern/misc.c: Include <pupa/env.h>.
	(pupa_isdigit): New function.
	(pupa_isgraph): Likewise.
	(pupa_ftoa): Likewise.
	(pupa_vsprintf): Added support for printing values of the type
	`double'.  Make it possible to format variable output when using
	formatting like `%1.2%f'.
	(pupa_split_cmdline): New function.
	* kern/rescue.c: Include <pupa/env.h>.
	(next_word): Removed function.
	(pupa_rescue_cmd_prefix): Likewise.
	(pupa_rescue_cmd_set): New function.
	(pupa_rescue_cmd_unset): New function.
	(pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
	split the command line instead of splitting it here.  Added
	support for setting variables using the syntax `foo=bar'.  Don't
	initialize the prefix command anymore.  Initialized the set and
	unset commands.
	* normal/cmdline.c: Include <pupa/env.h>.
	(pupa_tab_complete): Added prototypes for print_simple_completion,
	print_partition_completion, add_completion, iterate_commands,
	iterate_dev, iterate_part and iterate_dir. Moved code to print
	partition information from here to kern/disk.c.
	(pupa_cmdline_run): Don't check if the function exists anymore.
	* normal/main.c: Include <pupa/env.h>.
	(pupa_rescue_cmd_normal): Use the environment variable `prefix'
	instead of using pupa_dl_get_prefix to get the prefix.
	* term/i386/pc/vga.c: Include <pupa/arg.h>.
	(check_vga_mem): Cast pointers to `void *' to silence a gcc
	warning.
	(pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
	(pupa_vga_setcolor): Declare unused variables with `__attribute__
	((unused))' to silence a gcc warning.
	(pupa_vga_setcolor): Likewise.
	(debug_command): Changed to match argument parsing
	interface changes.
	* util/pupa-emu.c: Include <pupa/env.h>.
	(options): Added 0's for unused fields to silence a gcc warning.
	(argp): Likewise.
	(main): Use the environment variable `prefix' instead of using
	pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
	boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
	and terminal.

	* util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
	* util/misc.c: Include <malloc.h>.
	(pupa_malloc): Rewritten so errors are correctly reported.
	(pupa_realloc): Likewise.
	(pupa_memalign): Likewise.
	(pupa_mm_init_region): Declare unused variables with
	`__attribute__ ((unused))' to silence a gcc warning.
	* normal/i386/setjmp.S: Remove tab at the end of the file to
	silence a gcc warning.
	* loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
	variables with `__attribute__ ((unused))' to silence a gcc
	warning.
	* loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
	local variable i unsigned to silence a gcc warning.

	* kern/term.c: Include <pupa/misc.h>.
	(pupa_more_lines): New variable.
	(pupa_more): Likewise.
	(pupa_putcode): When the pager is active pause at the end of every
	screen.
	(pupa_set_more): New function.
	* include/pupa/term.h (pupa_set_more): New prototype.


2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>

	Now this project is GRUB 2 rather than PUPA. The location of
	the CVS repository was moved to GRUB's.

	* configure.ac: Use bug-grub as the reporting address.
	Use GRUB instead of PUPA.
	Change the version number to 1.90.

2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>

	* genkernsyms.sh: Updated copyright information.
	* genmk.rb: Likewise.
	* genmodsrc.sh: Likewise.
	* gensymlist.sh: Likewise.
	* boot/i386/pc/boot.S: Likewise.
	* boot/i386/pc/diskboot.S: Likewise.
	* disk/i386/pc/biosdisk.c: Likewise.
	* disk/i386/pc/partition.c: Likewise.
	* font/manager.c: Likewise.
	* fs/ext2.c: Likewise.
	* fs/fat.c: Likewise.
	* include/pupa/boot.h: Likewise.
	* include/pupa/device.h: Likewise.
	* include/pupa/disk.h: Likewise.
	* include/pupa/dl.h: Likewise.
	* include/pupa/elf.h: Likewise.
	* include/pupa/err.h: Likewise.
	* include/pupa/file.h: Likewise.
	* include/pupa/font.h: Likewise.
	* include/pupa/fs.h: Likewise.
	* include/pupa/kernel.h: Likewise.
	* include/pupa/loader.h: Likewise.
	* include/pupa/misc.h: Likewise.
	* include/pupa/mm.h: Likewise.
	* include/pupa/net.h: Likewise.
	* include/pupa/normal.h: Likewise.
	* include/pupa/rescue.h: Likewise.
	* include/pupa/setjmp.h: Likewise.
	* include/pupa/symbol.h: Likewise.
	* include/pupa/term.h: Likewise.
	* include/pupa/types.h: Likewise.
	* include/pupa/i386/setjmp.h: Likewise.
	* include/pupa/i386/types.h: Likewise.
	* include/pupa/i386/pc/biosdisk.h: Likewise.
	* include/pupa/i386/pc/boot.h: Likewise.
	* include/pupa/i386/pc/console.h: Likewise.
	* include/pupa/i386/pc/init.h: Likewise.
	* include/pupa/i386/pc/kernel.h: Likewise.
	* include/pupa/i386/pc/linux.h: Likewise.
	* include/pupa/i386/pc/loader.h: Likewise.
	* include/pupa/i386/pc/memory.h: Likewise.
	* include/pupa/i386/pc/multiboot.h: Likewise.
	* include/pupa/i386/pc/partition.h: Likewise.
	* include/pupa/i386/pc/time.h: Likewise.
	* include/pupa/i386/pc/vga.h: Likewise.
	* include/pupa/i386/pc/util/biosdisk.h: Likewise.
	* include/pupa/util/getroot.h: Likewise.
	* include/pupa/util/misc.h: Likewise.
	* include/pupa/util/resolve.h: Likewise.
	* kern/device.c: Likewise.
	* kern/disk.c: Likewise.
	* kern/dl.c: Likewise.
	* kern/err.c: Likewise.
	* kern/file.c: Likewise.
	* kern/fs.c: Likewise.
	* kern/loader.c: Likewise.
	* kern/main.c: Likewise.
	* kern/misc.c: Likewise.
	* kern/mm.c: Likewise.
	* kern/rescue.c: Likewise.
	* kern/term.c: Likewise.
	* kern/i386/dl.c: Likewise.
	* kern/i386/pc/init.c: Likewise.
	* kern/i386/pc/lzo1x.S: Likewise.
	* kern/i386/pc/startup.S: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/multiboot.c: Likewise.
	* normal/cmdline.c: Likewise.
	* normal/command.c: Likewise.
	* normal/main.c: Likewise.
	* normal/menu.c: Likewise.
	* normal/i386/setjmp.S: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* util/console.c: Likewise.
	* util/genmoddep.c: Likewise.
	* util/misc.c: Likewise.
	* util/pupa-emu.c: Likewise.
	* util/resolve.c: Likewise.
	* util/unifont2pff.rb: Likewise.
	* util/i386/pc/biosdisk.c: Likewise.
	* util/i386/pc/getroot.c: Likewise.
	* util/i386/pc/pupa-mkimage.c: Likewise.
	* util/i386/pc/pupa-setup.c: Likewise.

2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>

	* fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
	when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
	callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
	reading and reset it after reading.
	(pupa_ext2_close): Return PUPA_ERR_NONE.

	* include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
	Correct value.
	(struct linux_kernel_header): Add kernel_version and
	initrd_addr_max.
	* loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
	pupa_file_read succeeds.
	(pupa_rescue_cmd_initrd): Implement.

2003-12-03  Marco Gerards  <metgerards@student.han.nl>

	* fs/ext2.c (pupa_ext2_label): New function.
	(pupa_ext2_fs): Added label.
	* fs/fat.c (pupa_fat_label): New function.
	(pupa_fat_fs): Added label.
	* include/pupa/fs.h (struct pupa_fs): Added prototype label.

	* kern/misc.c (pupa_strndup): New function.
	* include/pupa/misc.h (pupa_strndup): New prototype.

	* include/pupa/normal.h: Include <pupa/err.h>.
	(pupa_set_history): New prototype.
	(pupa_iterate_commands): New prototype.
	* normal/cmdline.c: Include <pupa/machine/partition.h>,
	<pupa/disk.h>, <pupa/file.h>.
	(hist_size): New variable.
	(hist_lines): Likewise.
	(hist_end): Likewise.
	(hist_used): Likewise.
	(pupa_set_history): New function.
	(pupa_history_get): Likewise.
	(pupa_history_add): Likewise.
	(pupa_history_replace): Likewise.
	(pupa_tab_complete): Likewise.
	(pupa_cmdline_run): Added tab completion and history buffer.  Tab
	completion shows partitionnames while completing partitions, this
	feature was suggested by Jeff Bailey.
	* normal/command.c (pupa_iterate_commands): New function.
	* normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
	(pupa_normal_init): Initialize history buffer.
	(PUPA_MOD_INIT): Likewise.
	(pupa_normal_fini): Free the history buffer.
	(PUPA_MOD_FINI): Likewise.

	* util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
	key.

	* aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
	* configure.ac [i386]: Check for regparam bug.
	(NESTED_FUNC_ATTR) [! i386]: Defined.

2003-11-17  Marco Gerards  <metgerards@student.han.nl>

	* conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
	(pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
	(pupa_emu_SOURCES): New variable.
	(pupa_emu_LDFLAGS): Likewise.
	* include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
	(pupa_ext2_fini) [PUPA_UTIL]: Likewise.
	* include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
	(pupa_normal_fini) [PUPA_UTIL]: Likewise.
	* include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
	(pupa_jmp_buf): New typedef.
	(pupa_setjmp) [PUPA_UTIL]: New macro.
	(pupa_longjmp) [PUPA_UTIL]: Likewise.
	* include/pupa/term.h (struct pupa_term): New member `refresh'.
	(pupa_refresh): New prototype.
	* include/pupa/util/getroot.h: New file.
	* kern/misc.c (pupa_vsprintf): Refresh the screen after updating
	it.
	* kern/rescue.c (pupa_rescue_get_command_line): Likewise.
	(pupa_rescue_cmd_cat): Likewise.
	(pupa_rescue_cmd_ls): Likewise.
	(pupa_rescue_cmd_testload): Likewise.
	(pupa_rescue_cmd_lsmod): Likewise.
	* normal/cmdline.c (pupa_cmdline_get): Likewise.
	* normal/menu.c (run_menu): Likewise.
	* kern/term.c (pupa_cls): Likewise.
	(pupa_refresh): New function.
	* normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
	(pupa_normal_fini) [PUPA_UTIL]: Likewise.
	* util/console.c: New file.

	* util/i386/pc/getroot.c: New file.
	* util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
	(pupa_putchar): New function.
	(pupa_refresh): Likewise.
	(xgetcwd): Function moved to ...
	(strip_extra_slashes): Likewise.
	(get_prefix): Likewise.
	* util/i386/pc/getroot.c: ... here.
	(find_root_device): Function moved and renamed to...
	* util/i386/pc/getroot.c (pupa_find_root_device): ... here.
	Changed all callers.
	* util/i386/pc/pupa-setup.c (guess_root_device): Function moved
	and renamed to...
	* util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
	Changed all callers.
	* util/misc.c (pupa_memalign): New function.
	(pupa_mm_init_region): Likewise.
	(pupa_register_exported_symbols): Likewise.
	(pupa_putchar): Function removed.
	* util/pupa-emu.c: New file.

2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>

	* conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
	(_multiboot_mod_SOURCES): New variable.
	(_multiboot_mod_CFLAGS): Likewise.
	* loader/i386/pc/multiboot.c: New file.
	* include/pupa/i386/pc/multiboot.h: Likewise.
	* kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
	(pupa_multiboot_real_boot): New function.
	* include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
	(pupa_multiboot_real_boot): New prototype.
	(pupa_rescue_cmd_multiboot): Likewise
	(pupa_rescue_cmd_module): Likewise.

	* kern/loader.c (pupa_loader_set): Continue when
	pupa_loader_unload_func() fails.
	(pupa_loader_unset): New function.
	* include/pupa/loader.h (pupa_loader_unset): New prototype.

	* kern/misc.c (pupa_stpcpy): New function.
	* include/pupa/misc.h (pupa_stpcpy): New prototype.

2003-11-12  Marco Gerards  <metgerards@student.han.nl>

	* disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
	for available extensions.

	* include/pupa/i386/pc/time.h: New file.
	* kern/disk.c: Include <pupa/machine/time.h>.
	(PUPA_CACHE_TIMEOUT): New macro.
	(pupa_last_time): New variable.
	(pupa_disk_open): Flush the cache when there was a timeout.
	(pupa_disk_close): Reset the timer.
	* kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
	pupa_currticks.
	* util/misc.c: Include <sys/times.h>
	(pupa_get_rtc): New function.

2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>

	* fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
	as blocks.
	(pupa_ext2_get_file_block): Use blocks member.

	* fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
	first block. Return -1 instead of pupa_errno on error.

2003-10-27  Marco Gerards  <metgerards@student.han.nl>

	* README: In the pupa-mkimage example use _chain instead of chain
	and ext2 instead of fat.
	* TODO: Replace ext2fs with jfs as an example.  Add an item for
	adding journal playback for ext2fs.
	* conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
	(pkgdata_MODULES): Added ext2.mod.
	(ext2_mod_SOURCES): New variable.
	(ext2_mod_CFLAGS): Likewise.
	* include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
	* include/pupa/misc.h (pupa_strncpy): New prototype.
	(pupa_strcat): Likewise.
	(pupa_strncmp): Likewise.
	* kern/misc.c (pupa_strcat): Enable function.
	(pupa_strncpy): New function.
	(pupa_strncmp): Likewise.
	* fs/ext2.c: New file.

	* kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
	when the read failed before retrying.
	* util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
	(_FILE_OFFSET_BITS): Likewise.
	* configure.ac: Added AC_SYS_LARGEFILE.

2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>

	* genmk.rb (PModule#rule): Make sure to get only symbol names
	from the output of nm.
	Reported by Robert Millan <zeratul2@wanadoo.es>.

2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>

	I forgot to check in these changes for a long time. This adds
	incomplete support for VGA console, and this is still very
	buggy. Also, a lot of consideration is required for I18N,
	UNICODE, and VGA font issues. Therefore, assume that this is
	such that "better than nothing".

	* font/manager.c: New file.
	* include/pupa/font.h: Likewise.
	* include/pupa/i386/pc/vga.h: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* util/unifont2pff.rb: Likewise.

	* conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
	(pkgdata_MODULES): Added vga.mod and font.mod.
	(vga_mod_SOURCES): New variables.
	(vga_mod_CFLAGS): Likewise.
	(font_mod_SOURCES): Likewise.
	(font_mod_CFLAGS): Likewise.

	* include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.

	* include/pupa/term.h: Include pupa/err.h.
	(struct pupa_term): Added init and fini.
	Changed the argument of putchar to pupa_uint32_t.

	* include/pupa/i386/pc/console.h: Include pupa/symbol.h.
	(pupa_console_real_putchar): New prototype.
	(pupa_console_putchar): Removed.
	(pupa_console_checkkey): Exported.
	(pupa_console_getkey): Likewise.

	* kern/misc.c (pupa_vsprintf): Add support for UNICODE
	characters.

	* kern/term.c (pupa_term_set_current): Rewritten.
	(pupa_putchar): Likewise.
	(pupa_putcode): New function.

	* kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
	(pupa_console_real_putchar): ... this.
	(pupa_vga_set_mode): New function.
	(pupa_vga_get_font): Likewise.

	* normal/command.c: Include pupa/term.h.
	(terminal_command): New function.
	(pupa_command_init): Register the command "terminal".

	* normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
	(DISP_UP): Likewise.
	(DISP_RIGHT): Likewise.
	(DISP_DOWN): Likewise.
	(DISP_HLINE): Likewise.
	(DISP_VLINE): Likewise.
	(DISP_UL): Likewise.
	(DISP_UR): Likewise.
	(DISP_LL): Likewise.
	(DISP_LR): Likewise.

	* term/i386/pc/console.c (pupa_console_putchar): New function.

2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>

	* util/resolve.c (pupa_util_resolve_dependencies): BUG
	FIX. Reverse the path_list.

	* include/pupa/normal.h: Export pupa_register_command and
	pupa_unregister_command.

	* hello/hello.c (pupa_cmd_hello): New module.
	* conf/i386-pc.rmk: Added hello.mod.

2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/i386/pc/lzo1x.S: New file.

	* util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
	(compress_kernel): New variable.
	(generate_image): Heavily modified to support compressing a
	large part of the core image.

	* util/misc.c (pupa_util_read_image): Fix a file descriptor
	leak.
	(pupa_util_load_image): New function.

	* kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
	(pupa_compressed_size): New variable.
	(codestart): Enable Gate A20 here.
	Decompress the compressed part of the core image.
	Rearrange the code to put functions and variables which are
	required for initialization in the non-compressed part.
	Include lzo1x.S.

	* kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
	here.

	* include/pupa/util/misc.h (pupa_util_write_image): Declared.

	* include/pupa/i386/pc/kernel.h
	(PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
	(PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
	(PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
	(PUPA_KERNEL_MACHINE_PREFIX): Likewise.
	(PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.

	* conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.

	* genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
	(Utility#rule): Likewise.

	* configure.ac: Check if LZO is available.

2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/pupa/normal.h: New file.
	* include/pupa/setjmp.h: Likewise.
	* include/pupa/i386/setjmp.h: Likewise.
	* normal/cmdline.c: Likewise.
	* normal/command.c: Likewise.
	* normal/main.c: Likewise.
	* normal/menu.c: Likewise.
	* normal/i386/setjmp.S: Likewise.

	* loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
	(pupa_rescue_cmd_initrd): Likewise.

	* loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
	Likewise.

	* kern/i386/pc/startup.S (translation_table): New variable.
	(translate_keycode): New function.
	(pupa_console_getkey): Call translate_keycode.

	* kern/rescue.c (attempt_normal_mode): New function.
	(pupa_enter_rescue_mode): Attempt to execute the normal mode. If
	it failed, print a message.

	* kern/mm.c (pupa_real_malloc): Print more information when a
	free magic is broken.
	(pupa_free): If the first free header is not free actually, set
	it to P.

	* kern/main.c (pupa_load_normal_mode): Just load the module
	"normal".
	(pupa_main): Don't print the message
	"Entering into rescue mode..." here.

	* include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
	Declared.
	(pupa_rescue_cmd_initrd): Likewise.
	(pupa_rescue_cmd_initrd): Likewise.

	* include/pupa/symbol.h (FUNCTION): Specify the type.
	(VARIABLE): Likewise.

	* include/pupa/err.h (pupa_err_t): Added
	PUPA_ERR_UNKNOWN_COMMAND.

	* include/pupa/dl.h (pupa_dl_set_prefix): Exported.
	(pupa_dl_get_prefix): Likewise.

	* conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
	Added _chain.mod and _linux.mod instead of chain.mod and
	linux.mod.
	(chain_mod_SOURCES): Renamed to ...
	(_chain_mod_SOURCES): ... this.
	(chain_mod_CFLAGS): Renamed to ...
	(_chain_mod_CFLAGS): ... this.
	(linux_mod_SOURCES): Renamed to ...
	(_linux_mod_SOURCES): ... this.
	(linux_mod_CFLAGS): Renamed to ...
	(_linux_mod_CFLAGS): ... this.
	(normal_mod_SOURCES): New variable.
	(normal_mod_CFLAGS): Likewise.
	(normal_mod_ASFLAGS): Likewise.

2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
	possible.

	* kern/dl.c (pupa_dl_ref): Refer depending modules
	recursively.
	(pupa_dl_unref): Unrefer depending modules recursively.
	Don't call pupa_dl_unload implicitly, because PUPA can crash if
	a module is unloaded before one depending on that module is
	unloaded.
	(pupa_dl_unload): Unload depending modules explicitly,
	if possible.

2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/pupa/i386/pc/linux.h: New file.
	* loader/i386/pc/linux.c: Likewise.

	* loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
	Removed.
	(pupa_chainloader_unload): Return PUPA_ERR_NONE.
	(pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
	of PUPA_CHAINLOADER_BOOT_SECTOR.

	* kern/i386/pc/startup.S: Include pupa/machine/linux.h.
	(pupa_linux_prot_size): New variable.
	(pupa_linux_tmp_addr): Likewise.
	(pupa_linux_real_addr): Likewise.
	(pupa_linux_boot_zimage): New function.
	(pupa_linux_boot_bzimage): Likewise.

	* kern/i386/pc/init.c (struct mem_region): New structure.
	(MAX_REGIONS): New macro.
	(mem_regions): New variable.
	(num_regions): Likewise.
	(pupa_os_area_addr): Likewise.
	(pupa_os_area_size): Likewise.
	(pupa_lower_mem): Likewise.
	(pupa_upper_mem): Likewise.
	(add_mem_region): New function.
	(compact_mem_regions): Likewise.
	(pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
	the size of the conventional memory and that of so-called upper
	memory (before the first memory hole).
	Instead of adding each found region to free memory, use
	add_mem_region and add them after removing overlaps.
	Also, add only 1/4 of the upper memory to free memory. The rest
	is used for loading OS images. Maybe this is ad hoc, but this
	makes it much easier to relocate OS images when booting.

	* kern/rescue.c (pupa_rescue_cmd_module): Removed.
	(pupa_enter_rescue_mode): Don't register initrd and module.

	* kern/mm.c: Include pupa/dl.h.

	* kern/main.c: Include pupa/file.h and pupa/device.h.

	* kern/loader.c (pupa_loader_load_module_func): Removed.
	(pupa_loader_load_module): Likewise.

	* kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
	``.o''.

	* include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
	(pupa_linux_tmp_addr): Likewise.
	(pupa_linux_real_addr): Likewise.
	(pupa_linux_boot_zimage): Likewise.
	(pupa_linux_boot_bzimage): Likewise.

	* include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
	(pupa_upper_mem): Likewise.
	(pupa_gate_a20): Don't export, because turning off Gate A20 in a
	module is too dangerous.

	* include/pupa/loader.h (pupa_os_area_addr): Declared.
	(pupa_os_area_size): Likewise.
	(pupa_loader_set): Remove the first argument. Loader doesn't
	manage modules or initrd any longer.
	(pupa_loader_load_module): Removed.

	* conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
	(linux_mod_SOURCES): New variable.
	(linux_mod_CFLAGS): Likewise.

2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/pupa-setup.c (setup): Convert the endianness of
	the length of a blocklist correctly.

	* util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
	Use ioctl only if the OS file is a block device.
	(pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
	not very useful for normal files.

	* kern/main.c (pupa_set_root_dev): New function.
	(pupa_load_normal_mode): Likewise.
	(pupa_main): Call those above.

	* include/pupa/types.h (pupa_swap_bytes16): Cast the result to
	pupa_uint16_t.

	* include/pupa/kernel.h (pupa_enter_normal_mode): Removed.

2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
	(setup): Configure the installed partition information and the
	dl prefix.

	* loader/i386/pc/chainloader.c (my_mod): New variable.
	(pupa_chainloader_unload): New function.
	(pupa_rescue_cmd_chainloader): Refer itself.
	(PUPA_MOD_INIT): Save its own module in MY_MOD.

	* kern/i386/pc/startup.S (install_partition): Removed.
	(version_string): Likewise.
	(config_file): Likewise.
	(pupa_install_dos_part): New variable.
	(pupa_install_bsd_part): Likewise.
	(pupa_prefix): Likewise.
	(pupa_chainloader_real_boot): Call pupa_dl_unload_all.

	* kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
	and pupa/misc.h.
	(make_install_device): New function.
	(pupa_machine_init): Set the dl prefix.

	* kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
	(buf): Renamed to ...
	(linebuf): ... this.
	(pupa_rescue_cmd_prefix): New function.
	(pupa_rescue_cmd_insmod): Likewise.
	(pupa_rescue_cmd_rmmod): Likewise.
	(pupa_rescue_cmd_lsmod): Likewise.
	(pupa_enter_rescue_mode): Register new commands: prefix, insmod,
	rmmod and lsmod.

	* kern/mm.c (pupa_memalign): If failed even after invalidating
	disk caches, unload unneeded modules and retry.

	* kern/misc.c (pupa_memmove): New function.
	(pupa_memcpy): Removed.
	(pupa_strcpy): New function.
	(pupa_itoa): Made static.

	* kern/dl.c (pupa_dl_iterate): New function.
	(pupa_dl_ref): Likewise.
	(pupa_dl_unref): Likewise.
	(pupa_dl_unload): Return if succeeded or not.
	(pupa_dl_unload_unneeded): New function.
	(pupa_dl_unload_all): Likewise.
	(pupa_dl_init): Renamed to ...
	(pupa_dl_set_prefix): ... this.
	(pupa_dl_get_prefix): New function.

	* include/pupa/i386/pc/kernel.h: Include pupa/types.h.
	(PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
	(PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
	(PUPA_KERNEL_MACHINE_PREFIX): Likewise.
	(pupa_install_dos_part): Declared.
	(pupa_install_bsd_part): Likewise.
	(pupa_prefix): Likewise.
	(pupa_boot_drive): Likewise.

	* include/pupa/types.h: Fix a typo.

	* include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
	pupa_memmove.
	(pupa_memmove): Declared.
	(pupa_strcpy): Likewise.

	* include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
	pupa_mod_init takes one argument, its own module.
	(pupa_dl_unload_unneeded): Declared.
	(pupa_dl_unload_all): Likewise.
	(pupa_dl_ref): Likewise.
	(pupa_dl_unref): Likewise.
	(pupa_dl_iterate): Likewise.
	(pupa_dl_init): Renamed to ...
	(pupa_dl_set_prefix): ... this.
	(pupa_dl_get_prefix): Declared.

	* fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
	(pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
	unloaded.
	(pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
	(pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.

	* configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
	-Wmissing-prototypes, -Wundef and -Wstrict-prototypes.

2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>

	* util/i386/pc/pupa-setup.c (setup): Define the internal
	function find_first_partition_start at the top level, because GCC
	3.0.x cannot compile internal functions in deeper scopes
	correctly.
	(find_root_device): Use lstat instead of stat.
	Don't follow symbolic links.
	Fix the path-constructing code.

	* util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
	(pupa_util_biosdisk_open) [__linux__]: Get the size of a device
	by a BLKGETSIZE ioctl first, because block devices don't fill
	the member st_mode of the structure stat on Linux.
	[__linux__] (linux_find_partition): Use a temporary buffer
	REAL_DEV for the working space. Copy it to DEV before returning.
	(open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
	buffer cache consistent.
	(get_os_disk) [__linux__]: Use the length 5 instead of 4 for
	strncmp. The previous value was merely wrong.
	(pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.

	* fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
	FAT size is 12. The previous value was merely wrong.

	* kern/main.c (pupa_main): Don't split the starting message from
	newlines.

	* kern/term.c (pupa_putchar): Put CR after LF instead of before
	LF, because BIOS goes crazy about character attributes in this
	case.

2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>

	* include/i386/pc/util/biosdisk.h: New file.
	* util/i386/pc/biosdisk.c: Likewise.
	* util/i386/pc/pupa-setup.c: Likewise.

	* Makefile.in (INCLUDE_DISTFILES): Added
	include/pupa/i386/pc/util/biosdisk.h.
	(UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
	directory util/i386/pc.
	(install-local): Added a rule for sbin_UTILITIES.
	(uninstall): Likewise.

	* util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.

	* util/misc.c (xrealloc): New function.
	(pupa_malloc): Likewise.
	(pupa_free): Likewise.
	(pupa_realloc): Likewise.
	(pupa_stop): Likewise.
	(pupa_putchar): Likewise.

	* kern/disk.c (pupa_disk_read): Prevent L from underflowing.

	* include/pupa/util/misc.h (xrealloc): Declared.

	* include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
	macro.
	(PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
	(PUPA_BOOT_MACHINE_BPB_END): ... this.

	* include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
	[PUPA_UTIL] (pupa_fat_fini): Likewise.

	* fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
	way should be implemented.
	[PUPA_UTIL] (pupa_fat_fini): Likewise.

	* disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
	the size of NAME for safety.
	(pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
	0x88.

	* conf/i386-pc.rmk (sbin_UTILITIES): New variable.
	(pupa_setup_SOURCES): Likewise.

	* genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.

2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>

	* kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
	bunch of pushl's from pusha, because this destroys the return
	value.

2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>

	Use -mrtd and -mregparm=3 to reduce the generated code sizes.
	This means that any missing prototypes could be fatal. Also, you
	must take care when writing assembly code. See the comments at
	the beginning of startup.S, for more details.

	* kern/i386/pc/startup.S (pupa_halt): Modified for the new
	compilation mechanism.
	(pupa_chainloader_real_boot): Likewise.
	(pupa_biosdisk_rw_int13_extensions): Likewise.
	(pupa_biosdisk_rw_standard): Likewise.
	(pupa_biosdisk_check_int13_extensions): Likewise.
	(pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
	(pupa_biosdisk_get_diskinfo_standard): Likewise.
	(pupa_get_memsize): Likewise.
	(pupa_get_mmap_entry): Likewise.
	(pupa_console_putchar): Likewise.
	(pupa_console_setcursor): Likewise.
	(pupa_getrtsecs): Use pushl instead of push.

	* kern/i386/pc/init.c (pupa_machine_init): Use the scratch
	memory instead of the stack for a mmap entry, because some
	BIOSes may ignore the maximum size and overflow.

	* conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.

	* genmk.rb (PModule#rule): Compile automatically generated
	sources with module-specific CFLAGS as well as other sources.

2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>

	* configure.ac: Check ld.
	Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
	respectively, before checking endianness and sizes.

	* Makefile.in (LD): New variable.

2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>

	* Makefile.in (BUILD_CC): CC -> BUILD_CC.

2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>

	* Changelog: New file.