[freenos] r337 committed - The mount command now formats output with the new length modifier....

  • From: codesite-noreply@xxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Fri, 04 Sep 2009 13:21:13 +0000

Revision: 337
Author: nieklinnenbank
Date: Fri Sep  4 06:20:50 2009
Log: The mount command now formats output with the new length modifier.
Additionally, the command-string of the FileSystem process is
displayed, instead of just the ProcessID.

http://code.google.com/p/freenos/source/detail?r=337

Modified:
 /trunk/bin/mount/Main.cpp

=======================================
--- /trunk/bin/mount/Main.cpp   Sun Aug  2 04:36:52 2009
+++ /trunk/bin/mount/Main.cpp   Fri Sep  4 06:20:50 2009
@@ -15,22 +15,24 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */

+#include <POSIXSupport.h>
 #include <FileSystemMount.h>
-#include <Shared.h>
-#include <Types.h>
 #include <stdio.h>
 #include <stdlib.h>

 int main(int argc, char **argv)
 {
-    Shared<FileSystemMount> mounts(FILE_SYSTEM_MOUNT_KEY, MAX_MOUNTS);
+    /* Print header. */
+    printf("PATH       FILESYSTEM\r\n");

     /* Print out. */
     for (Size i = 0; i < MAX_MOUNTS; i++)
     {
         if (mounts[i]->path[0])
-            printf("%s : PID %u\r\n", mounts[i]->path,
-                                     mounts[i]->procID);
+       {
+           printf("%10s %s\r\n",
+                   mounts[i]->path, procs[mounts[i]->procID]->command);
+       }
     }
     /* Success. */
     return EXIT_SUCCESS;

Other related posts:

  • » [freenos] r337 committed - The mount command now formats output with the new length modifier.... - codesite-noreply