NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/50653: Error in the example section



>Number:         50653
>Category:       toolchain
>Synopsis:       Error in the example section
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 13 07:40:00 +0000 2016
>Originator:     Kamil Rytarowski
>Release:        7.99.25
>Organization:
>Environment:
NetBSD compaq 7.99.25 NetBSD 7.99.25 (GENERIC) #0: Fri Dec 25 20:05:36 CET 2015  root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64
>Description:
elf_version (3) says:

EXAMPLES
     An application program would inform the ELF library about its desired
     operating version and check for an error using the following code
     snippet:

           if (elf_version(EV_CURRENT) == EV_NONE)
                   err(EXIT_FAILURE, "ELF library too old");

ERRORS
     Function elf_version() may fail with the following error:

     [ELF_E_VERSION]   An unsupported library version number was requested.


I think it should be:
           if (elf_version(EV_CURRENT) == EV_NONE)
                   errx(EXIT_FAILURE, "ELF library too old: %s", elf_errmsg(elf_errno())));
>How-To-Repeat:
N/A
>Fix:
N/A



Home | Main Index | Thread Index | Old Index