[freenos] [freenos commit] r227 - Fixed compilation under at least FreeBSD 7.2-RELEASE.

  • From: codesite-noreply@xxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Fri, 10 Jul 2009 18:33:08 +0000

Author: nieklinnenbank
Date: Fri Jul 10 11:32:07 2009
New Revision: 227

Modified:
   trunk/srv/filesystem/linn/LinnCreate.cpp

Log:
Fixed compilation under at least FreeBSD 7.2-RELEASE.
The following warning has been corrected:

 /LinnCreate.cpp:75: error: invalid conversion from 'void*' to 'time_t*'

Additionally, the '&>' has been removed from system(), as it
seemed to break on FreeBSD's default shell, possibly interpreting
'&' to fork it onto the background.



Modified: trunk/srv/filesystem/linn/LinnCreate.cpp
==============================================================================
--- trunk/srv/filesystem/linn/LinnCreate.cpp    (original)
+++ trunk/srv/filesystem/linn/LinnCreate.cpp    Fri Jul 10 11:32:07 2009
@@ -72,7 +72,7 @@
     inode->gid   = gid;
     inode->size  = ZERO;
     inode->accessTime = ZERO;
-    inode->createTime = time(NULL);
+    inode->createTime = time(ZERO);
     inode->modifyTime = inode->createTime;
     inode->changeTime = inode->createTime;
     inode->links = 1;
@@ -174,9 +174,9 @@
        /* Switch file descriptor. */
        close(*fd);
        close(tmp);
-       
+
        /* Now attempt to strip it. */
-       snprintf(buf, sizeof(buf), "strip '%s' &> /dev/null", inputFile);
+       snprintf(buf, sizeof(buf), "strip %s", inputFile);
        system(buf);
        
        /* Reopen. */
@@ -440,7 +440,7 @@
     super->inodesPerGroup   = super->inodesCount / LINN_GROUP_COUNT(super);
     super->freeInodesCount  = super->inodesCount;
     super->freeBlocksCount  = blockNum - 3;
-    super->creationTime     = time(NULL);
+    super->creationTime     = time(ZERO);
     super->mountTime            = ZERO;
     super->mountCount           = ZERO;
     super->lastCheck            = ZERO;

Other related posts:

  • » [freenos] [freenos commit] r227 - Fixed compilation under at least FreeBSD 7.2-RELEASE. - codesite-noreply