AminetAminet
Search:
84869 packages online
About
Recent
Browse
Search
Upload
Setup
Services

disk/misc/DiskFlush.lha

Mirror:Random
Showing: ppc-amigaos icongeneric icon
No screenshot available
Short:Flush all filesystem buffers to disk
Author:Davide Cutugno
Uploader:davide cutugno gmail com (Davide Cutugno)
Type:disk/misc
Version:1.2
Architecture:m68k-amigaos
Date:2025-05-21
Download:disk/misc/DiskFlush.lha - View contents
Readme:disk/misc/DiskFlush.readme
Downloads:257

                      ____  _     _     _____ _           _     
                     |  _ \(_)   | |   |  ___| |         | |    
                     | | | |_ ___| | __| |__ | |_   _ ___| |__  
                     | | | | / __| |/ /|  __|| | | | / __| '_ \ 
                     | |/ /| \__ \   < | |___| | |_| \__ \ | | |
                     |___/ |_|___/_|\_\|_|   |_|\__,_|___/_| |_|
                     =============================================
                                    Version 1.2
                              (c) 2025 Davide Cutugno


INTRODUCTION
===========================================================================

DiskFlush is a utility that ensures all filesystem buffers are written to
disk. It's especially useful before performing a fast reboot to prevent any
data loss from cached writes that haven't yet been committed to disk.

When the Amiga filesystem caches data, there's always a short delay before
it actually writes that data to physical media. DiskFlush forces an immediate
write of all cached data across all mounted volumes.


REQUIREMENTS
===========================================================================

- AmigaOS 2.0 or higher


INSTALLATION
===========================================================================

Simply copy DiskFlush to a location in your path, such as:
    C:      (System commands directory)
    SYS:Tools  (Common tools directory)
    

USAGE
===========================================================================

    DiskFlush [QUIET] [VERBOSE]
    
Options:
    QUIET   - Suppresses all progress messages
    VERBOSE - Displays detailed progress information for each operation


OPERATION
===========================================================================

DiskFlush performs the following operations for each mounted volume:

1. Sends ACTION_FLUSH packet to write all dirty buffers to disk
2. Sends ACTION_INHIBIT with DOSTRUE to perform disk driver update
3. Sends ACTION_INHIBIT with DOSFALSE to release the inhibition

This ensures a complete synchronization of all cached data with physical
media across all mounted drives in your system.


RETURN CODES
===========================================================================

DiskFlush returns one of the following exit codes that can be checked
in shell scripts:

0 (RETURN_OK)   - All devices were successfully flushed
5 (RETURN_WARN) - Some devices were successfully flushed, but others failed
10 (RETURN_FAIL) - No devices could be flushed or an error occurred


EXAMPLES
===========================================================================

Standard use (shows essential messages):
    DiskFlush
    
Silent operation (suppresses all messages):
    DiskFlush QUIET
    
Verbose operation with detailed messages:
    DiskFlush VERBOSE
    
Before reboot:
    DiskFlush
    reboot


HISTORY
===========================================================================

1.2 (19.5.2025)
- Implemented dynamic memory allocation for devices names up to 32 characters
- Further reduced memory footprint for resident operation
- Ensured proper memory cleanup in all code paths
- Improved RAM disk detection using proper case-insensitive string functions
- Added compiler optimization directives for smaller code size
- Implemented static functions for better inline optimization
- Source code added to the distribution

1.1 (19.5.2025)
- Optimized for memory resident (PURE/resident)
- Reduced buffer sizes for better memory efficiency
- Improved RAM disk detection with case-insensitive matching
- Enhanced error handling for busy drives

1.0 (16.5.2025)
- First public release


LEGAL
===========================================================================

Copyright © 2025 Davide Cutugno
All Rights Reserved.

This software is provided as-is, without any express or implied warranty.
In no event will the author be held liable for any damages arising from
the use of this software.

Permission is granted to anyone to use this software for any purpose,
except commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software.
2. Altered versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any distribution.


CONTACT AND ACKNOWLEDGMENTS
===========================================================================

For bug reports, suggestions, or other communications:

    Davide Cutugno

WARNING
===========================================================================

This utility was developed with assistance from Claude AI.
AI-generated code may not be perfect and may introduce bugs.
Always review the source code before release.

Thank you for using DiskFlush!


Contents of disk/misc/DiskFlush.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                   6217    9728  63.9% -lh5- 8337 May 21 16:48 DiskFlush
[Amiga]                   2206    6458  34.2% -lh5- ed35 May 21 15:26 src/DiskFlush.c
[Amiga]                    270     500  54.0% -lh5- 90d5 May 21 14:49 src/diskflush.h
[Amiga]                     58      70  82.9% -lh5- 7e52 May 21 15:23 src/SCOPTIONS
[Amiga]                   1979    5139  38.5% -lh5- 3d4a May 21 17:35 DiskFlush.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         5 files   10730   21895  49.0%            May 21 21:57
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>