This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-394-g7258161


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  72581615f54e7c22aef7c81ee0e85ae34ecca82d (commit)
      from  715a900c9085907fa749589bf738b192b1a2bda5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72581615f54e7c22aef7c81ee0e85ae34ecca82d

commit 72581615f54e7c22aef7c81ee0e85ae34ecca82d
Author: Pino Toscano <toscano.pino@tiscali.it>
Date:   Fri Sep 28 21:33:52 2012 +0200

    tst-mknodat: create a FIFO instead of a socket
    
    A FIFO is the only special file which is guaranteed to be created with mknod/mknodat.

diff --git a/ChangeLog b/ChangeLog
index 0f1eb18..cab5f13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-28  Pino Toscano  <toscano.pino@tiscali.it>
+
+	* io/tst-mknodat.c: Create a FIFO instead of a socket.
+
 2012-09-28  Andreas Schwab  <schwab@linux-m68k.org>
 
 	[BZ #6530]
diff --git a/io/tst-mknodat.c b/io/tst-mknodat.c
index 9158c0d..cba4dff 100644
--- a/io/tst-mknodat.c
+++ b/io/tst-mknodat.c
@@ -80,8 +80,8 @@ do_test (void)
       }
   closedir (dir);
 
-  /* Create a new directory.  */
-  int e = mknodat (dir_fd, "some-sock", 0777 | S_IFSOCK, 0);
+  /* Create a new fifo.  */
+  int e = mknodat (dir_fd, "some-fifo", 0777 | S_IFIFO, 0);
   if (e == -1)
     {
       if (errno == ENOSYS)
@@ -90,19 +90,19 @@ do_test (void)
 	  return 0;
 	}
 
-      puts ("socket creation failed");
+      puts ("fifo creation failed");
       return 1;
     }
 
   struct stat64 st1;
-  if (fstatat64 (dir_fd, "some-sock", &st1, 0) != 0)
+  if (fstatat64 (dir_fd, "some-fifo", &st1, 0) != 0)
     {
       puts ("fstat64 failed");
       return 1;
     }
-  if (!S_ISSOCK (st1.st_mode))
+  if (!S_ISFIFO (st1.st_mode))
     {
-      puts ("mknodat did not create a Unix domain socket");
+      puts ("mknodat did not create a fifo");
       return 1;
     }
 
@@ -124,15 +124,15 @@ do_test (void)
       puts ("2nd fdopendir failed");
       return 1;
     }
-  bool has_some_sock = false;
+  bool has_some_fifo = false;
   while ((d = readdir64 (dir)) != NULL)
-    if (strcmp (d->d_name, "some-sock") == 0)
+    if (strcmp (d->d_name, "some-fifo") == 0)
       {
-	has_some_sock = true;
+	has_some_fifo = true;
 #ifdef _DIRENT_HAVE_D_TYPE
-	if (d->d_type != DT_UNKNOWN && d->d_type != DT_SOCK)
+	if (d->d_type != DT_UNKNOWN && d->d_type != DT_FIFO)
 	  {
-	    puts ("d_type for some-sock wrong");
+	    puts ("d_type for some-fifo wrong");
 	    return 1;
 	  }
 #endif
@@ -144,13 +144,13 @@ do_test (void)
       }
   closedir (dir);
 
-  if (!has_some_sock)
+  if (!has_some_fifo)
     {
-      puts ("some-sock not in directory list");
+      puts ("some-fifo not in directory list");
       return 1;
     }
 
-  if (unlinkat (dir_fd, "some-sock", 0) != 0)
+  if (unlinkat (dir_fd, "some-fifo", 0) != 0)
     {
       puts ("unlinkat failed");
       return 1;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    4 ++++
 io/tst-mknodat.c |   28 ++++++++++++++--------------
 2 files changed, 18 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]