[Top][All Lists]

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

hurd/trans/hello.c changes

From: Shakthi Kannan
Subject: hurd/trans/hello.c changes
Date: Wed, 23 Dec 2009 22:52:14 +0530


>From git://git.sv.gnu.org/hurd/hurd.git,

On commit 908ba8441182f34a7b565a692ebb60e8af321d17, some
clarifications on hurd/trans/hello.c:

1. version.h is located in /usr/include/hurd/version.h, so hello.c
should include?

=== PATCH ===

-#include <version.h>
+#include <hurd/version.h>

=== END ===

2. trivfs_modify_stat struct stat *st argument has changed to io_statbuf_t *st?

=== PATCH ===

-trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st)
+trivfs_modify_stat (struct trivfs_protid *cred, io_statbuf_t *st)

=== END ===

3. trivfs_S_io_seek API has changed as well. Are the following changes correct?

=== PATCH ===

 /* Change current read/write offset */
-trivfs_S_io_seek (struct trivfs_protid *cred,
+trivfs_S_io_seek (trivfs_protid_t io_object,
                  mach_port_t reply, mach_msg_type_name_t reply_type,
-                 off_t offs, int whence, off_t *new_offs)
+                 loff_t offs, int whence, loff_t *new_offs)
   struct open *op;
   error_t err = 0;
-  if (! cred)
+  if (! io_object)
     return EOPNOTSUPP;

-  op = cred->po->hook;
+  op = io_object->po->hook;
   switch (whence)

=== END ===

I am able to test the hello translator using:

  $ settrans -fgap /tmp/hello hello
  $ cat /tmp/hello
     Hello, world!

I tried printf inside translator, but, there is no console output. I
would like to know how I can get prints inside translator code to a
file or some log? Which functions need to be used for this? Appreciate
any inputs in this regard,



Shakthi Kannan

reply via email to

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