[Gluster-devel] mkostemp vs mkstemp?
Amar Tumballi
amarts at redhat.com
Thu Oct 18 06:21:21 UTC 2012
On 10/18/2012 10:24 AM, Emmanuel Dreyfus wrote:
> Hi
>
> mkostemp() is GNU libc specific. It is used once in glusterfs source, with flags
> that seem to do exactly what POSIX-compliant mkstemp() does.
>
> Would there be any issue that I missed with the change below?
>
> --- libglusterfs/src/statedump.c.orig 2012-10-18 06:26:52.000000000 +0200
> +++ libglusterfs/src/statedump.c 2012-10-18 06:36:27.000000000 +0200
> @@ -57,9 +57,9 @@
> gf_proc_dump_open (char *tmpname)
> {
> int dump_fd = -1;
>
> - dump_fd = mkostemp (tmpname, O_CREAT|O_EXCL|O_RDWR|O_TRUNC|O_APPEND);
> + dump_fd = mkstemp (tmpname);
> if (dump_fd < 0)
> return -1;
>
> gf_dump_fd = dump_fd;
>
Will patch http://review.gluster.org/4091 work on NetBSD?
Regards,
Amar
More information about the Gluster-devel
mailing list