Skip to content

f3* should use exit codes #175

Closed

Description

@abma

currently they always exit with "0":

when read errors / writte errors happen, it should use a non-zero exit code!

https://github.com/AltraMayor/f3/blob/master/f3read.c#L442
https://github.com/AltraMayor/f3/blob/master/f3brew.c#L477

Activity

  1. changed the title [-]f3read / f3write should use exit codes[/-] [+]f3read should use exit codes[/+] on Dec 13, 2021
  2. changed the title [-]f3read should use exit codes[/-] [+]f3* should use exit codes[/+] on Dec 13, 2021
  3. AltraMayor commented on Dec 13, 2021

    @AltraMayor
    Owner

    F3 returns an error when it cannot report on the tested drive. That is, F3 does not try to interpret the output of its report.

    Although I'm suspicious of the value that these interpretations can actually add, I'm open to a pull request to add a command-line parameter to return such an error code.

  4. abma commented on Dec 13, 2021

    @abma
    Author

    F3 returns an error when it cannot report on the tested drive. That is, F3 does not try to interpret the output of its report.
    Although I'm suspicious of the value that these interpretations can actually add, I'm open to a pull request to add a command-line parameter to return such an error code.

    This allows it to be run inside a script. ATM the output has to be parsed which is error-prone. Basicly all (unix) command line tools heavily use exit codes.

    In other words: i don't care about the output, i only want to know if the data was correctly written and if it was correctly read.

  5. AltraMayor commented on Aug 24, 2026

    @AltraMayor
    Owner

    @ValdikSS implemented this feature request in pull request #282.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions