From: Yury Norov <ynorov@caviumnetworks.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: <libc-alpha@sourceware.org>, <zackw@panix.com>, <arnd@arndb.de>
Subject: Re: [PATCH v2] Linux: consolidate rename()
Date: Thu, 20 Oct 2016 12:53:00 -0000 [thread overview]
Message-ID: <20161020125249.GA15529@yury-N73SV> (raw)
In-Reply-To: <mvmpomvmc5i.fsf@hawking.suse.de>
On Thu, Oct 20, 2016 at 02:35:05PM +0200, Andreas Schwab wrote:
> On Okt 20 2016, Yury Norov <ynorov@caviumnetworks.com> wrote:
>
> > Hi Andreas,
> >
> > On Thu, Oct 20, 2016 at 09:10:48AM +0200, Andreas Schwab wrote:
> >> On Okt 20 2016, Yury Norov <ynorov@caviumnetworks.com> wrote:
> >>
> >> > diff --git a/sysdeps/unix/sysv/linux/rename.c b/sysdeps/unix/sysv/linux/rename.c
> >> > new file mode 100644
> >> > index 0000000..8e14d7d
> >> > --- /dev/null
> >> > +++ b/sysdeps/unix/sysv/linux/rename.c
> >>
> >> This overrides the unix/syscalls.list entry, thus architectures which
> >> implement the rename syscall no longer use it.
> >
> > Yes. You want me to notice it in commit message?
>
> Do all supported kernels implement renameat?
Ah, now I understand you. It should be then like
#include <fcntl.h>
#include <stdio.h>
/* Rename the file OLD to NEW. */
int
rename (const char *old, const char *new)
{
#ifdef __NR_rename
return INLINE_SYSCALL_CALL (rename, old, new);
#else
return renameat (AT_FDCWD, old, AT_FDCWD, new);
#endif
}
Is it OK?
next prev parent reply other threads:[~2016-10-20 12:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 0:53 Yury Norov
2016-10-20 7:11 ` Andreas Schwab
2016-10-20 11:23 ` Yury Norov
2016-10-20 12:35 ` Andreas Schwab
2016-10-20 12:53 ` Yury Norov [this message]
2016-10-20 13:16 ` Joseph Myers
2016-10-20 13:58 ` Adhemerval Zanella
2016-10-20 15:32 ` Joseph Myers
2016-10-20 16:55 ` Adhemerval Zanella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161020125249.GA15529@yury-N73SV \
--to=ynorov@caviumnetworks.com \
--cc=arnd@arndb.de \
--cc=libc-alpha@sourceware.org \
--cc=schwab@linux-m68k.org \
--cc=zackw@panix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).