O'Reilly logo
  • Ivan Petrov thinks this is interesting:

EINVAL

The value given for origin is not one of SEEK_SET, SEEK_CUR, or SEEK_END, or the resulting file position would be negative. The fact that EINVAL represents both of these errors is unfortunate. The former is almost assuredly a compile-time programming error, whereas the latter can represent a more insidious runtime logic error.

From

Cover of Linux System Programming

Note

invalid origin value error