This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |