[FFmpeg-devel] [PATCH 7/9] Replace AVERROR_NOTSUPP by AVERROR(ENOSYS)

Michael Niedermayer michaelni
Thu Jul 19 18:57:38 CEST 2007


Hi

On Thu, Jul 19, 2007 at 06:42:06PM +0200, Panagiotis Issaris wrote:
> Hi
> 
> Op 19-jul-07, om 17:55 heeft Michael Niedermayer het volgende  
> geschreven:
> 
> > Hi
> >
> > On Thu, Jul 19, 2007 at 05:37:48PM +0200, Panagiotis Issaris wrote:
> >> Hi
> >>
> >> Op 19-jul-07, om 17:30 heeft Michael Niedermayer het volgende
> >> geschreven:
> >>
> >>> Hi
> >>>
> >>> On Thu, Jul 19, 2007 at 02:55:22PM +0200, Panagiotis Issaris wrote:
> >>>> The attached patch replaces all occurrances of AVERROR_NOTSUPP with
> >>>> AVERROR(ENOSYS).
> >>>
> >>> ok
> >>
> >> Applied.
> >
> > ok, also some of these AVERROR(ENOSYS) should be changed to AVERROR 
> > (ENOTSUP)
> 
> 
> According to the OpenGroup website:
> [ENOSYS] Function not supported.
> [ENOTSUP] Not supported.
> 
> It is not really clear to me where the difference lies; how would you
> interpret them?
> 
> The manpages on my GNU/Linux system explain ENOTSUP as being  
> "Operation not supported".

info libc says:
 -- Macro: int ENOSYS
     Function not implemented.  This indicates that the function called
     is not implemented at all, either in the C library itself or in the
     operating system.  When you get this error, you can be sure that
     this particular function will always fail with `ENOSYS' unless you
     install a new version of the C library or the operating system.

 -- Macro: int ENOTSUP
     Not supported.  A function returns this error when certain
     parameter values are valid, but the functionality they request is
     not available.  This can mean that the function does not implement
     a particular command or option value or flag bit at all.  For
     functions that operate on some object given in a parameter, such
     as a file descriptor or a port, it might instead mean that only
     _that specific object_ (file descriptor, port, etc.) is unable to
     support the other parameters given; different file descriptors
     might support different ranges of parameter values.

     If the entire function is not available at all in the
     implementation, it returns `ENOSYS' instead.

note, i do not know if this is GNUs, POSIXs, ISOs or whoever elses
definition

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I hate to see young programmers poisoned by the kind of thinking
Ulrich Drepper puts forward since it is simply too narrow -- Roman Shaposhnik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070719/f5131b23/attachment.pgp>



More information about the ffmpeg-devel mailing list