gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] mkostemp vs mkstemp?


From: Amar Tumballi
Subject: Re: [Gluster-devel] mkostemp vs mkstemp?
Date: Thu, 18 Oct 2012 11:51:21 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]