Re: symlink.2 clarification of ENOENT

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

 



Hello Jonny,

On 9 October 2014 at 13:22, Jonny Grant <jg@xxxxxxxx> wrote:
> Hi Michael
>
> http://man7.org/linux/man-pages/man2/symlink.2.html
>
> I saw that [linkpath] being the empty string "" also returns ENOENT. I
> feel worth clariying:
>
> Current text:
> "ENOENT A directory component in linkpath does not exist or is a
>               dangling symbolic link, or target is the empty string."
>
> Proposed new text:
> "ENOENT target or linkpath are empty strings. Or a directory component
> in linkpath does not exist or is a dangling symbolic link."

Thanks. Yes, POSIX actually explicitly notes that ENOENT occurs if the
second argument is an empty string. I added this point to the man
page.

Cheers,

Michael


> I tested with
>     result = symlink("", NULL);
>     printf("symlink: '' NULL: %d, %d, '%s'\n", result, errno, strerror(errno));
>
> Output:
> symlink: '' NULL: -1, 2, 'No such file or directory'
>
> --
> Jonny  jg@xxxxxxxx



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux