[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: Getting a file_t from a file descriptor
From:       Thomas Schwinge <tschwinge () gnu ! org>
Date:       2006-08-02 9:49:04
Message-ID: 20060802094904.GB14673 () fencepost
[Download RAW message or body]

Hello!

On Thu, Jul 20, 2006 at 04:08:44PM -0700, Paul Eggert wrote:
> Thomas Schwinge <tschwinge@gnu.org> writes:
> > Please tell if you (or anyone else, of course) need access to a GNU/Hurd
> > system.
> 
> I'm afraid it's a lot to learn all at once;

That was meant to be a general offer (i.e. in case someone is interested)
and it still holds.  :-)


> I was hoping you could help with the minor porting problems.

Sure.


> --- copy.c	2006-07-05 02:08:42.000000000 -0700
> +++ /home/eggert/junk/copy.c	2006-07-20 16:06:57.000000000 -0700
> @@ -213,12 +213,17 @@ set_owner (const struct cp_options *x, c
>  static void
>  set_author (const char *dst_name, int dest_desc, const struct stat *src_sb)
>  {
> -  /* FIXME: Preserve the st_author field via the file descriptor dest_desc.  */
>  #if HAVE_STRUCT_STAT_ST_AUTHOR
>    /* Preserve the st_author field.  */
> -  file_t file = file_name_lookup (dst_name, 0, 0);
> +  file_t file = (dest_desc < 0
> +		 ? file_name_lookup (dst_name, 0, 0)
> +		 : getdport (dest_desc));

I finally got around to verify that this (which got installed in the mean
time) works.  Thanks!


Regards,
 Thomas


_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic