dpkg 1.21.11
Data Structures | Enumerations | Functions
fsys.h File Reference

(a4dfcc1ef)

#include <stdio.h>
#include <dpkg/file.h>
Include dependency graph for fsys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  file_ondisk_id
 Stores information to uniquely identify an on-disk file. More...
 
struct  fsys_namenode
 
struct  fsys_namenode_list
 
struct  fsys_namenode_queue
 Queue of fsys_namenode entries. More...
 
struct  fsys_diversion
 When we deal with an ‘overridden’ file, every package except the overriding one is considered to contain the other file instead. More...
 
struct  fsys_hash_rev_iter
 

Enumerations

enum  fsys_hash_find_flags { FHFF_NOCOPY = DPKG_BIT(0) , FHFF_NONE = DPKG_BIT(1) }
 Flags to fsys_hash_find_node(). More...
 
enum  fsys_namenode_flags {
  FNNF_NEW_CONFF = DPKG_BIT(0) , FNNF_NEW_INARCHIVE = DPKG_BIT(1) , FNNF_OLD_CONFF = DPKG_BIT(2) , FNNF_OBS_CONFF = DPKG_BIT(3) ,
  FNNF_ELIDE_OTHER_LISTS = DPKG_BIT(4) , FNNF_NO_ATOMIC_OVERWRITE = DPKG_BIT(5) , FNNF_PLACED_ON_DISK = DPKG_BIT(6) , FNNF_DEFERRED_FSYNC = DPKG_BIT(7) ,
  FNNF_DEFERRED_RENAME = DPKG_BIT(8) , FNNF_FILTERED = DPKG_BIT(9) , FNNF_RM_CONFF_ON_UPGRADE = DPKG_BIT(10)
}
 

Functions

struct fsys_node_pkgs_iterfsys_node_pkgs_iter_new (struct fsys_namenode *fnn)
 
struct pkginfofsys_node_pkgs_iter_next (struct fsys_node_pkgs_iter *iter)
 
void fsys_node_pkgs_iter_free (struct fsys_node_pkgs_iter *iter)
 
void fsys_hash_init (void)
 
void fsys_hash_reset (void)
 
void fsys_hash_report (FILE *file)
 
int fsys_hash_entries (void)
 
struct fsys_hash_iterfsys_hash_iter_new (void)
 
struct fsys_namenodefsys_hash_iter_next (struct fsys_hash_iter *iter)
 
void fsys_hash_iter_free (struct fsys_hash_iter *iter)
 
struct fsys_namenodefsys_hash_find_node (const char *filename, enum fsys_hash_find_flags flags)
 
void fsys_hash_rev_iter_init (struct fsys_hash_rev_iter *iter, struct fsys_namenode_list *files)
 
struct fsys_namenodefsys_hash_rev_iter_next (struct fsys_hash_rev_iter *iter)
 
void fsys_hash_rev_iter_abort (struct fsys_hash_rev_iter *iter)
 
const char * dpkg_fsys_set_dir (const char *dir)
 Set current on-disk filesystem root directory. More...
 
const char * dpkg_fsys_get_dir (void)
 Get current on-disk filesystem root directory. More...
 
char * dpkg_fsys_get_path (const char *pathpart)
 Get a pathname to the current on-disk filesystem root directory. More...
 

Enumeration Type Documentation

◆ fsys_hash_find_flags

Flags to fsys_hash_find_node().

Enumerator
FHFF_NOCOPY 

Do not need to copy filename.

FHFF_NONE 

The find function might return NULL.

◆ fsys_namenode_flags

Enumerator
FNNF_NEW_CONFF 

In the newconffiles list.

FNNF_NEW_INARCHIVE 

In the new filesystem archive.

FNNF_OLD_CONFF 

In the old package's conffiles list.

FNNF_OBS_CONFF 

Obsolete conffile.

FNNF_ELIDE_OTHER_LISTS 

Must remove from other packages' lists.

FNNF_NO_ATOMIC_OVERWRITE 

>= 1 instance is a dir, cannot rename over.

FNNF_PLACED_ON_DISK 

New file has been placed on the disk.

FNNF_DEFERRED_FSYNC 
FNNF_DEFERRED_RENAME 
FNNF_FILTERED 

Path being filtered.

FNNF_RM_CONFF_ON_UPGRADE 

Conffile removal requested by upgrade.

Function Documentation

◆ dpkg_fsys_get_dir()

const char * dpkg_fsys_get_dir ( void  )

Get current on-disk filesystem root directory.

This function will take care of initializing the directory if it has not been initialized before.

Returns
The current filesystem root directory.

Referenced by conffderef(), and dpkg_fsys_get_path().

Here is the caller graph for this function:

◆ dpkg_fsys_get_path()

char * dpkg_fsys_get_path ( const char *  pathpart)

Get a pathname to the current on-disk filesystem root directory.

This function returns an allocated string, which should be freed with free(2).

Parameters
pathpartThe pathpart to append to the new pathname.
Returns
The newly allocated pathname.

References dpkg_fsys_get_dir(), path_skip_slash_dotslash(), and str_fmt().

Here is the call graph for this function:

◆ dpkg_fsys_set_dir()

const char * dpkg_fsys_set_dir ( const char *  dir)

Set current on-disk filesystem root directory.

This function can be used to set the directory to a new value, or to reset it to a default value if dir is NULL.

Parameters
dirThe new filesystem root directory, or NULL to set to default.
Returns
The new filesystem root directory.

Referenced by set_instdir().

Here is the caller graph for this function:

◆ fsys_hash_entries()

int fsys_hash_entries ( void  )

◆ fsys_hash_find_node()

struct fsys_namenode * fsys_hash_find_node ( const char *  filename,
enum fsys_hash_find_flags  flags 
)

References fsys_namenode::name, and path_skip_slash_dotslash().

Referenced by pkg_conffiles_mark_old(), and tarobject().

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

◆ fsys_hash_init()

void fsys_hash_init ( void  )

References BINS.

◆ fsys_hash_iter_free()

void fsys_hash_iter_free ( struct fsys_hash_iter iter)

◆ fsys_hash_iter_new()

struct fsys_hash_iter * fsys_hash_iter_new ( void  )

References m_malloc(), fsys_hash_iter::namenode, and fsys_hash_iter::nbinn.

Here is the call graph for this function:

◆ fsys_hash_iter_next()

struct fsys_namenode * fsys_hash_iter_next ( struct fsys_hash_iter iter)

◆ fsys_hash_report()

void fsys_hash_report ( FILE *  file)

References m_malloc().

Here is the call graph for this function:

◆ fsys_hash_reset()

void fsys_hash_reset ( void  )

◆ fsys_hash_rev_iter_abort()

void fsys_hash_rev_iter_abort ( struct fsys_hash_rev_iter iter)

References fsys_hash_rev_iter_next().

Here is the call graph for this function:

◆ fsys_hash_rev_iter_init()

void fsys_hash_rev_iter_init ( struct fsys_hash_rev_iter iter,
struct fsys_namenode_list files 
)

References m_malloc(), fsys_namenode_list::namenode, fsys_namenode_list::next, and fsys_hash_rev_iter::todo.

Here is the call graph for this function:

◆ fsys_hash_rev_iter_next()

struct fsys_namenode * fsys_hash_rev_iter_next ( struct fsys_hash_rev_iter iter)

References fsys_namenode_list::namenode, fsys_namenode::next, fsys_namenode_list::next, and fsys_hash_rev_iter::todo.

Referenced by fsys_hash_rev_iter_abort().

Here is the caller graph for this function:

◆ fsys_node_pkgs_iter_free()

void fsys_node_pkgs_iter_free ( struct fsys_node_pkgs_iter iter)

Referenced by dir_is_used_by_others(), and filesavespackage().

Here is the caller graph for this function:

◆ fsys_node_pkgs_iter_new()

struct fsys_node_pkgs_iter * fsys_node_pkgs_iter_new ( struct fsys_namenode fnn)

References m_malloc(), fsys_namenode::packages, and fsys_node_pkgs_iter::pkg_node.

Referenced by dir_is_used_by_others(), and filesavespackage().

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

◆ fsys_node_pkgs_iter_next()

struct pkginfo * fsys_node_pkgs_iter_next ( struct fsys_node_pkgs_iter iter)

References pkg_list::next, pkg_list::pkg, and fsys_node_pkgs_iter::pkg_node.

Referenced by dir_is_used_by_others(), and filesavespackage().

Here is the caller graph for this function: