Browse Source

libdpkg: Uppercase and expand atomic_file_flags enum values

Guillem Jover 12 years ago
parent
commit
670c99fbcd
5 changed files with 8 additions and 8 deletions
  1. 2 2
      lib/dpkg/atomic-file.c
  2. 2 2
      lib/dpkg/atomic-file.h
  3. 1 1
      lib/dpkg/dump.c
  4. 1 1
      src/divertcmd.c
  5. 2 2
      src/statcmd.c

+ 2 - 2
lib/dpkg/atomic-file.c

@@ -2,7 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * atomic-file.c - atomic file helper functions
  *
- * Copyright © 2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2011-2014 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -108,7 +108,7 @@ atomic_file_remove(struct atomic_file *file)
 void
 atomic_file_commit(struct atomic_file *file)
 {
-	if (file->flags & aff_backup)
+	if (file->flags & ATOMIC_FILE_BACKUP)
 		atomic_file_backup(file);
 
 	if (rename(file->name_new, file->name))

+ 2 - 2
lib/dpkg/atomic-file.h

@@ -2,7 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * atomic-file.h - atomic file helper functions
  *
- * Copyright © 2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2011-2014 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ DPKG_BEGIN_DECLS
  */
 
 enum atomic_file_flags {
-	aff_backup		= DPKG_BIT(0),
+	ATOMIC_FILE_BACKUP	= DPKG_BIT(0),
 };
 
 struct atomic_file {

+ 1 - 1
lib/dpkg/dump.c

@@ -480,7 +480,7 @@ writedb(const char *filename, enum writedb_flags flags)
 
   which = (flags & wdb_dump_available) ? "available" : "status";
 
-  file = atomic_file_new(filename, aff_backup);
+  file = atomic_file_new(filename, ATOMIC_FILE_BACKUP);
   atomic_file_open(file);
   if (setvbuf(file->fp, writebuf, _IOFBF, sizeof(writebuf)))
     ohshite(_("unable to set buffering on %s database file"), which);

+ 1 - 1
src/divertcmd.c

@@ -361,7 +361,7 @@ divertdb_write(void)
 
 	dbname = dpkg_db_get_path(DIVERSIONSFILE);
 
-	file = atomic_file_new(dbname, aff_backup);
+	file = atomic_file_new(dbname, ATOMIC_FILE_BACKUP);
 	atomic_file_open(file);
 
 	iter = files_db_iter_new();

+ 2 - 2
src/statcmd.c

@@ -2,7 +2,7 @@
  * dpkg-statoverride - override ownership and mode of files
  *
  * Copyright © 2000, 2001 Wichert Akkerman <wakkerma@debian.org>
- * Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
+ * Copyright © 2006-2014 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -195,7 +195,7 @@ statdb_write(void)
 	struct filenamenode *file;
 
 	dbname = dpkg_db_get_path(STATOVERRIDEFILE);
-	dbfile = atomic_file_new(dbname, aff_backup);
+	dbfile = atomic_file_new(dbname, ATOMIC_FILE_BACKUP);
 	atomic_file_open(dbfile);
 
 	iter = files_db_iter_new();