mkostemp vs mkstemp?

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

 



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;

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@xxxxxxxxxx



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux