/* Clone the file attributes from the existing file if there is one. */
if (!stat(drift_file,&buf)) {
- chown(temp_drift_file,buf.st_uid,buf.st_gid);
+ if (chown(temp_drift_file,buf.st_uid,buf.st_gid)) {
+ LOG(LOGS_WARN, LOGF_Reference, "Could not change ownership of temporary driftfile %s.tmp", drift_file);
+ }
chmod(temp_drift_file,buf.st_mode&0777);
}
/* Clone the file attributes from the existing file if there is one. */
if (!stat(coefs_file_name,&buf)) {
- chown(temp_coefs_file_name,buf.st_uid,buf.st_gid);
+ if (chown(temp_coefs_file_name,buf.st_uid,buf.st_gid)) {
+ LOG(LOGS_WARN, LOGF_RtcLinux, "Could not change ownership of temporary RTC file %s.tmp", coefs_file_name);
+ }
chmod(temp_coefs_file_name,buf.st_mode&0777);
}