RFC V3 [1/2] test-in-container

Florian Weimer fweimer@redhat.com
Tue Jun 26 13:04:00 GMT 2018


On 03/02/2018 12:05 AM, DJ Delorie wrote:
> +  sfd = open (sname, O_RDONLY);
> +  if (sfd < 0)
> +      error (EXIT_UNSUPPORTED, errno,
> +	     "unable to open %s for reading\n", sname);
> +
> +  if (stat (sname, &st) < 0)
> +      error (EXIT_UNSUPPORTED, errno,
> +	     "unable to stat %s\n", sname);

Should this be fstat64?

> +  dfd = open (dname, O_WRONLY | O_TRUNC | O_CREAT, 0600);
> +  if (dfd < 0)
> +    error (EXIT_UNSUPPORTED, errno,
> +	   "unable to open %s for writing\n", dname);

EXIT_UNSUPPORTED does not appear to be correct here.  These should be 
hard failures IMHO.

Thanks,
Florian



More information about the Libc-alpha mailing list