ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
207 discussions
Start a n
N
ew thread
[spetreolle] 66105: [LIVECD] Add shortcut to the On Screen Keyboard. Patch by Jared. CORE-9093 #resolve
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Jan 28 22:32:53 2015 New Revision: 66105 URL:
http://svn.reactos.org/svn/reactos?rev=66105&view=rev
Log: [LIVECD] Add shortcut to the On Screen Keyboard. Patch by Jared. CORE-9093 #resolve Modified: trunk/reactos/boot/bootdata/CMakeLists.txt Modified: trunk/reactos/boot/bootdata/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/CMakeLists.t…
============================================================================== --- trunk/reactos/boot/bootdata/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/CMakeLists.txt [iso-8859-1] Wed Jan 28 22:32:53 2015 @@ -101,6 +101,7 @@ add_livecd_shortcut("Service Manager" servman.exe "Profiles/All Users/Start Menu/Programs/Administrative Tools") add_livecd_shortcut("System Configuration" msconfig.exe "Profiles/All Users/Start Menu/Programs/Administrative Tools") add_livecd_shortcut("Magnify" magnify.exe "Profiles/All Users/Start Menu/Programs/Accessibility") +add_livecd_shortcut("On-Screen Keyboard" osk.exe "Profiles/All Users/Start Menu/Programs/Accessibility") add_livecd_shortcut("Calculator" calc.exe "Profiles/All Users/Start Menu/Programs/Accessories") add_livecd_shortcut("Command Prompt" cmd.exe "Profiles/All Users/Start Menu/Programs/Accessories") add_livecd_shortcut("Paint" mspaint.exe "Profiles/All Users/Start Menu/Programs/Accessories")
9 years, 10 months
1
0
0
0
[spetreolle] 66104: [UNIATA] Update to 0.45e. CORE-8727 #resolve Sorry for the delay !
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Jan 28 22:20:09 2015 New Revision: 66104 URL:
http://svn.reactos.org/svn/reactos?rev=66104&view=rev
Log: [UNIATA] Update to 0.45e. CORE-8727 #resolve Sorry for the delay ! Modified: trunk/reactos/drivers/storage/ide/uniata/bsmaster.h trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp trunk/reactos/drivers/storage/ide/uniata/id_init.cpp trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h Modified: trunk/reactos/drivers/storage/ide/uniata/bsmaster.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/bsmaster.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/bsmaster.h [iso-8859-1] Wed Jan 28 22:20:09 2015 @@ -1026,8 +1026,9 @@ BOOLEAN CopyDmaBuffer; //BOOLEAN MemIo; BOOLEAN AltRegMap; - - UCHAR Reserved[3]; + BOOLEAN Force80pin; + + UCHAR Reserved[2]; MECHANICAL_STATUS_INFORMATION_HEADER MechStatusData; SENSE_DATA MechStatusSense; @@ -1303,6 +1304,7 @@ //PIDE_AHCI_PORT_REGISTERS BaseIoAHCIPort[AHCI_MAX_PORT]; ULONG AHCI_CAP; ULONG AHCI_PI; + ULONG AHCI_PI_mask; // for port exclusion, usually = AHCI_PI PATA_REQ AhciInternalAtaReq0; PSCSI_REQUEST_BLOCK AhciInternalSrb0; Modified: trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] Wed Jan 28 22:20:09 2015 @@ -1453,9 +1453,9 @@ } GetPciConfig2(0x48, reg48); - if(!(ChipFlags & ICH4_FIX)) { +// if(!(ChipFlags & ICH4_FIX)) { GetPciConfig2(0x4a, reg4a); - } +// } GetPciConfig2(0x54, reg54); // if(udmamode >= 0) { // enable the write buffer to be used in a split (ping/pong) manner. @@ -1472,7 +1472,7 @@ /* Set UDMA reference clock (33 MHz or more). */ SetPciConfig1(0x48, reg48 | (0x0001 << dev)); - if(!(ChipFlags & ICH4_FIX)) { +// if(!(ChipFlags & ICH4_FIX)) { if(deviceExtension->MaxTransferMode == ATA_UDMA3) { // Special case (undocumented overclock !) for PIIX4e SetPciConfig2(0x4a, (reg4a | (0x03 << (dev<<2)) ) ); @@ -1480,18 +1480,15 @@ SetPciConfig2(0x4a, (reg4a & ~(0x03 << (dev<<2))) | (((USHORT)(intel_utimings[i])) << (dev<<2) ) ); } - } +// } /* Set UDMA reference clock (66 MHz or more). */ + reg54 &= ~(0x1001 << dev); if(i > 2) { reg54 |= (0x1 << dev); - } else { - reg54 &= ~(0x1 << dev); } /* Set UDMA reference clock (133 MHz). */ if(i >= 5) { reg54 |= (0x1000 << dev); - } else { - reg54 &= ~(0x1000 << dev); } SetPciConfig2(0x54, reg54); Modified: trunk/reactos/drivers/storage/ide/uniata/id_init.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_init.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_init.cpp [iso-8859-1] Wed Jan 28 22:20:09 2015 @@ -66,8 +66,11 @@ //ULONG RevID = deviceExtension->RevID; ULONG ChipType = deviceExtension->HwFlags & CHIPTYPE_MASK; ULONG ChipFlags= deviceExtension->HwFlags & CHIPFLAG_MASK; + ULONG i,n; KdPrint2((PRINT_PREFIX "UniataChipDetectChannels:\n" )); + + deviceExtension->AHCI_PI_mask = 0; if(ChipFlags & (UNIATA_SATA | UNIATA_AHCI)) { if(!deviceExtension->NumberChannels) { @@ -88,6 +91,21 @@ KdPrint2((PRINT_PREFIX "MasterDev -> 1 chan\n")); deviceExtension->NumberChannels = 1; } + for(n=0; n<deviceExtension->NumberChannels; n++) { + if(AtapiRegCheckDevValue(deviceExtension, n, DEVNUM_NOT_SPECIFIED, L"Exclude", 0)) { + KdPrint2((PRINT_PREFIX "Channel %d excluded\n", n)); + deviceExtension->AHCI_PI_mask &= ~((ULONG)1 << n); + } else { + deviceExtension->AHCI_PI_mask |= ((ULONG)1 << n); + } + } + KdPrint2((PRINT_PREFIX "PortMask %#x\n", deviceExtension->AHCI_PI_mask)); + deviceExtension->AHCI_PI_mask = + AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"PortMask", (ULONG)0xffffffff >> (32-deviceExtension->NumberChannels) ); + KdPrint2((PRINT_PREFIX "Force PortMask %#x\n", deviceExtension->AHCI_PI_mask)); + + for(i=deviceExtension->AHCI_PI_mask, n=0; i; n++, i=i>>1); + KdPrint2((PRINT_PREFIX "mask -> %d chans\n", n)); switch(VendorID) { case ATA_ACER_LABS_ID: @@ -271,6 +289,21 @@ } break; } // end switch(VendorID) + + i = AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"NumberChannels", n); + if(!i) { + i = n; + } + KdPrint2((PRINT_PREFIX "reg -> %d chans\n", n)); + + deviceExtension->NumberChannels = min(i, deviceExtension->NumberChannels); + if(!deviceExtension->NumberChannels) { + KdPrint2((PRINT_PREFIX "all channels blocked\n", n)); + return FALSE; + } + deviceExtension->AHCI_PI_mask &= (ULONG)0xffffffff >> (32-deviceExtension->NumberChannels); + KdPrint2((PRINT_PREFIX "Final PortMask %#x\n", deviceExtension->AHCI_PI_mask)); + return TRUE; } // end UniataChipDetectChannels() @@ -1542,7 +1575,18 @@ UCHAR reg, val, res; PCI_SLOT_NUMBER slotData; + PHW_CHANNEL chan; + ULONG c; // logical channel (for Compatible Mode controllers) + + c = channel - deviceExtension->Channel; // logical channel (for Compatible Mode controllers) + chan = &deviceExtension->chan[c]; + slotData.u.AsULONG = deviceExtension->slotNumber; + + if(deviceExtension->HwFlags & UNIATA_NO80CHK) { + KdPrint2((PRINT_PREFIX "UNIATA_NO80CHK\n")); + return TRUE; + } if(ChipType == HPT374 && slotData.u.bits.FunctionNumber == 1) { reg = channel ? 0x57 : 0x53; @@ -1557,6 +1601,10 @@ GetPciConfig1(0x5a, res); res = res & (channel ? 0x01 : 0x02); SetPciConfig1(reg, val); + if(chan->Force80pin) { + KdPrint2((PRINT_PREFIX "Force80pin\n")); + res = 0; + } KdPrint2((PRINT_PREFIX "hpt_cable80(%d) = %d\n", channel, !res)); return !res; } // end hpt_cable80() @@ -1637,6 +1685,11 @@ c = channel - deviceExtension->Channel; // logical channel (for Compatible Mode controllers) chan = &deviceExtension->chan[c]; + + if(chan->Force80pin) { + KdPrint2((PRINT_PREFIX "Force80pin\n")); + return TRUE; + } GetPciConfig1(pci_reg, tmp8); if(!(tmp8 & (1 << (channel << bit_offs)))) { @@ -1793,6 +1846,13 @@ KdPrint2((PRINT_PREFIX "MaxTransferMode (overriden): %#x\n", chan->MaxTransferMode)); chan->MaxTransferMode = tmp32; } + tmp32 = AtapiRegCheckDevValue(deviceExtension, c, DEVNUM_NOT_SPECIFIED, L"Force80pin", FALSE); + chan->Force80pin = tmp32 ? TRUE : FALSE; + if(chan->Force80pin) { + KdPrint2((PRINT_PREFIX "Force80pin on chip\n")); + deviceExtension->HwFlags |= UNIATA_NO80CHK; + } + //UniAtaReadLunConfig(deviceExtension, c, 0); //UniAtaReadLunConfig(deviceExtension, c, 1); } @@ -1823,6 +1883,12 @@ } tmp32 = AtapiRegCheckDevValue(deviceExtension, c, DEVNUM_NOT_SPECIFIED, L"ReorderEnable", TRUE); chan->UseReorder = tmp32 ? TRUE : FALSE; + + tmp32 = AtapiRegCheckDevValue(deviceExtension, c, DEVNUM_NOT_SPECIFIED, L"Force80pin", FALSE); + chan->Force80pin = tmp32 ? TRUE : FALSE; + if(chan->Force80pin) { + KdPrint2((PRINT_PREFIX "Force80pin on channel\n")); + } for(i=0; i<deviceExtension->NumberLuns; i++) { UniAtaReadLunConfig(deviceExtension, channel, i); @@ -2145,6 +2211,12 @@ chan = &deviceExtension->chan[c]; GetPciConfig2(0x54, reg54); KdPrint2((PRINT_PREFIX " intel 80-pin check (reg54=%x)\n", reg54)); + if(deviceExtension->HwFlags & UNIATA_NO80CHK) { + KdPrint2((PRINT_PREFIX " No check (administrative)\n")); + if(chan->Force80pin) { + KdPrint2((PRINT_PREFIX "Force80pin\n")); + } + } else if(reg54 == 0x0000 || reg54 == 0xffff) { KdPrint2((PRINT_PREFIX " check failed (not supported)\n")); } else Modified: trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp [iso-8859-1] Wed Jan 28 22:20:09 2015 @@ -1111,6 +1111,11 @@ if(MasterDev) { KdPrint2((PRINT_PREFIX "MasterDev (1)\n")); deviceExtension->MasterDev = TRUE; + KdPrint2((PRINT_PREFIX "Check exclude\n")); + if(AtapiRegCheckDevValue(deviceExtension, channel, DEVNUM_NOT_SPECIFIED, L"Exclude", 0)) { + KdPrint2((PRINT_PREFIX "Device excluded\n")); + goto exit_notfound; + } } status = UniataChipDetect(HwDeviceExtension, &pciData, i, ConfigInfo, &simplexOnly); Modified: trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] Wed Jan 28 22:20:09 2015 @@ -760,6 +760,9 @@ PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI); deviceExtension->AHCI_PI = PI; KdPrint2((PRINT_PREFIX " AHCI PI %#x\n", PI)); + KdPrint2((PRINT_PREFIX " AHCI PI mask %#x\n", deviceExtension->AHCI_PI_mask)); + deviceExtension->AHCI_PI = PI = PI & deviceExtension->AHCI_PI_mask; + KdPrint2((PRINT_PREFIX " masked AHCI PI %#x\n", PI)); CAP2 = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_CAP2); if(CAP2 & AHCI_CAP2_BOH) { @@ -975,8 +978,20 @@ * both CAP.NOP and PI. */ PI = UniataAhciReadHostPort4(deviceExtension, IDX_AHCI_PI); - deviceExtension->AHCI_PI = PI; + deviceExtension->AHCI_PI = deviceExtension->AHCI_PI_mask = PI; KdPrint2((PRINT_PREFIX " AHCI PI %#x\n", PI)); + + for(i=PI, n=0; i; n++, i=i>>1) { + if(AtapiRegCheckDevValue(deviceExtension, n, DEVNUM_NOT_SPECIFIED, L"Exclude", 0)) { + KdPrint2((PRINT_PREFIX "Channel %d excluded\n", n)); + deviceExtension->AHCI_PI &= ~((ULONG)1 << n); + deviceExtension->AHCI_PI_mask &= ~((ULONG)1 << n); + } + } + deviceExtension->AHCI_PI_mask = + AtapiRegCheckDevValue(deviceExtension, CHAN_NOT_SPECIFIED, DEVNUM_NOT_SPECIFIED, L"PortMask", deviceExtension->AHCI_PI_mask); + KdPrint2((PRINT_PREFIX "Force PortMask %#x\n", deviceExtension->AHCI_PI_mask)); + for(i=PI, n=0; i; n++, i=i>>1); NumberChannels = max((CAP & AHCI_CAP_NOP_MASK)+1, n); Modified: trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] Wed Jan 28 22:20:09 2015 @@ -1,10 +1,10 @@ -#define UNIATA_VER_STR "45c1" -#define UNIATA_VER_DOT 0.45.3.1 +#define UNIATA_VER_STR "45e" +#define UNIATA_VER_DOT 0.45.5.0 #define UNIATA_VER_MJ 0 #define UNIATA_VER_MN 45 -#define UNIATA_VER_SUB_MJ 2 -#define UNIATA_VER_SUB_MN 1 -#define UNIATA_VER_DOT_COMMA 0,45,3,1 -#define UNIATA_VER_DOT_STR "0.45.3.1" +#define UNIATA_VER_SUB_MJ 5 +#define UNIATA_VER_SUB_MN 0 +#define UNIATA_VER_DOT_COMMA 0,45,5,0 +#define UNIATA_VER_DOT_STR "0.45.5.0" #define UNIATA_VER_YEAR 2014 #define UNIATA_VER_YEAR_STR "2014"
9 years, 10 months
1
0
0
0
[pschweitzer] 66103: [FREELDR] Revert r66102
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Jan 28 21:03:18 2015 New Revision: 66103 URL:
http://svn.reactos.org/svn/reactos?rev=66103&view=rev
Log: [FREELDR] Revert r66102 Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] Wed Jan 28 21:03:18 2015 @@ -213,7 +213,7 @@ List[Index].MemoryType = MemoryType; DescriptCount++; -#ifdef DBG +#if DBG DbgDumpMemoryMap(List); #endif return DescriptCount;
9 years, 10 months
1
0
0
0
[pschweitzer] 66102: [FREELDR] Fix REL build
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Jan 28 20:52:38 2015 New Revision: 66102 URL:
http://svn.reactos.org/svn/reactos?rev=66102&view=rev
Log: [FREELDR] Fix REL build Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] Wed Jan 28 20:52:38 2015 @@ -34,7 +34,7 @@ ULONG BiosMemoryMapEntryCount; SIZE_T FrLdrImageSize; -#if DBG +#ifdef DBG typedef struct { TYPE_OF_MEMORY Type;
9 years, 10 months
1
0
0
0
[pschweitzer] 66101: [CDMAKE] It's totally pointless to nullify after calloc
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Jan 28 20:41:23 2015 New Revision: 66101 URL:
http://svn.reactos.org/svn/reactos?rev=66101&view=rev
Log: [CDMAKE] It's totally pointless to nullify after calloc Modified: trunk/reactos/tools/cdmake/dirhash.c Modified: trunk/reactos/tools/cdmake/dirhash.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Wed Jan 28 20:41:23 2015 @@ -137,8 +137,6 @@ free(parentcase); de = calloc(1, sizeof(*de)); - de->head = NULL; - de->child = NULL; de->parent = parent_de; de->normalized_name = strdup(targetnorm); de->case_name = strdup(chop_filename(casename));
9 years, 10 months
1
0
0
0
[hbelusca] 66100: [CDMAKE] - Fix misusage of the hash-table. CORE-9098 #resolve #comment Fixed in revision 66100! - Really fix date for files and directories when CDs are generated on Windows. Use ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Jan 28 20:26:56 2015 New Revision: 66100 URL:
http://svn.reactos.org/svn/reactos?rev=66100&view=rev
Log: [CDMAKE] - Fix misusage of the hash-table. CORE-9098 #resolve #comment Fixed in revision 66100! - Really fix date for files and directories when CDs are generated on Windows. Use UTC time everywhere. Simplify code. Modified: trunk/reactos/tools/cdmake/cdmake.c trunk/reactos/tools/cdmake/dirhash.c trunk/reactos/tools/cdmake/dirhash.h Modified: trunk/reactos/tools/cdmake/cdmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/cdmake.c?rev=…
============================================================================== --- trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] Wed Jan 28 20:26:56 2015 @@ -503,8 +503,7 @@ static void convert_date_and_time(PDATE_AND_TIME dt, time_t *time) { struct tm *timedef; - - timedef = localtime(time); + timedef = gmtime(time); dt->second = timedef->tm_sec; dt->minute = timedef->tm_min; @@ -1089,22 +1088,24 @@ #if _WIN32 static int -get_cd_file_time(HANDLE handle, DATE_AND_TIME *cd_time_info) +get_cd_file_time(HANDLE handle, PDATE_AND_TIME cd_time_info) { FILETIME file_time; SYSTEMTIME sys_time; + if (!GetFileTime(handle, NULL, NULL, &file_time)) - { return -1; - } + FileTimeToSystemTime(&file_time, &sys_time); memset(cd_time_info, 0, sizeof(*cd_time_info)); + cd_time_info->year = sys_time.wYear; - cd_time_info->month = sys_time.wMonth - 1; + cd_time_info->month = sys_time.wMonth; cd_time_info->day = sys_time.wDay; cd_time_info->hour = sys_time.wHour; cd_time_info->minute = sys_time.wMinute; cd_time_info->second = sys_time.wSecond; + return 0; } #endif @@ -1250,16 +1251,13 @@ static void get_time_string(char *str) { - struct tm *current; - time_t timestamp = time(NULL); - current = gmtime(×tamp); sprintf(str, "%04d%02d%02d%02d%02d%02d00", - current->tm_year + 1900, - current->tm_mon, - current->tm_mday, - current->tm_hour, - current->tm_min, - current->tm_sec); + root.date_and_time.year, + root.date_and_time.month, + root.date_and_time.day, + root.date_and_time.hour, + root.date_and_time.minute, + root.date_and_time.second); } static void pass(void) @@ -1676,7 +1674,6 @@ int main(int argc, char **argv) { - struct tm *current_time; time_t timestamp = time(NULL); BOOL q_option = FALSE; BOOL v_option = FALSE; @@ -1699,15 +1696,9 @@ error_exit("Insufficient memory"); memset(&root, 0, sizeof(root)); - current_time = gmtime(×tamp); root.level = 1; root.flags = DIRECTORY_FLAG; - root.date_and_time.year = current_time->tm_year + 1900; - root.date_and_time.month = current_time->tm_mon + 1; - root.date_and_time.day = current_time->tm_mday; - root.date_and_time.hour = current_time->tm_hour; - root.date_and_time.minute = current_time->tm_min; - root.date_and_time.second = current_time->tm_sec; + convert_date_and_time(&root.date_and_time, ×tamp); // initialize CD-ROM write buffer Modified: trunk/reactos/tools/cdmake/dirhash.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.c?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/dirhash.c [iso-8859-1] Wed Jan 28 20:26:56 2015 @@ -59,21 +59,19 @@ hashcode = djb_hash(norm); de = dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS]; while (de && strcmp(de->normalized_name, norm)) - de = de->next; + de = de->next_dir_hash_entry; return de; } static void -delete_entry_by_normname(struct target_dir_hash *dh, const char *norm) -{ - unsigned int hashcode; +delete_entry(struct target_dir_hash *dh, struct target_dir_entry *de) +{ struct target_dir_entry **ent; - hashcode = djb_hash(norm); - ent = &dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS]; - while (*ent && strcmp((*ent)->normalized_name, norm)) - ent = &(*ent)->next; + ent = &dh->buckets[de->hashcode % NUM_DIR_HASH_BUCKETS]; + while (*ent && ((*ent) != de)) + ent = &(*ent)->next_dir_hash_entry; if (*ent) - *ent = (*ent)->next; + *ent = (*ent)->next_dir_hash_entry; } void normalize_dirname(char *filename) @@ -115,41 +113,47 @@ struct target_dir_entry * dir_hash_create_dir(struct target_dir_hash *dh, const char *casename, const char *targetnorm) { - unsigned int hashcode; struct target_dir_entry *de, *parent_de; char *parentname = NULL; char *parentcase = NULL; struct target_dir_entry **ent; + if (!dh->root.normalized_name) { dh->root.normalized_name = strdup(""); dh->root.case_name = strdup(""); - hashcode = djb_hash(""); - dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS] = &dh->root; - } + dh->root.hashcode = djb_hash(""); + dh->buckets[dh->root.hashcode % NUM_DIR_HASH_BUCKETS] = &dh->root; + } + de = get_entry_by_normname(dh, targetnorm); if (de) return de; + chop_dirname(targetnorm, &parentname); chop_dirname(casename, &parentcase); parent_de = dir_hash_create_dir(dh, parentcase, parentname); free(parentname); free(parentcase); - hashcode = djb_hash(targetnorm); + de = calloc(1, sizeof(*de)); - de->parent = parent_de; de->head = NULL; de->child = NULL; + de->parent = parent_de; de->normalized_name = strdup(targetnorm); de->case_name = strdup(chop_filename(casename)); + de->hashcode = djb_hash(targetnorm); + de->next = parent_de->child; parent_de->child = de; - ent = &dh->buckets[hashcode % NUM_DIR_HASH_BUCKETS]; + + ent = &dh->buckets[de->hashcode % NUM_DIR_HASH_BUCKETS]; while (*ent) { - ent = &(*ent)->next; + ent = &(*ent)->next_dir_hash_entry; } *ent = de; + return de; } @@ -159,12 +163,14 @@ struct target_dir_entry *de; char *targetdir = NULL; char *targetnorm; + chop_dirname(target, &targetdir); targetnorm = strdup(targetdir); normalize_dirname(targetnorm); de = dir_hash_create_dir(dh, targetdir, targetnorm); free(targetnorm); free(targetdir); + tf = calloc(1, sizeof(*tf)); tf->next = de->head; de->head = tf; @@ -172,44 +178,12 @@ tf->target_name = strdup(chop_filename(target)); } -#if 0 -static struct target_dir_entry * -dir_hash_next_dir(struct target_dir_hash *dh, struct target_dir_traversal *t) -{ - if (t->i == -1) - return NULL; - if (!t->it) - { - while (++t->i != NUM_DIR_HASH_BUCKETS) - { - if (dh->buckets[t->i]) - { - t->it = dh->buckets[t->i]; - return t->it; - } - } - t->i = -1; - return NULL; - } - else - { - t->it = t->it->next; - if (!t->it) - { - t->i = -1; - return NULL; - } - else - return t->it; - } -} -#endif - static void dir_hash_destroy_dir(struct target_dir_hash *dh, struct target_dir_entry *de) { struct target_file *tf; struct target_dir_entry *te; + while ((te = de->child)) { de->child = te->next; @@ -223,8 +197,8 @@ free(tf->target_name); free(tf); } - if (de->normalized_name) - delete_entry_by_normname(dh, de->normalized_name); + + delete_entry(dh, de); free(de->normalized_name); free(de->case_name); } Modified: trunk/reactos/tools/cdmake/dirhash.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/dirhash.h?rev…
============================================================================== --- trunk/reactos/tools/cdmake/dirhash.h [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/dirhash.h [iso-8859-1] Wed Jan 28 20:26:56 2015 @@ -12,6 +12,9 @@ struct target_dir_entry { + unsigned int hashcode; + struct target_dir_entry *next_dir_hash_entry; + struct target_dir_entry *next; struct target_dir_entry *parent; struct target_dir_entry *child; @@ -26,14 +29,6 @@ struct target_dir_entry root; }; -#if 0 -struct target_dir_traversal -{ - struct target_dir_entry *it; - int i; -}; -#endif - void normalize_dirname(char *filename); void dir_hash_add_file(struct target_dir_hash *dh, const char *source, const char *target); struct target_dir_entry *
9 years, 10 months
1
0
0
0
[tkreuzer] 66099: [FREELDR] Increase number of static memory descriptors from 32 to 40. CORE-9097 #resolve #comment Please retest and reopen if it's still not fixed.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Jan 27 22:19:25 2015 New Revision: 66099 URL:
http://svn.reactos.org/svn/reactos?rev=66099&view=rev
Log: [FREELDR] Increase number of static memory descriptors from 32 to 40. CORE-9097 #resolve #comment Please retest and reopen if it's still not fixed. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] Tue Jan 27 22:19:25 2015 @@ -27,7 +27,7 @@ DBG_DEFAULT_CHANNEL(MEMORY); -#define MAX_BIOS_DESCRIPTORS 32 +#define MAX_BIOS_DESCRIPTORS 40 BIOS_MEMORY_MAP PcBiosMemoryMap[MAX_BIOS_DESCRIPTORS]; ULONG PcBiosMapCount;
9 years, 11 months
1
0
0
0
[hbelusca] 66098: [CDMAKE]: Whitespace fixes only.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 27 19:31:19 2015 New Revision: 66098 URL:
http://svn.reactos.org/svn/reactos?rev=66098&view=rev
Log: [CDMAKE]: Whitespace fixes only. Modified: trunk/reactos/tools/cdmake/cdmake.c Modified: trunk/reactos/tools/cdmake/cdmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/cdmake.c?rev=…
============================================================================== --- trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/cdmake.c [iso-8859-1] Tue Jan 27 19:31:19 2015 @@ -781,24 +781,24 @@ { do { - if ((f.attrib & (_A_HIDDEN | _A_SUBDIR)) == 0 && f.name[0] != '.') - { - if (strcmp(f.name, DIRECTORY_TIMESTAMP) == 0) - { - convert_date_and_time(&d->date_and_time, &f.time_write); - } - else - { - if (verbosity == VERBOSE) - { - old_end_source = end_source; - strcpy(end_source, f.name); - printf("%d: file %s\n", d->level, source); - end_source = old_end_source; - } - (void) new_directory_record(&f, d); - } - } + if ((f.attrib & (_A_HIDDEN | _A_SUBDIR)) == 0 && f.name[0] != '.') + { + if (strcmp(f.name, DIRECTORY_TIMESTAMP) == 0) + { + convert_date_and_time(&d->date_and_time, &f.time_write); + } + else + { + if (verbosity == VERBOSE) + { + old_end_source = end_source; + strcpy(end_source, f.name); + printf("%d: file %s\n", d->level, source); + end_source = old_end_source; + } + (void) new_directory_record(&f, d); + } + } } while (_findnext(findhandle, &f) == 0); @@ -809,40 +809,40 @@ findhandle= _findfirst(source, &f); if (findhandle) { - do - { - if (f.attrib & _A_SUBDIR && f.name[0] != '.') - { - old_end_source = end_source; - append_string_to_source(f.name); - *end_source++ = DIR_SEPARATOR_CHAR; - if (verbosity == VERBOSE) - { - *end_source = 0; - printf("%d: directory %s\n", d->level + 1, source); - } - if (d->level < MAX_LEVEL) - { - new_d = new_directory_record(&f, d); - new_d->next_in_path_table = root.next_in_path_table; - root.next_in_path_table = new_d; - new_d->level = d->level + 1; - make_directory_records(new_d); - } - else - { - error_exit("Directory is nested too deep"); - } - end_source = old_end_source; - } - } - while (_findnext(findhandle, &f) == 0); + do + { + if (f.attrib & _A_SUBDIR && f.name[0] != '.') + { + old_end_source = end_source; + append_string_to_source(f.name); + *end_source++ = DIR_SEPARATOR_CHAR; + if (verbosity == VERBOSE) + { + *end_source = 0; + printf("%d: directory %s\n", d->level + 1, source); + } + if (d->level < MAX_LEVEL) + { + new_d = new_directory_record(&f, d); + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + new_d->level = d->level + 1; + make_directory_records(new_d); + } + else + { + error_exit("Directory is nested too deep"); + } + end_source = old_end_source; + } + } + while (_findnext(findhandle, &f) == 0); _findclose(findhandle); } - // sort directory - d->first_record = sort_linked_list(d->first_record, 0, compare_directory_order); + // sort directory + d->first_record = sort_linked_list(d->first_record, 0, compare_directory_order); } #else @@ -905,163 +905,163 @@ } (void) new_directory_record(entry, &stbuf, d); } - } - } - closedir(dirp); - } - else - { - error_exit("Can't open %s\n", source); - return; - } - - dirp = opendir(source); - if (dirp != NULL) - { - while ((entry = readdir(dirp)) != NULL) - { - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) - continue; // skip self and parent - - if (entry->d_type == DT_DIR) // directory - { - old_end_source = end_source; - append_string_to_source(entry->d_name); - *end_source++ = DIR_SEPARATOR_CHAR; - *end_source = 0; - if (verbosity == VERBOSE) - { - printf("%d: directory %s\n", d->level + 1, source); - } - if (d->level < MAX_LEVEL) - { - // Check for an absolute path - if (source[0] == DIR_SEPARATOR_CHAR) + } + } + closedir(dirp); + } + else + { + error_exit("Can't open %s\n", source); + return; + } + + dirp = opendir(source); + if (dirp != NULL) + { + while ((entry = readdir(dirp)) != NULL) + { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; // skip self and parent + + if (entry->d_type == DT_DIR) // directory + { + old_end_source = end_source; + append_string_to_source(entry->d_name); + *end_source++ = DIR_SEPARATOR_CHAR; + *end_source = 0; + if (verbosity == VERBOSE) + { + printf("%d: directory %s\n", d->level + 1, source); + } + if (d->level < MAX_LEVEL) + { + // Check for an absolute path + if (source[0] == DIR_SEPARATOR_CHAR) { - strcpy(buf, source); + strcpy(buf, source); } - else + else { - if (!getcwd(buf, sizeof(buf))) - error_exit("Can't get CWD: %s\n", strerror(errno)); - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, source); + if (!getcwd(buf, sizeof(buf))) + error_exit("Can't get CWD: %s\n", strerror(errno)); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, source); } - if (stat(buf, &stbuf) == -1) + if (stat(buf, &stbuf) == -1) { - error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); - return; + error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); + return; } - new_d = new_directory_record(entry, &stbuf, d); - new_d->next_in_path_table = root.next_in_path_table; - root.next_in_path_table = new_d; - new_d->level = d->level + 1; - make_directory_records(new_d); - } - else - { - error_exit("Directory is nested too deep"); - } - end_source = old_end_source; - *end_source = 0; - } - } - closedir(dirp); - } - else - { - error_exit("Can't open %s\n", source); - return; + new_d = new_directory_record(entry, &stbuf, d); + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + new_d->level = d->level + 1; + make_directory_records(new_d); + } + else + { + error_exit("Directory is nested too deep"); + } + end_source = old_end_source; + *end_source = 0; + } + } + closedir(dirp); + } + else + { + error_exit("Can't open %s\n", source); + return; } #else - dirp = opendir(source); - if (dirp != NULL) - { - while ((entry = readdir(dirp)) != NULL) - { - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) - continue; // skip self and parent - - // Check for an absolute path - if (source[0] == DIR_SEPARATOR_CHAR) - { - strcpy(buf, source); - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, entry->d_name); - } - else - { - if (!getcwd(buf, sizeof(buf))) - error_exit("Can't get CWD: %s\n", strerror(errno)); - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, source); - strcat(buf, entry->d_name); - } - - if (stat(buf, &stbuf) == -1) - { - error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); - return; - } - - if (S_ISDIR(stbuf.st_mode)) - { - old_end_source = end_source; - append_string_to_source(entry->d_name); - *end_source++ = DIR_SEPARATOR_CHAR; - *end_source = 0; - if (verbosity == VERBOSE) - { - printf("%d: directory %s\n", d->level + 1, source); - } - - if (d->level < MAX_LEVEL) - { - new_d = new_directory_record(entry, &stbuf, d); - new_d->next_in_path_table = root.next_in_path_table; - root.next_in_path_table = new_d; - new_d->level = d->level + 1; - make_directory_records(new_d); - } - else - { - error_exit("Directory is nested too deep"); - } - - end_source = old_end_source; - *end_source = 0; - } - else if (S_ISREG(stbuf.st_mode)) - { - if (strcmp(entry->d_name, DIRECTORY_TIMESTAMP) == 0) - { - convert_date_and_time(&d->date_and_time, &stbuf.st_ctime); - } - else - { - if (verbosity == VERBOSE) - { - printf("%d: file %s\n", d->level, buf); - } - (void) new_directory_record(entry, &stbuf, d); - } - } - } - closedir(dirp); - } - else - { - error_exit("Can't open %s\n", source); - return; + dirp = opendir(source); + if (dirp != NULL) + { + while ((entry = readdir(dirp)) != NULL) + { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) + continue; // skip self and parent + + // Check for an absolute path + if (source[0] == DIR_SEPARATOR_CHAR) + { + strcpy(buf, source); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, entry->d_name); + } + else + { + if (!getcwd(buf, sizeof(buf))) + error_exit("Can't get CWD: %s\n", strerror(errno)); + strcat(buf, DIR_SEPARATOR_STRING); + strcat(buf, source); + strcat(buf, entry->d_name); + } + + if (stat(buf, &stbuf) == -1) + { + error_exit("Can't access '%s' (%s)\n", buf, strerror(errno)); + return; + } + + if (S_ISDIR(stbuf.st_mode)) + { + old_end_source = end_source; + append_string_to_source(entry->d_name); + *end_source++ = DIR_SEPARATOR_CHAR; + *end_source = 0; + if (verbosity == VERBOSE) + { + printf("%d: directory %s\n", d->level + 1, source); + } + + if (d->level < MAX_LEVEL) + { + new_d = new_directory_record(entry, &stbuf, d); + new_d->next_in_path_table = root.next_in_path_table; + root.next_in_path_table = new_d; + new_d->level = d->level + 1; + make_directory_records(new_d); + } + else + { + error_exit("Directory is nested too deep"); + } + + end_source = old_end_source; + *end_source = 0; + } + else if (S_ISREG(stbuf.st_mode)) + { + if (strcmp(entry->d_name, DIRECTORY_TIMESTAMP) == 0) + { + convert_date_and_time(&d->date_and_time, &stbuf.st_ctime); + } + else + { + if (verbosity == VERBOSE) + { + printf("%d: file %s\n", d->level, buf); + } + (void) new_directory_record(entry, &stbuf, d); + } + } + } + closedir(dirp); + } + else + { + error_exit("Can't open %s\n", source); + return; } #endif - // sort directory - d->first_record = sort_linked_list(d->first_record, 0, compare_directory_order); + // sort directory + d->first_record = sort_linked_list(d->first_record, 0, compare_directory_order); } #endif @@ -1264,110 +1264,51 @@ static void pass(void) { - PDIR_RECORD d; - PDIR_RECORD q; - unsigned int i; - char *t; - unsigned int index; - unsigned int name_length; - DWORD size; - DWORD number_of_sectors; - char *old_end_source; - int n; - FILE *file; - char timestring[17]; - - get_time_string(timestring); - - // first 16 sectors are zeros - - write_block(16 * SECTOR_SIZE, 0); - - // Primary Volume Descriptor - - write_string("\1CD001\1"); - write_byte(0); - write_block(32, ' '); // system identifier - - t = volume_label; - for (i = 0; i < 32; i++) - write_byte( (BYTE)( (*t != 0) ? toupper(*t++) : ' ' ) ); - - write_block(8, 0); - write_both_endian_dword(total_sectors); - write_block(32, 0); - write_both_endian_word((WORD) 1); // volume set size - write_both_endian_word((WORD) 1); // volume sequence number - write_both_endian_word((WORD) 2048); // sector size - write_both_endian_dword(path_table_size); - write_little_endian_dword(little_endian_path_table_sector); - write_little_endian_dword((DWORD) 0); // second little endian path table - write_big_endian_dword(big_endian_path_table_sector); - write_big_endian_dword((DWORD) 0); // second big endian path table - write_directory_record(&root, DOT_RECORD, FALSE); - write_block(128, ' '); // volume set identifier - write_block(128, ' '); // publisher identifier - write_block(128, ' '); // data preparer identifier - write_block(128, ' '); // application identifier - write_block(37, ' '); // copyright file identifier - write_block(37, ' '); // abstract file identifier - write_block(37, ' '); // bibliographic file identifier - write_string(timestring); // volume creation - write_byte(0); - write_string(timestring); // most recent modification - write_byte(0); - write_string("0000000000000000"); // volume expires - write_byte(0); - write_string("0000000000000000"); // volume is effective - write_byte(0); - write_byte(1); - write_byte(0); - fill_sector(); - - - // Boot Volume Descriptor - - if (eltorito) - { - write_byte(0); - write_string("CD001\1"); - write_string("EL TORITO SPECIFICATION"); // identifier - write_block(9, 0); // padding - write_block(32, 0); // unused - write_little_endian_dword(boot_catalog_sector); // pointer to boot catalog - fill_sector(); - } - - // Supplementary Volume Descriptor - - if (joliet) - { - write_string("\2CD001\1"); + PDIR_RECORD d; + PDIR_RECORD q; + unsigned int i; + char *t; + unsigned int index; + unsigned int name_length; + DWORD size; + DWORD number_of_sectors; + char *old_end_source; + int n; + FILE *file; + char timestring[17]; + + get_time_string(timestring); + + // first 16 sectors are zeros + + write_block(16 * SECTOR_SIZE, 0); + + // Primary Volume Descriptor + + write_string("\1CD001\1"); write_byte(0); - - write_word_block(16, L' '); // system identifier + write_block(32, ' '); // system identifier t = volume_label; - for (i = 0; i < 16; i++) - write_big_endian_word( (BYTE)( (*t != 0) ? *t++ : ' ' ) ); + for (i = 0; i < 32; i++) + write_byte( (BYTE)( (*t != 0) ? toupper(*t++) : ' ' ) ); write_block(8, 0); write_both_endian_dword(total_sectors); - write_string("%/E"); - write_block(29, 0); + write_block(32, 0); write_both_endian_word((WORD) 1); // volume set size write_both_endian_word((WORD) 1); // volume sequence number write_both_endian_word((WORD) 2048); // sector size - write_both_endian_dword(joliet_path_table_size); - write_little_endian_dword(joliet_little_endian_path_table_sector); + write_both_endian_dword(path_table_size); + write_little_endian_dword(little_endian_path_table_sector); write_little_endian_dword((DWORD) 0); // second little endian path table - write_big_endian_dword(joliet_big_endian_path_table_sector); + write_big_endian_dword(big_endian_path_table_sector); write_big_endian_dword((DWORD) 0); // second big endian path table - write_directory_record(&root, DOT_RECORD, TRUE); - write_word_block(64, ' '); // volume set identifier - write_word_block(64, ' '); // publisher identifier - write_word_block(64, ' '); // data preparer identifier - write_word_block(64, ' '); // application identifier + write_directory_record(&root, DOT_RECORD, FALSE); + write_block(128, ' '); // volume set identifier + write_block(128, ' '); // publisher identifier + write_block(128, ' '); // data preparer identifier + write_block(128, ' '); // application identifier write_block(37, ' '); // copyright file identifier write_block(37, ' '); // abstract file identifier write_block(37, ' '); // bibliographic file identifier @@ -1382,293 +1323,352 @@ write_byte(1); write_byte(0); fill_sector(); - } - - - // Volume Descriptor Set Terminator - write_string("\377CD001\1"); - fill_sector(); - - // Boot Catalog - if (eltorito) - { - boot_catalog_sector = cd.sector; - - // Validation entry - write_byte(1); - write_byte(0); // x86 boot code - write_little_endian_word(0); // reserved - write_string("ReactOS Foundation"); - write_block(6, 0); // padding - write_little_endian_word(0x62E); // checksum - write_little_endian_word(0xAA55); // signature - - // default entry - write_byte(0x88); // bootable - write_byte(0); // no emulation - write_big_endian_word(0); // load segment = default (0x07c0) - write_byte(0); // partition type - write_byte(0); // unused - write_little_endian_word(boot_image_size); // sector count - write_little_endian_dword(boot_image_sector); // sector - - fill_sector(); - } - - // Boot Image - if (eltorito) - { - boot_image_sector = cd.sector; - - file = fopen(bootimage, "rb"); - if (file == NULL) - error_exit("Can't open %s\n", bootimage); - fseek(file, 0, SEEK_END); - size = ftell(file); - fseek(file, 0, SEEK_SET); - if (size == 0 || (size % 2048)) - { + + + // Boot Volume Descriptor + + if (eltorito) + { + write_byte(0); + write_string("CD001\1"); + write_string("EL TORITO SPECIFICATION"); // identifier + write_block(9, 0); // padding + write_block(32, 0); // unused + write_little_endian_dword(boot_catalog_sector); // pointer to boot catalog + fill_sector(); + } + + // Supplementary Volume Descriptor + + if (joliet) + { + write_string("\2CD001\1"); + write_byte(0); + + write_word_block(16, L' '); // system identifier + + t = volume_label; + for (i = 0; i < 16; i++) + write_big_endian_word( (BYTE)( (*t != 0) ? *t++ : ' ' ) ); + + write_block(8, 0); + write_both_endian_dword(total_sectors); + write_string("%/E"); + write_block(29, 0); + write_both_endian_word((WORD) 1); // volume set size + write_both_endian_word((WORD) 1); // volume sequence number + write_both_endian_word((WORD) 2048); // sector size + write_both_endian_dword(joliet_path_table_size); + write_little_endian_dword(joliet_little_endian_path_table_sector); + write_little_endian_dword((DWORD) 0); // second little endian path table + write_big_endian_dword(joliet_big_endian_path_table_sector); + write_big_endian_dword((DWORD) 0); // second big endian path table + write_directory_record(&root, DOT_RECORD, TRUE); + write_word_block(64, ' '); // volume set identifier + write_word_block(64, ' '); // publisher identifier + write_word_block(64, ' '); // data preparer identifier + write_word_block(64, ' '); // application identifier + write_block(37, ' '); // copyright file identifier + write_block(37, ' '); // abstract file identifier + write_block(37, ' '); // bibliographic file identifier + write_string(timestring); // volume creation + write_byte(0); + write_string(timestring); // most recent modification + write_byte(0); + write_string("0000000000000000"); // volume expires + write_byte(0); + write_string("0000000000000000"); // volume is effective + write_byte(0); + write_byte(1); + write_byte(0); + fill_sector(); + } + + + // Volume Descriptor Set Terminator + write_string("\377CD001\1"); + fill_sector(); + + // Boot Catalog + if (eltorito) + { + boot_catalog_sector = cd.sector; + + // Validation entry + write_byte(1); + write_byte(0); // x86 boot code + write_little_endian_word(0); // reserved + write_string("ReactOS Foundation"); + write_block(6, 0); // padding + write_little_endian_word(0x62E); // checksum + write_little_endian_word(0xAA55); // signature + + // default entry + write_byte(0x88); // bootable + write_byte(0); // no emulation + write_big_endian_word(0); // load segment = default (0x07c0) + write_byte(0); // partition type + write_byte(0); // unused + write_little_endian_word(boot_image_size); // sector count + write_little_endian_dword(boot_image_sector); // sector + + fill_sector(); + } + + // Boot Image + if (eltorito) + { + boot_image_sector = cd.sector; + + file = fopen(bootimage, "rb"); + if (file == NULL) + error_exit("Can't open %s\n", bootimage); + fseek(file, 0, SEEK_END); + size = ftell(file); + fseek(file, 0, SEEK_SET); + if (size == 0 || (size % 2048)) + { + fclose(file); + error_exit("Invalid boot image size (%lu bytes)\n", size); + } + boot_image_size = size / 512; + while (size > 0) + { + n = BUFFER_SIZE - cd.count; + if ((DWORD) n > size) + n = size; + if (fread(cd.buffer + cd.count, n, 1, file) < 1) + { + fclose(file); + error_exit("Read error in file %s\n", bootimage); + } + cd.count += n; + if (cd.count == BUFFER_SIZE) + flush_buffer(); + cd.sector += n / SECTOR_SIZE; + cd.offset += n % SECTOR_SIZE; + size -= n; + } fclose(file); - error_exit("Invalid boot image size (%lu bytes)\n", size); - } - boot_image_size = size / 512; - while (size > 0) - { - n = BUFFER_SIZE - cd.count; - if ((DWORD) n > size) - n = size; - if (fread(cd.buffer + cd.count, n, 1, file) < 1) - { - fclose(file); - error_exit("Read error in file %s\n", bootimage); - } - cd.count += n; - if (cd.count == BUFFER_SIZE) - flush_buffer(); - cd.sector += n / SECTOR_SIZE; - cd.offset += n % SECTOR_SIZE; - size -= n; - } - fclose(file); // fill_sector(); } - // Little Endian Path Table - little_endian_path_table_sector = cd.sector; - write_byte(1); - write_byte(0); // number of sectors in extended attribute record - write_little_endian_dword(root.sector); - write_little_endian_word((WORD) 1); - write_byte(0); - write_byte(0); - - index = 1; - root.path_table_index = 1; - for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) - { - name_length = strlen(d->name_on_cd); - write_byte((BYTE)name_length); - write_byte(0); // number of sectors in extended attribute record - write_little_endian_dword(d->sector); - write_little_endian_word(d->parent->path_table_index); - write_string(d->name_on_cd); - if (name_length & 1) - write_byte(0); - d->path_table_index = ++index; - } - - path_table_size = (cd.sector - little_endian_path_table_sector) * - SECTOR_SIZE + cd.offset; - fill_sector(); - - // Big Endian Path Table - - big_endian_path_table_sector = cd.sector; - write_byte(1); - write_byte(0); // number of sectors in extended attribute record - write_big_endian_dword(root.sector); - write_big_endian_word((WORD) 1); - write_byte(0); - write_byte(0); - - for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) - { - name_length = strlen(d->name_on_cd); - write_byte((BYTE)name_length); - write_byte(0); // number of sectors in extended attribute record - write_big_endian_dword(d->sector); - write_big_endian_word(d->parent->path_table_index); - write_string(d->name_on_cd); - if (name_length & 1) - write_byte(0); - } - fill_sector(); - - if (joliet) - { // Little Endian Path Table - - joliet_little_endian_path_table_sector = cd.sector; + little_endian_path_table_sector = cd.sector; write_byte(1); write_byte(0); // number of sectors in extended attribute record - write_little_endian_dword(root.joliet_sector); + write_little_endian_dword(root.sector); write_little_endian_word((WORD) 1); write_byte(0); write_byte(0); + index = 1; + root.path_table_index = 1; for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) - { - name_length = strlen(d->joliet_name) * 2; + { + name_length = strlen(d->name_on_cd); write_byte((BYTE)name_length); write_byte(0); // number of sectors in extended attribute record - write_little_endian_dword(d->joliet_sector); + write_little_endian_dword(d->sector); write_little_endian_word(d->parent->path_table_index); - write_string_as_big_endian_unicode(d->joliet_name); - } - - joliet_path_table_size = (cd.sector - joliet_little_endian_path_table_sector) * - SECTOR_SIZE + cd.offset; + write_string(d->name_on_cd); + if (name_length & 1) + write_byte(0); + d->path_table_index = ++index; + } + + path_table_size = (cd.sector - little_endian_path_table_sector) * + SECTOR_SIZE + cd.offset; fill_sector(); // Big Endian Path Table - joliet_big_endian_path_table_sector = cd.sector; + big_endian_path_table_sector = cd.sector; write_byte(1); write_byte(0); // number of sectors in extended attribute record - write_big_endian_dword(root.joliet_sector); + write_big_endian_dword(root.sector); write_big_endian_word((WORD) 1); write_byte(0); write_byte(0); for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) - { - name_length = strlen(d->joliet_name) * 2; + { + name_length = strlen(d->name_on_cd); write_byte((BYTE)name_length); write_byte(0); // number of sectors in extended attribute record - write_big_endian_dword(d->joliet_sector); + write_big_endian_dword(d->sector); write_big_endian_word(d->parent->path_table_index); - write_string_as_big_endian_unicode(d->joliet_name); - } + write_string(d->name_on_cd); + if (name_length & 1) + write_byte(0); + } fill_sector(); - } - - // directories and files - for (d = &root; d != NULL; d = d->next_in_path_table) - { - // write directory - d->sector = cd.sector; - write_directory_record(d, DOT_RECORD, FALSE); - write_directory_record(d == &root ? d : d->parent, DOT_DOT_RECORD, FALSE); - for (q = d->first_record; q != NULL; q = q->next_in_directory) - { - write_directory_record(q, - q->flags & DIRECTORY_FLAG ? SUBDIRECTORY_RECORD : FILE_RECORD, - FALSE); - } - fill_sector(); - d->size = (cd.sector - d->sector) * SECTOR_SIZE; - - // write directory for joliet - if (joliet) - { - d->joliet_sector = cd.sector; - write_directory_record(d, DOT_RECORD, TRUE); - write_directory_record(d == &root ? d : d->parent, DOT_DOT_RECORD, TRUE); + + if (joliet) + { + // Little Endian Path Table + + joliet_little_endian_path_table_sector = cd.sector; + write_byte(1); + write_byte(0); // number of sectors in extended attribute record + write_little_endian_dword(root.joliet_sector); + write_little_endian_word((WORD) 1); + write_byte(0); + write_byte(0); + + for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) + { + name_length = strlen(d->joliet_name) * 2; + write_byte((BYTE)name_length); + write_byte(0); // number of sectors in extended attribute record + write_little_endian_dword(d->joliet_sector); + write_little_endian_word(d->parent->path_table_index); + write_string_as_big_endian_unicode(d->joliet_name); + } + + joliet_path_table_size = (cd.sector - joliet_little_endian_path_table_sector) * + SECTOR_SIZE + cd.offset; + fill_sector(); + + // Big Endian Path Table + + joliet_big_endian_path_table_sector = cd.sector; + write_byte(1); + write_byte(0); // number of sectors in extended attribute record + write_big_endian_dword(root.joliet_sector); + write_big_endian_word((WORD) 1); + write_byte(0); + write_byte(0); + + for (d = root.next_in_path_table; d != NULL; d = d->next_in_path_table) + { + name_length = strlen(d->joliet_name) * 2; + write_byte((BYTE)name_length); + write_byte(0); // number of sectors in extended attribute record + write_big_endian_dword(d->joliet_sector); + write_big_endian_word(d->parent->path_table_index); + write_string_as_big_endian_unicode(d->joliet_name); + } + fill_sector(); + } + + // directories and files + for (d = &root; d != NULL; d = d->next_in_path_table) + { + // write directory + d->sector = cd.sector; + write_directory_record(d, DOT_RECORD, FALSE); + write_directory_record(d == &root ? d : d->parent, DOT_DOT_RECORD, FALSE); for (q = d->first_record; q != NULL; q = q->next_in_directory) - { + { write_directory_record(q, q->flags & DIRECTORY_FLAG ? SUBDIRECTORY_RECORD : FILE_RECORD, - TRUE); - } + FALSE); + } fill_sector(); - d->joliet_size = (cd.sector - d->joliet_sector) * SECTOR_SIZE; - bytes_in_directories += d->joliet_size; - } - - number_of_directories++; - bytes_in_directories += d->size; - - // write file data - for (q = d->first_record; q != NULL; q = q->next_in_directory) - { - if ((q->flags & DIRECTORY_FLAG) == 0) - { - q->sector = q->joliet_sector = cd.sector; - size = q->size; - if (cd.file == NULL) - { - number_of_sectors = (size + SECTOR_SIZE - 1) / SECTOR_SIZE; - cd.sector += number_of_sectors; - number_of_files++; - bytes_in_files += size; - unused_bytes_at_ends_of_files += - number_of_sectors * SECTOR_SIZE - size; - } - else - { - const char *file_source; - old_end_source = end_source; - if (!q->orig_name) - { - get_file_specifications(q); - *end_source = 0; - file_source = source; - } - else - { - file_source = q->orig_name; - } - if (verbosity == VERBOSE) - printf("Writing contents of %s\n", file_source); - file = fopen(file_source, "rb"); - if (file == NULL) - error_exit("Can't open %s\n", file_source); - fseek(file, 0, SEEK_SET); - while (size > 0) - { - n = BUFFER_SIZE - cd.count; - if ((DWORD) n > size) - n = size; - if (fread(cd.buffer + cd.count, n, 1, file) < 1) - { - fclose(file); - error_exit("Read error in file %s\n", file_source); - } - cd.count += n; - if (cd.count == BUFFER_SIZE) - flush_buffer(); - cd.sector += n / SECTOR_SIZE; - cd.offset += n % SECTOR_SIZE; - size -= n; - } - fclose(file); - end_source = old_end_source; + d->size = (cd.sector - d->sector) * SECTOR_SIZE; + + // write directory for joliet + if (joliet) + { + d->joliet_sector = cd.sector; + write_directory_record(d, DOT_RECORD, TRUE); + write_directory_record(d == &root ? d : d->parent, DOT_DOT_RECORD, TRUE); + for (q = d->first_record; q != NULL; q = q->next_in_directory) + { + write_directory_record(q, + q->flags & DIRECTORY_FLAG ? SUBDIRECTORY_RECORD : FILE_RECORD, + TRUE); + } fill_sector(); - } - } - } - } - - total_sectors = (DWORD)cd.sector; + d->joliet_size = (cd.sector - d->joliet_sector) * SECTOR_SIZE; + bytes_in_directories += d->joliet_size; + } + + number_of_directories++; + bytes_in_directories += d->size; + + // write file data + for (q = d->first_record; q != NULL; q = q->next_in_directory) + { + if ((q->flags & DIRECTORY_FLAG) == 0) + { + q->sector = q->joliet_sector = cd.sector; + size = q->size; + if (cd.file == NULL) + { + number_of_sectors = (size + SECTOR_SIZE - 1) / SECTOR_SIZE; + cd.sector += number_of_sectors; + number_of_files++; + bytes_in_files += size; + unused_bytes_at_ends_of_files += + number_of_sectors * SECTOR_SIZE - size; + } + else + { + const char *file_source; + old_end_source = end_source; + if (!q->orig_name) + { + get_file_specifications(q); + *end_source = 0; + file_source = source; + } + else + { + file_source = q->orig_name; + } + if (verbosity == VERBOSE) + printf("Writing contents of %s\n", file_source); + file = fopen(file_source, "rb"); + if (file == NULL) + error_exit("Can't open %s\n", file_source); + fseek(file, 0, SEEK_SET); + while (size > 0) + { + n = BUFFER_SIZE - cd.count; + if ((DWORD) n > size) + n = size; + if (fread(cd.buffer + cd.count, n, 1, file) < 1) + { + fclose(file); + error_exit("Read error in file %s\n", file_source); + } + cd.count += n; + if (cd.count == BUFFER_SIZE) + flush_buffer(); + cd.sector += n / SECTOR_SIZE; + cd.offset += n % SECTOR_SIZE; + size -= n; + } + fclose(file); + end_source = old_end_source; + fill_sector(); + } + } + } + } + + total_sectors = (DWORD)cd.sector; } static char HELP[] = - "CDMAKE [-q] [-v] [-p] [-s N] [-m] [-b bootimage] [-j] source volume image\n" - "\n" - " source specifications of base directory containing all files to\n" - " be written to CD-ROM image\n" - " volume volume label\n" - " image image file or device\n" - " -q quiet mode - display nothing but error messages\n" - " -v verbose mode - display file information as files are\n" - " scanned and written - overrides -p option\n" - " -p show progress while writing\n" - " -s N abort operation before beginning write if image will be\n" - " larger than N megabytes (i.e. 1024*1024*N bytes)\n" - " -m accept punctuation marks other than underscores in\n" - " names and extensions\n" - " -b bootimage create bootable ElTorito CD-ROM using 'no emulation' mode\n" - " -j generate Joliet filename records\n"; + "CDMAKE [-q] [-v] [-p] [-s N] [-m] [-b bootimage] [-j] source volume image\n" + "\n" + " source specifications of base directory containing all files to\n" + " be written to CD-ROM image\n" + " volume volume label\n" + " image image file or device\n" + " -q quiet mode - display nothing but error messages\n" + " -v verbose mode - display file information as files are\n" + " scanned and written - overrides -p option\n" + " -p show progress while writing\n" + " -s N abort operation before beginning write if image will be\n" + " larger than N megabytes (i.e. 1024*1024*N bytes)\n" + " -m accept punctuation marks other than underscores in\n" + " names and extensions\n" + " -b bootimage create bootable ElTorito CD-ROM using 'no emulation' mode\n" + " -j generate Joliet filename records\n"; /*----------------------------------------------------------------------------- Program execution starts here. @@ -1729,192 +1729,192 @@ for (i = 1; i < argc; i++) { - if (memcmp(argv[i], "-s", 2) == 0) - { - t = argv[i] + 2; - if (*t == 0) - { - if (++i < argc) - t = argv[i]; - else - error_exit("Missing size limit parameter"); - } - while (isdigit(*t)) - size_limit = size_limit * 10 + *t++ - '0'; - if (size_limit < 1 || size_limit > 800) - error_exit("Invalid size limit"); - size_limit <<= 9; // convert megabyte to sector count - } - else if (strcmp(argv[i], "-q") == 0) - q_option = TRUE; - else if (strcmp(argv[i], "-v") == 0) - v_option = TRUE; - else if (strcmp(argv[i], "-p") == 0) - show_progress = TRUE; - else if (strcmp(argv[i], "-m") == 0) - accept_punctuation_marks = TRUE; - else if (strcmp(argv[i], "-j") == 0) - joliet = TRUE; - else if (strcmp(argv[i], "-b") == 0) - { - strcpy(bootimage, argv[++i]); - eltorito = TRUE; - } - else if (i + 2 < argc) - { - strcpy(source, argv[i++]); - strncpy(volume_label, argv[i++], sizeof(volume_label) - 1); - strcpy(cd.filespecs, argv[i]); - } - else - error_exit("Missing command line argument"); - } - if (v_option) - { - show_progress = FALSE; - verbosity = VERBOSE; - } - else if (q_option) - { - verbosity = QUIET; - show_progress = FALSE; - } - if (source[0] == 0) - error_exit("Missing source directory"); - if (volume_label[0] == 0) - error_exit("Missing volume label"); - if (cd.filespecs[0] == 0) - error_exit("Missing image file specifications"); - - if (source[0] != '@') - { - /* set source[] and end_source to source directory, - * with a terminating directory separator */ - end_source = source + strlen(source); - if (end_source[-1] == ':') - *end_source++ = '.'; - if (end_source[-1] != DIR_SEPARATOR_CHAR) - *end_source++ = DIR_SEPARATOR_CHAR; - - /* scan all files and create directory structure in memory */ - make_directory_records(&root); - } - else - { - char *trimmedline, *targetname, *srcname, *eq; - char lineread[1024]; - FILE *f = fopen(source+1, "r"); - if (!f) - { - error_exit("Can't open cd description %s\n", source+1); - } - while (fgets(lineread, sizeof(lineread), f)) - { - /* We treat these characters as line endings */ - trimmedline = strtok(lineread, "\t\r\n;"); - eq = strchr(trimmedline, '='); - if (!eq) - { - char *normdir; - /* Treat this as a directory name */ - targetname = trimmedline; - normdir = strdup(targetname); - normalize_dirname(normdir); - dir_hash_create_dir(&specified_files, targetname, normdir); - free(normdir); - } - else - { - targetname = strtok(lineread, "="); - srcname = strtok(NULL, ""); + if (memcmp(argv[i], "-s", 2) == 0) + { + t = argv[i] + 2; + if (*t == 0) + { + if (++i < argc) + t = argv[i]; + else + error_exit("Missing size limit parameter"); + } + while (isdigit(*t)) + size_limit = size_limit * 10 + *t++ - '0'; + if (size_limit < 1 || size_limit > 800) + error_exit("Invalid size limit"); + size_limit <<= 9; // convert megabyte to sector count + } + else if (strcmp(argv[i], "-q") == 0) + q_option = TRUE; + else if (strcmp(argv[i], "-v") == 0) + v_option = TRUE; + else if (strcmp(argv[i], "-p") == 0) + show_progress = TRUE; + else if (strcmp(argv[i], "-m") == 0) + accept_punctuation_marks = TRUE; + else if (strcmp(argv[i], "-j") == 0) + joliet = TRUE; + else if (strcmp(argv[i], "-b") == 0) + { + strcpy(bootimage, argv[++i]); + eltorito = TRUE; + } + else if (i + 2 < argc) + { + strcpy(source, argv[i++]); + strncpy(volume_label, argv[i++], sizeof(volume_label) - 1); + strcpy(cd.filespecs, argv[i]); + } + else + error_exit("Missing command line argument"); + } + if (v_option) + { + show_progress = FALSE; + verbosity = VERBOSE; + } + else if (q_option) + { + verbosity = QUIET; + show_progress = FALSE; + } + if (source[0] == 0) + error_exit("Missing source directory"); + if (volume_label[0] == 0) + error_exit("Missing volume label"); + if (cd.filespecs[0] == 0) + error_exit("Missing image file specifications"); + + if (source[0] != '@') + { + /* set source[] and end_source to source directory, + * with a terminating directory separator */ + end_source = source + strlen(source); + if (end_source[-1] == ':') + *end_source++ = '.'; + if (end_source[-1] != DIR_SEPARATOR_CHAR) + *end_source++ = DIR_SEPARATOR_CHAR; + + /* scan all files and create directory structure in memory */ + make_directory_records(&root); + } + else + { + char *trimmedline, *targetname, *srcname, *eq; + char lineread[1024]; + FILE *f = fopen(source+1, "r"); + if (!f) + { + error_exit("Can't open cd description %s\n", source+1); + } + while (fgets(lineread, sizeof(lineread), f)) + { + /* We treat these characters as line endings */ + trimmedline = strtok(lineread, "\t\r\n;"); + eq = strchr(trimmedline, '='); + if (!eq) + { + char *normdir; + /* Treat this as a directory name */ + targetname = trimmedline; + normdir = strdup(targetname); + normalize_dirname(normdir); + dir_hash_create_dir(&specified_files, targetname, normdir); + free(normdir); + } + else + { + targetname = strtok(lineread, "="); + srcname = strtok(NULL, ""); #if _WIN32 - if (_access(srcname, R_OK) == 0) - dir_hash_add_file(&specified_files, srcname, targetname); - else - error_exit("can't access file '%s' (target %s)\n", srcname, targetname); + if (_access(srcname, R_OK) == 0) + dir_hash_add_file(&specified_files, srcname, targetname); + else + error_exit("can't access file '%s' (target %s)\n", srcname, targetname); #else - if (access(srcname, R_OK) == 0) - dir_hash_add_file(&specified_files, srcname, targetname); - else - error_exit("can't access file '%s' (target %s)\n", srcname, targetname); + if (access(srcname, R_OK) == 0) + dir_hash_add_file(&specified_files, srcname, targetname); + else + error_exit("can't access file '%s' (target %s)\n", srcname, targetname); #endif - } - } - fclose(f); - - /* scan all files and create directory structure in memory */ - scan_specified_files(&root, &specified_files.root); - } - - /* sort path table entries */ - root.next_in_path_table = sort_linked_list(root.next_in_path_table, - 1, - compare_path_table_order); - - // initialize CD-ROM write buffer - - cd.file = NULL; - cd.sector = 0; - cd.offset = 0; - cd.count = 0; - - // make non-writing pass over directory structure to obtain the proper - // sector numbers and offsets and to determine the size of the image - - number_of_files = bytes_in_files = number_of_directories = - bytes_in_directories = unused_bytes_at_ends_of_files =0; - pass(); - - if (verbosity >= NORMAL) - { - printf("%s bytes ", edit_with_commas(bytes_in_files, TRUE)); - printf("in %s files\n", edit_with_commas(number_of_files, FALSE)); - printf("%s unused bytes at ends of files\n", - edit_with_commas(unused_bytes_at_ends_of_files, TRUE)); - printf("%s bytes ", edit_with_commas(bytes_in_directories, TRUE)); - printf("in %s directories\n", - edit_with_commas(number_of_directories, FALSE)); - printf("%s other bytes\n", edit_with_commas(root.sector * SECTOR_SIZE, TRUE)); - puts("-------------"); - printf("%s total bytes\n", - edit_with_commas(total_sectors * SECTOR_SIZE, TRUE)); - puts("============="); - } - - if (size_limit != 0 && total_sectors > size_limit) - error_exit("Size limit exceeded"); - - // re-initialize CD-ROM write buffer - - cd.file = fopen(cd.filespecs, "w+b"); - if (cd.file == NULL) - error_exit("Can't open image file %s", cd.filespecs); - cd.sector = 0; - cd.offset = 0; - cd.count = 0; - - - // make writing pass over directory structure - - pass(); - - if (cd.count > 0) - flush_buffer(); - if (show_progress) - printf("\r \n"); - if (fclose(cd.file) != 0) - { - cd.file = NULL; - error_exit("File write error in image file %s", cd.filespecs); - } - - if (verbosity >= NORMAL) - puts("CD-ROM image made successfully"); - - dir_hash_destroy(&specified_files); - release_memory(); - return 0; + } + } + fclose(f); + + /* scan all files and create directory structure in memory */ + scan_specified_files(&root, &specified_files.root); + } + + /* sort path table entries */ + root.next_in_path_table = sort_linked_list(root.next_in_path_table, + 1, + compare_path_table_order); + + // initialize CD-ROM write buffer + + cd.file = NULL; + cd.sector = 0; + cd.offset = 0; + cd.count = 0; + + // make non-writing pass over directory structure to obtain the proper + // sector numbers and offsets and to determine the size of the image + + number_of_files = bytes_in_files = number_of_directories = + bytes_in_directories = unused_bytes_at_ends_of_files = 0; + pass(); + + if (verbosity >= NORMAL) + { + printf("%s bytes ", edit_with_commas(bytes_in_files, TRUE)); + printf("in %s files\n", edit_with_commas(number_of_files, FALSE)); + printf("%s unused bytes at ends of files\n", + edit_with_commas(unused_bytes_at_ends_of_files, TRUE)); + printf("%s bytes ", edit_with_commas(bytes_in_directories, TRUE)); + printf("in %s directories\n", + edit_with_commas(number_of_directories, FALSE)); + printf("%s other bytes\n", edit_with_commas(root.sector * SECTOR_SIZE, TRUE)); + puts("-------------"); + printf("%s total bytes\n", + edit_with_commas(total_sectors * SECTOR_SIZE, TRUE)); + puts("============="); + } + + if (size_limit != 0 && total_sectors > size_limit) + error_exit("Size limit exceeded"); + + // re-initialize CD-ROM write buffer + + cd.file = fopen(cd.filespecs, "w+b"); + if (cd.file == NULL) + error_exit("Can't open image file %s", cd.filespecs); + cd.sector = 0; + cd.offset = 0; + cd.count = 0; + + + // make writing pass over directory structure + + pass(); + + if (cd.count > 0) + flush_buffer(); + if (show_progress) + printf("\r \n"); + if (fclose(cd.file) != 0) + { + cd.file = NULL; + error_exit("File write error in image file %s", cd.filespecs); + } + + if (verbosity >= NORMAL) + puts("CD-ROM image made successfully"); + + dir_hash_destroy(&specified_files); + release_memory(); + return 0; } /* EOF */
9 years, 11 months
1
0
0
0
[hbelusca] 66097: Fix bootcd-regtest target. All the bootsectors (plus isoboot) should go to bootcd and bootcdregtest cds, and only isoboot should remain for the live and hybrid cds.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jan 27 00:19:02 2015 New Revision: 66097 URL:
http://svn.reactos.org/svn/reactos?rev=66097&view=rev
Log: Fix bootcd-regtest target. All the bootsectors (plus isoboot) should go to bootcd and bootcdregtest cds, and only isoboot should remain for the live and hybrid cds. Modified: trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt Modified: trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/CMak…
============================================================================== --- trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt [iso-8859-1] Tue Jan 27 00:19:02 2015 @@ -8,11 +8,11 @@ CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/isoboot.S ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin 7000) CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/isobtrt.S ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin 7000) - add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR bootcd) - add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR bootcd) - add_cd_file(TARGET fat DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat.bin FOR bootcd) - add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR bootcd) + add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR bootcd regtest) + add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR bootcd regtest) + add_cd_file(TARGET fat DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat.bin FOR bootcd regtest) + add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE ${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR bootcd regtest) add_cd_file(TARGET isoboot DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FILE ${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin FOR all hybridcd) - add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FILE ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR bootcd) + add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FILE ${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR bootcd regtest) endif()
9 years, 11 months
1
0
0
0
[cfinck] 66096: [EXPLORER] Apply the changes of r66095 for the 0.3.17-FOSDEM2015 release
by cfinck@svn.reactos.org
Author: cfinck Date: Mon Jan 26 23:03:07 2015 New Revision: 66096 URL:
http://svn.reactos.org/svn/reactos?rev=66096&view=rev
Log: [EXPLORER] Apply the changes of r66095 for the 0.3.17-FOSDEM2015 release Added: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/shell/explorer/res/logov.psd (with props) Modified: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/shell/explorer/res/logov.bmp Modified: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/shell/explorer/res/logov.bmp URL:
http://svn.reactos.org/svn/reactos/branches/ReactOS-0.3.17-FOSDEM2015/react…
============================================================================== Binary files - no diff available. Added: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/shell/explorer/res/logov.psd URL:
http://svn.reactos.org/svn/reactos/branches/ReactOS-0.3.17-FOSDEM2015/react…
============================================================================== Binary file - no diff available. Propchange: branches/ReactOS-0.3.17-FOSDEM2015/reactos/base/shell/explorer/res/logov.psd ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream
9 years, 11 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
21
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Results per page:
10
25
50
100
200