mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 18:27:04 +03:00
import: improve logging
This commit is contained in:
parent
90bc083bda
commit
5a3b1abd0e
@ -262,6 +262,7 @@ static int tar_import_job_on_open_disk(ImportJob *j) {
|
|||||||
safe_close(null_fd);
|
safe_close(null_fd);
|
||||||
|
|
||||||
execlp("tar", "tar", "--numeric-owner", "-C", i->temp_path, "-px", NULL);
|
execlp("tar", "tar", "--numeric-owner", "-C", i->temp_path, "-px", NULL);
|
||||||
|
log_error_errno(errno, "Failed to execute tar: %m");
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,10 +42,8 @@ static void on_tar_finished(TarImport *import, int error, void *userdata) {
|
|||||||
|
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
log_info("Operation completed successfully.");
|
log_info("Operation completed successfully.");
|
||||||
else
|
|
||||||
log_error_errno(error, "Operation failed: %m");
|
|
||||||
|
|
||||||
sd_event_exit(event, error);
|
sd_event_exit(event, EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int strip_tar_suffixes(const char *name, char **ret) {
|
static int strip_tar_suffixes(const char *name, char **ret) {
|
||||||
@ -147,7 +145,7 @@ static int pull_tar(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
log_info("Exiting.");
|
log_info("Exiting.");
|
||||||
|
|
||||||
return 0;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_raw_finished(RawImport *import, int error, void *userdata) {
|
static void on_raw_finished(RawImport *import, int error, void *userdata) {
|
||||||
@ -156,10 +154,8 @@ static void on_raw_finished(RawImport *import, int error, void *userdata) {
|
|||||||
|
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
log_info("Operation completed successfully.");
|
log_info("Operation completed successfully.");
|
||||||
else
|
|
||||||
log_error_errno(error, "Operation failed: %m");
|
|
||||||
|
|
||||||
sd_event_exit(event, error);
|
sd_event_exit(event, EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int strip_raw_suffixes(const char *p, char **ret) {
|
static int strip_raw_suffixes(const char *p, char **ret) {
|
||||||
@ -275,7 +271,7 @@ static int pull_raw(int argc, char *argv[], void *userdata) {
|
|||||||
|
|
||||||
log_info("Exiting.");
|
log_info("Exiting.");
|
||||||
|
|
||||||
return 0;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_dkr_finished(DkrImport *import, int error, void *userdata) {
|
static void on_dkr_finished(DkrImport *import, int error, void *userdata) {
|
||||||
|
Loading…
Reference in New Issue
Block a user