1. 25 Jun, 2014 1 commit
    • Robert Sprowson's avatar
      Revise filename shortening rules · fde44225
      Robert Sprowson authored
      The rules DOSFS used to create the short name version of a long filename were quite wide of the recommendations from Microsoft. This causes problems in particular with bootloaders that are a little more simplistic and use the short name form, only to find "BOOTCODE.BIN" has been replaced by "BOOTCO~1.BIN" by DOSFS.
      Also, the long filename entried created for new long filenames left the reserved fields unset. Some of these seem to have special meanings to Windows which faults them ("extended attribute handle invalid") when running chkdsk.
      DOSnaming.c: replaced the shorten_lfn function, sprinkled in a few token consts, set the reserved fields in long file names to 0
      DOSclusters.c/OpsFunc.c/OpsFile.c: remove shorttemp[14] no longer needed, simplify sprintf/memcpy/memcpy into a single sprintf
      DOSFS.h: familiar MIN/MAX maxros added
      Tested in isolation in harness "test/shorten" and comparing floppy discs generated with "test/shortgen" from Windows and DOSFS.
      Fixes ticket #313.
      Version 1.06. Tagged as 'DOSFS-1_06'
  2. 24 Jun, 2014 2 commits
    • Robert Sprowson's avatar
      Hypothetical C syntax swapped for reality · 05e22692
      Robert Sprowson authored
      Nice though it would be to be able to use logical or to test multiple characters at once, that expression simply evaluates to "TRUE" in the real world, so the substitution for underscore never worked when shortening filenames.
      The function still doesn't follow Microsoft's rules (see ticket #313) yet.
    • Robert Sprowson's avatar
      Added some doxygen comments · f7bb3d25
      Robert Sprowson authored
      Also corrected various confusions about NULL (a pointer) and the ASCII character 0.
      Reindented consistently.
      Version 1.05. Tagged as 'DOSFS-1_05'
  3. 31 May, 2014 2 commits
  4. 22 May, 2014 1 commit
  5. 15 Oct, 2013 1 commit
    • Ben Avison's avatar
      Fix divide-by-zero bug · 82a0cd80
      Ben Avison authored
        Somewhere in the process of adding FAT16/FAT32 support, a bug was
        was introduced where an attempt was made to calculate the number of
        sectors in a cluster before the cluster size (in bytes) had been
        determined. This affected invalid (e.g. blank) image files, as well as
        old 160K/320K DOS floppies that aren't supposed to contain a valid boot
        Issue raised by the Raspberry Pi NOOBS team when they failed to set up
        the DOS partition where FileCore was expecting it to be.
      Version 1.02. Tagged as 'DOSFS-1_02'
  6. 13 Jan, 2013 4 commits
    • Robert Sprowson's avatar
      Add missing message, use central allocations for DOSFS' FS number · 6d572cd3
      Robert Sprowson authored
      Missing 'Stack full' error message added (German translation needed).
      Use DOSFS FS number from headers.
      Tested with floppy disc (FAT12), 1GB image file (FAT16) and 4GB image file (FAT32) with no issues seen.
      Version 1.01. Tagged as 'DOSFS-1_01'
    • Robert Sprowson's avatar
      Allow RAM builds with messages in, fix for saving to images > 2G · 631ad37c
      Robert Sprowson authored
      RAM build include messages.
      Removed atexit() handler, in favour of finalisation-code option in CMHG file.
      Changed cluster rounding in saveFILE() to deal with extents > 2G.
      Version 1.00. Tagged as 'DOSFS-1_00'
    • Robert Sprowson's avatar
      Add some comments (!) and reindent FileSwitch interface · 6f9ea986
      Robert Sprowson authored
        DOSFS_put_bytes no longer passes an unnecessary dummy argument.
        Doxygen comments added to FileSwitch layer.
        Suggested buffer to FileSwitch is now 1x512 sector (rather than 256).
        Note - nothing seems to use the cluster buffering code in DOSFS,
      indeed nothing ever malloc()s a buffer.
        Check at line 237 of OpFind would never be true since FILE_subdir is
      not 1, fixed.
        Return an error if the handle to close is invalid.
        Doxygen comments added to FileSwitch layer.
        Doxygen comments added to FileSwitch layer.
        A failure to find a slot to set the disc title now reports "Dir full"
      not "Disc full"
        Doxygen comments added to FileSwitch layer.
      Version 0.99. Tagged as 'DOSFS-0_99'
    • Robert Sprowson's avatar
      Rationalise some defines · 41c45883
      Robert Sprowson authored
      Many magic numbers changed to exported defines.
      Eliminated unused "BOOTblock.h" (was just nesting 1 include file).
      Moved non ASCII definitions out of "ASCII.h" then found the remainder weren't used => eliminated.
      Version 0.98. Tagged as 'DOSFS-0_98'
  7. 07 Dec, 2012 2 commits
    • Robert Sprowson's avatar
      Makefile recreated from fragments · 82f8405a
      Robert Sprowson authored
      Replaced 'lk' register name with 'lr', now APCS is not set to -none.
      Inverted the sense of the conditional in CMHG file, following the more common ROM predefine use (eg. the Toolbox).
      Removed obsolete NoFAT32 obey files - the switch remains but there's little point omitting that now (since the switch actually leaves most of the code in anyway).
      Tested in IOMD ROM build (export, resources, ROM phases) mounting a DOS floppy and 1GB image file.
      Version 0.97. Tagged as 'DOSFS-0_97'
    • Robert Sprowson's avatar
      Source file subdivision · eea0d135
      Robert Sprowson authored
      The sources to DOSFS had become rather jumbled and monolithic
      * Split FileSwitch interface out into seperate ops source files.
      * Combined international error lookup with MsgTrans code.
      * Split utility functions into 'Helpers.c' along with wildcard matching functions.
      * Moved DOS naming functions into, erm, 'DOSnaming.c'.
      * Makefile tweaked to remove 'symbols' on clean.
      * Obsolete 'Help' and 'Syntax' placed in attic.
      RAM, debug, and ROM targets built. RAM target tested with a DOS floppy disc.
      Version 0.96. Tagged as 'DOSFS-0_96'
  8. 02 Sep, 2012 1 commit
    • Ben Avison's avatar
      Fixed support for certain sized DOS discs · 96a65e55
      Ben Avison authored
        In the code which determined the bitmask to apply to cluster numbers, the
        calculation of the number of clusters in the data area (which is the
        deciding factor between FAT12, FAT16 and FAT32) contained an operator
        precedence error in the calculation of the root directory size. The result
        was that if the disc size was within approx 8 MB of the FAT type threshold
        then the wrong mask was selected. (For clusters of 4*512 bytes, the FAT12/16
        threshold is about 8 MB, so discs between 8 and 16 MB would fail.)
        * Fixed the module base address and offsets registered with FileSwitch -
          previously the static data relocation offset was incorrectly applied.
          FileSwitch didn't actually care as long as they added up to the right
          address, but it was still wrong.
        * 32-bitting was incorrectly done using the No26bitCode switch rather than
          the No32bitCode switch, meaning that softloadable builds of this module
          were not 32-bit compatible. Softloadable builds now work on anything from
          RISC OS 3.5 onwards.
        Tested on Raspberry Pi and Iyonix.
      Version 0.95. Tagged as 'DOSFS-0_95'
  9. 06 Aug, 2012 1 commit
  10. 23 Jul, 2012 1 commit
  11. 21 Jul, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix null pointer dereference in findSUBDIR · bd9673f5
      Jeffrey Lee authored
        c/DOSFSops - The while() loop in findSUBDIR now bails immediately if getnextDIRentry() returns NULL. Avoids null pointer dereference when calling buildFILEname().
        Tested on Raspberry Pi with high processor vectors
      Version 0.92. Tagged as 'DOSFS-0_92'
  12. 14 Jul, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix packdir peeking and potentially poking the reset vector · 136bde25
      Jeffrey Lee authored
        c/DOSFSops - packdir() was treating its optional 'preserve' parameter as mandatory, leading to peeking (and potentially poking) of null pointers
        Tested on Raspberry Pi with high processor vectors
      Version 0.91. Tagged as 'DOSFS-0_91'
  13. 10 Jun, 2012 1 commit
    • Ben Avison's avatar
      Fixed timestamping · 0dbabf61
      Ben Avison authored
        Renamed function "localTIME" to "get_RISCOS_TIME" since it has nothing to do
        with local time. This function used to call the C library function
        localtime(), but until recently the C library was non-conformant to the
        C standard, and simply produced a year/month/day/hour/minute/second breakdown
        as UTC. When this was fixed (RISC_OSLib 5.68) it changed DOSFS's behaviour;
        it was first detected because the reverse operation is implemented locally
        within DOSFS, so a read-modify-write of file attributes leads to the
        modification time being skewed by an amount equal to the difference between
        UTC and local time. Arguments can be made either to treat the on-disc time as
        local time (for compatibility with Windows and Mac OS) or as UTC (for
        compatibility with Linux or older RISC OS systems); I have opted to return
        behaviour to UTC. Also placed a lower limit on dates of the earliest date
        supported by FAT (1980), so for example if your system clock is set to 1970,
        as it will be if there is no RTC and NetTime is not operational, then you
        don't end up creating dates in the far future due to underflow.
        Tested on a beagleboard
      Version 0.90. Tagged as 'DOSFS-0_90'
  14. 14 Apr, 2012 1 commit
  15. 13 Apr, 2012 1 commit
    • Ben Avison's avatar
      Changed *OPT 4 setting · 0a026da4
      Ben Avison authored
        DOS-formatted discs don't have a FileCore boot block, so there's nowhere
        to store the *OPT 4 setting. Up till now, it's been hard-coded to 0; this
        commit changes it to a hard-coded 2, which means that (at least in theory)
        it is now possible to construct a bootable DOS-formatted medium - like, say,
        the same SD card that contains a beagleboard ROM image.
        Verified the reported boot option using *Cat.
      Version 0.88. Tagged as 'DOSFS-0_88'
  16. 19 Jan, 2010 1 commit
    • ROOL's avatar
      Incremented version number, no other change. · ad1c94cc
      ROOL authored
      Previous changes were untagged, but incrementing the version number gives
      us a tag we can associate with the official RISC OS 5.16 release.
      Version 0.87. Tagged as 'DOSFS-0_87'
  17. 11 Jun, 2009 1 commit
    • Ben Avison's avatar
      #include file pathnames changed · 72e15bd2
      Ben Avison authored
        Uses suffixed file extensions for compatiblity with both Norcroft and GCC.
        Supplied by Peter Naulls, tested at ROOL
      Version 0.86. Not tagged
  18. 17 May, 2009 1 commit
    • Ben Avison's avatar
      Architecture-based optimisation · bc6d110a
      Ben Avison authored
        Unaligned word loads and stores have been optimised if only pre-ARMv6 or
        if only ARM6+ arachitectures need be supported.
        Builds but untested
      Version 0.86. Tagged as 'DOSFS-0_86'
  19. 19 Oct, 2007 2 commits
  20. 09 Nov, 2004 1 commit
  21. 04 Nov, 2004 1 commit
    • John Ballance's avatar
      now ensures that any long name that doesn't match the linked shortname is... · ba439592
      John Ballance authored
      now ensures that any long name that doesn't match the linked shortname is markee erased. This then copes with images where a longnamed file is deleted on shortname filing system, thus leaving several longname name entries 'hanging around'
               tested at castle.. castle added IP
      Version 0.84. Tagged as 'DOSFS-0_84'
  22. 29 Oct, 2004 1 commit
    • John Ballance's avatar
      repair DOSMap display/output prior to rom inclusion · cde23f48
      John Ballance authored
             the DOSMap command had a couple of *8 multipliers which
             thus wrongly indexed dos extent info in printout.
             long file name dosfs beta tested in the field .. appears fit
             for purpose.. Also tested at castle
             castle added IP
      Version 0.83. Tagged as 'DOSFS-0_83'
  23. 25 Oct, 2004 1 commit
  24. 07 Oct, 2004 2 commits
    • John Ballance's avatar
      more bug fixes.. · d1a10f90
      John Ballance authored
         1: loading dir could occasionally blank the first dir entry.. lfn ptr
            blanking went too far
         2: long names and short names could get out of sync if the short
            name was changed on a non long name dosfs
         castle tested
         castle added ip
      Version 0.81. Tagged as 'DOSFS-0_81'
    • John Ballance's avatar
      bugfix: first entry of a directory was occasionally overwritten · c91e9c18
      John Ballance authored
         ensure long file name pointer nulling stopped in time
         Tested at castle
         Castel IP
      Version 0.80. Tagged as 'DOSFS-0_80'
  25. 30 Sep, 2004 1 commit
    • John Ballance's avatar
      Update of DOSFS to handle Long File Names and FAT32 (up to 2GB) · 0d05b48e
      John Ballance authored
         Extend DOSFS to correctly recognise FAT32 DOS images and to
         use the Long File Name extensions. NOTE that there is still
         a 2gb size limit imposed by the max filecore image file
         size limitiations. NOTE also that as yet there is no support for
         UTF encoding of file names.
         Tested at castle and with beta testers.
         Modifications are castle and castle assigned IP (from CJB)
      Version 0.79. Tagged as 'DOSFS-0_79'
  26. 25 Jul, 2003 1 commit
  27. 26 Jun, 2003 1 commit
  28. 13 Jun, 2003 1 commit
  29. 06 Jun, 2003 1 commit
  30. 23 May, 2003 1 commit
  31. 06 Mar, 2003 1 commit
  32. 31 Jan, 2003 1 commit
    • Robert Sprowson's avatar
      Looks like Win2k is zeroing the reserved fields where the RISC OS filetype is... · 823843cd
      Robert Sprowson authored
      Looks like Win2k is zeroing the reserved fields where the RISC OS filetype is stored leading to directory viewers full of type &000 files.
      To combat this the ROS filetype is only used when the creation date is
      zero (as DOSFS always clears this when writing a file).
      Also,when a settype is performed DOSFS will zero it (this isn't a problem
      for DOSFS 0.6x because you could never have a filetype of zero anyway!)
      Version 0.72. Tagged as 'DOSFS-0_72'