bug-coreutils
[Top][All Lists]
Advanced

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

Re: Getting a file_t from a file descriptor


From: Thomas Schwinge
Subject: Re: Getting a file_t from a file descriptor
Date: Wed, 2 Aug 2006 11:49:04 +0200
User-agent: Mutt/1.5.6+20040907i

Hello!

On Thu, Jul 20, 2006 at 04:08:44PM -0700, Paul Eggert wrote:
> Thomas Schwinge <address@hidden> 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




reply via email to

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