diff options
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/add.c | 6 | ||||
-rw-r--r-- | lib/libalpm/alpm.h | 4 | ||||
-rw-r--r-- | lib/libalpm/backup.c | 14 | ||||
-rw-r--r-- | lib/libalpm/backup.h | 8 | ||||
-rw-r--r-- | lib/libalpm/be_local.c | 6 | ||||
-rw-r--r-- | lib/libalpm/be_package.c | 4 | ||||
-rw-r--r-- | lib/libalpm/remove.c | 4 |
7 files changed, 23 insertions, 23 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 3455744f..b8b1ca18 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -252,7 +252,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, if(alpm_list_find_str(handle->noupgrade, entryname)) { notouch = 1; } else { - pmbackup_t *backup; + alpm_backup_t *backup; /* go to the backup array and see if our conflict is there */ /* check newpkg first, so that adding backup files is retroactive */ backup = _alpm_needbackup(entryname, alpm_pkg_get_backup(newpkg)); @@ -303,7 +303,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, /* update the md5 hash in newpkg's backup (it will be the new orginal) */ alpm_list_t *i; for(i = alpm_pkg_get_backup(newpkg); i; i = i->next) { - pmbackup_t *backup = i->data; + alpm_backup_t *backup = i->data; char *newhash; if(!backup->name || strcmp(backup->name, entryname_orig) != 0) { continue; @@ -435,7 +435,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, /* calculate an hash if this is in newpkg's backup */ alpm_list_t *i; for(i = alpm_pkg_get_backup(newpkg); i; i = i->next) { - pmbackup_t *backup = i->data; + alpm_backup_t *backup = i->data; char *newhash; if(!backup->name || strcmp(backup->name, entryname_orig) != 0) { continue; diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 9c321d67..d8fb8349 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -161,10 +161,10 @@ typedef struct _alpm_delta_t { } alpm_delta_t; /** Local package or package file backup entry */ -typedef struct _pmbackup_t { +typedef struct _alpm_backup_t { char *name; char *hash; -} pmbackup_t; +} alpm_backup_t; /* * Logging facilities diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c index 408c0e17..0334042c 100644 --- a/lib/libalpm/backup.c +++ b/lib/libalpm/backup.c @@ -33,7 +33,7 @@ #include "util.h" /* split a backup string "file\thash" into the relevant components */ -int _alpm_split_backup(const char *string, pmbackup_t **backup) +int _alpm_split_backup(const char *string, alpm_backup_t **backup) { char *str, *ptr; @@ -58,7 +58,7 @@ int _alpm_split_backup(const char *string, pmbackup_t **backup) /* Look for a filename in a alpm_pkg_t.backup list. If we find it, * then we return the full backup entry. */ -pmbackup_t *_alpm_needbackup(const char *file, const alpm_list_t *backup_list) +alpm_backup_t *_alpm_needbackup(const char *file, const alpm_list_t *backup_list) { const alpm_list_t *lp; @@ -68,7 +68,7 @@ pmbackup_t *_alpm_needbackup(const char *file, const alpm_list_t *backup_list) /* run through the backup list and parse out the hash for our file */ for(lp = backup_list; lp; lp = lp->next) { - pmbackup_t *backup = lp->data; + alpm_backup_t *backup = lp->data; if(strcmp(file, backup->name) == 0) { return backup; @@ -78,17 +78,17 @@ pmbackup_t *_alpm_needbackup(const char *file, const alpm_list_t *backup_list) return NULL; } -void _alpm_backup_free(pmbackup_t *backup) +void _alpm_backup_free(alpm_backup_t *backup) { free(backup->name); free(backup->hash); free(backup); } -pmbackup_t *_alpm_backup_dup(const pmbackup_t *backup) +alpm_backup_t *_alpm_backup_dup(const alpm_backup_t *backup) { - pmbackup_t *newbackup; - CALLOC(newbackup, 1, sizeof(pmbackup_t), return NULL); + alpm_backup_t *newbackup; + CALLOC(newbackup, 1, sizeof(alpm_backup_t), return NULL); STRDUP(newbackup->name, backup->name, return NULL); STRDUP(newbackup->hash, backup->hash, return NULL); diff --git a/lib/libalpm/backup.h b/lib/libalpm/backup.h index be8de97a..39c01a6d 100644 --- a/lib/libalpm/backup.h +++ b/lib/libalpm/backup.h @@ -23,10 +23,10 @@ #include "alpm_list.h" #include "alpm.h" -int _alpm_split_backup(const char *string, pmbackup_t **backup); -pmbackup_t *_alpm_needbackup(const char *file, const alpm_list_t *backup_list); -void _alpm_backup_free(pmbackup_t *backup); -pmbackup_t *_alpm_backup_dup(const pmbackup_t *backup); +int _alpm_split_backup(const char *string, alpm_backup_t **backup); +alpm_backup_t *_alpm_needbackup(const char *file, const alpm_list_t *backup_list); +void _alpm_backup_free(alpm_backup_t *backup); +alpm_backup_t *_alpm_backup_dup(const alpm_backup_t *backup); #endif /* _ALPM_BACKUP_H */ diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 06a948c1..19b06bb5 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -683,8 +683,8 @@ int _alpm_local_db_read(alpm_db_t *db, alpm_pkg_t *info, pmdbinfrq_t inforeq) } } else if(strcmp(line, "%BACKUP%") == 0) { while(fgets(line, sizeof(line), fp) && strlen(_alpm_strtrim(line))) { - pmbackup_t *backup; - CALLOC(backup, 1, sizeof(pmbackup_t), goto error); + alpm_backup_t *backup; + CALLOC(backup, 1, sizeof(alpm_backup_t), goto error); if(_alpm_split_backup(line, &backup)) { goto error; } @@ -887,7 +887,7 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, pmdbinfrq_t inforeq) if(info->backup) { fprintf(fp, "%%BACKUP%%\n"); for(lp = info->backup; lp; lp = lp->next) { - pmbackup_t *backup = lp->data; + alpm_backup_t *backup = lp->data; fprintf(fp, "%s\t%s\n", backup->name, backup->hash); } fprintf(fp, "\n"); diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index a372526d..a4c6c559 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -200,8 +200,8 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t * } else if(strcmp(key, "provides") == 0) { newpkg->provides = alpm_list_add(newpkg->provides, strdup(ptr)); } else if(strcmp(key, "backup") == 0) { - pmbackup_t *backup; - CALLOC(backup, 1, sizeof(pmbackup_t), return -1); + alpm_backup_t *backup; + CALLOC(backup, 1, sizeof(alpm_backup_t), return -1); STRDUP(backup->name, ptr, return -1); newpkg->backup = alpm_list_add(newpkg->backup, backup); } else if(strcmp(key, "force") == 0) { diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 3412774b..86571a4f 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -254,7 +254,7 @@ static void unlink_file(alpm_handle_t *handle, alpm_pkg_t *info, const char *fil } } else { /* if the file needs backup and has been modified, back it up to .pacsave */ - pmbackup_t *backup = _alpm_needbackup(filename, alpm_pkg_get_backup(info)); + alpm_backup_t *backup = _alpm_needbackup(filename, alpm_pkg_get_backup(info)); if(backup) { if(nosave) { _alpm_log(handle, PM_LOG_DEBUG, "transaction is set to NOSAVE, not backing up '%s'\n", file); @@ -307,7 +307,7 @@ int _alpm_upgraderemove_package(alpm_handle_t *handle, /* old package backup list */ alpm_list_t *filelist = alpm_pkg_get_files(newpkg); for(b = alpm_pkg_get_backup(newpkg); b; b = b->next) { - const pmbackup_t *backup = b->data; + const alpm_backup_t *backup = b->data; /* safety check (fix the upgrade026 pactest) */ if(!alpm_list_find_str(filelist, backup->name)) { continue; |