dpkg 1.21.11
Data Structures | Enumerations | Functions
Atomic file operations
Collaboration diagram for Atomic file operations:

Data Structures

struct  atomic_file
 

Enumerations

enum  atomic_file_flags { ATOMIC_FILE_NORMAL = 0 , ATOMIC_FILE_BACKUP = DPKG_BIT(0) , ATOMIC_FILE_MKPATH = DPKG_BIT(1) }
 

Functions

struct atomic_fileatomic_file_new (const char *filename, enum atomic_file_flags flags)
 
void atomic_file_open (struct atomic_file *file)
 
void atomic_file_sync (struct atomic_file *file)
 
void atomic_file_close (struct atomic_file *file)
 
void atomic_file_commit (struct atomic_file *file)
 
void atomic_file_remove (struct atomic_file *file)
 
void atomic_file_free (struct atomic_file *file)
 

Detailed Description

Enumeration Type Documentation

◆ atomic_file_flags

Enumerator
ATOMIC_FILE_NORMAL 
ATOMIC_FILE_BACKUP 
ATOMIC_FILE_MKPATH 

Function Documentation

◆ atomic_file_close()

void atomic_file_close ( struct atomic_file file)

References _, ehflag_normaltidy, ohshite(), and pop_cleanup().

Referenced by write_filehash_except(), write_filelist_except(), and writedb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atomic_file_commit()

void atomic_file_commit ( struct atomic_file file)

References ATOMIC_FILE_BACKUP.

Referenced by write_filehash_except(), write_filelist_except(), and writedb().

Here is the caller graph for this function:

◆ atomic_file_free()

void atomic_file_free ( struct atomic_file file)

References file::name.

Referenced by write_filehash_except(), write_filelist_except(), and writedb().

Here is the caller graph for this function:

◆ atomic_file_new()

struct atomic_file * atomic_file_new ( const char *  filename,
enum atomic_file_flags  flags 
)

References ATOMIC_FILE_NEW_EXT, atomic_file::flags, m_malloc(), m_strdup(), file::name, and str_fmt().

Referenced by write_filehash_except(), write_filelist_except(), and writedb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atomic_file_open()

void atomic_file_open ( struct atomic_file file)

References _, ATOMIC_FILE_MKPATH, cu_closestream(), dir_make_path_parent(), ehflag_normaltidy, file::name, ohshite(), and push_cleanup().

Referenced by write_filehash_except(), write_filelist_except(), and writedb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atomic_file_remove()

void atomic_file_remove ( struct atomic_file file)

References _, file::name, and ohshite().

Here is the call graph for this function:

◆ atomic_file_sync()

void atomic_file_sync ( struct atomic_file file)

References _, and ohshite().

Referenced by write_filehash_except(), write_filelist_except(), and writedb().

Here is the call graph for this function:
Here is the caller graph for this function: