#include <ctype.h>
#include <sys/param.h>
#include <sys/file.h>
-#include <sms.h>
+#include <moira.h>
#include "update.h"
extern CONNECTION conn;
int found_checksum;
if (!have_authorization) {
- reject_call(SMS_PERM);
+ reject_call(MR_PERM);
return(1);
}
if (done) /* re-initialize data */
code = errno;
sprintf(buf, "%s: creating file %s (get_file)",
error_message(code), pathname);
- sms_log_error(buf);
+ mr_log_error(buf);
report_error("reporting file creation error (get_file)");
return(1);
}
code = errno;
sprintf(buf, "%s: verifying free disk space for %s (get_file)",
error_message(code), pathname);
- sms_log_error(buf);
+ mr_log_error(buf);
/* do all we can to free the space */
(void) unlink(pathname);
(void) ftruncate(fd, 0);
/* validate checksum */
found_checksum = checksum_file(pathname);
if (checksum != found_checksum) {
- code = SMS_MISSINGFILE;
+ code = MR_MISSINGFILE;
com_err(whoami, code, ": expected = %d, found = %d",
checksum, found_checksum);
report_error("checksum error");
if (n_wrote == -1) {
code = errno;
sprintf(buf, "%s: writing file (get_file)", error_message(code));
- sms_log_error(buf);
+ mr_log_error(buf);
string_free(&data);
report_error("reporting write error (get_file)");
close(fd);