* symlink.2 clarification of ENOENT
@ 2014-10-09 11:22 Jonny Grant
[not found] ` <CAGc9EvcK9fkW+zmDvbQD00h57ZsJ6o4XX=ojM+MQ+jr46FbniA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jonny Grant @ 2014-10-09 11:22 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
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."
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-hus3n9K41k0@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: symlink.2 clarification of ENOENT
[not found] ` <CAGc9EvcK9fkW+zmDvbQD00h57ZsJ6o4XX=ojM+MQ+jr46FbniA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-04-12 7:57 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-04-12 7:57 UTC (permalink / raw)
To: Jonny Grant; +Cc: linux-man
Hello Jonny,
On 9 October 2014 at 13:22, Jonny Grant <jg-hus3n9K41k0@public.gmane.org> 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-hus3n9K41k0@public.gmane.org
--
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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-12 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09 11:22 symlink.2 clarification of ENOENT Jonny Grant
[not found] ` <CAGc9EvcK9fkW+zmDvbQD00h57ZsJ6o4XX=ojM+MQ+jr46FbniA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-12 7:57 ` Michael Kerrisk (man-pages)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.