master - Remove code for using files as devices
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=15826214f94da5a447f34ae9d237f1f018d3bac3 Commit: 15826214f94da5a447f34ae9d237f1f018d3bac3 Parent: e166d2b14ca22ead559a5898cc229ecbcc261007 Author: David Teigland <[email protected]> AuthorDate: Thu Jun 21 09:33:21 2018 -0500 Committer: David Teigland <[email protected]> CommitterDate: Thu Jun 21 09:33:21 2018 -0500
Remove code for using files as devices
It appears this has not been used in a long time, and it seems to have no point since loop devices exist.
--- lib/commands/toolcontext.c | 18 --------- lib/config/config_settings.h | 2 +- lib/device/dev-cache.c | 80 +++-------------------------------------- lib/device/dev-cache.h | 2 - 4 files changed, 7 insertions(+), 95 deletions(-)
lib/commands/toolcontext.c +0 -18
@@ -1030,24 +1030,6 @@ static int _init_dev_cache(struct cmd_context *cmd) } } -if (!(cn =find_config_tree_array (cmd, devices_loopfiles_CFG,NULL ))) -return 1 ; - -for (cv = cn->v; cv; cv = cv->next) { -if (cv->type !=DM_CFG_STRING ) { -log_error ("Invalid string in config file: " -"devices/loopfiles" ); -return 0 ; - } - -if (!dev_cache_add_loopfile (cv->v.str)) { -log_error ("Failed to add loopfile %s to internal " -"device cache" , cv->v.str); -return 0 ; - } - } - -return 1 ; }
lib/config/config_settings.h +1 -1
@@ -226,7 +226,7 @@ cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING,cfg_array (devices_scan_CFG,"scan" , devices_CFG_SECTION,CFG_ADVANCED ,CFG_TYPE_STRING ,"#S/dev" ,vsn (1 ,0 ,0 ),NULL ,0 ,NULL , "Directories containing device nodes to use with LVM.\n") -cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL, 0, NULL, NULL) +cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL, vsn(3, 0, 0), NULL, NULL)cfg (devices_obtain_device_list_from_udev_CFG,"obtain_device_list_from_udev" , devices_CFG_SECTION,0 ,CFG_TYPE_BOOL ,DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV ,vsn (2 ,2 ,85 ),NULL ,0 ,NULL , "Obtain the list of available devices from udev.\n"
lib/device/dev-cache.c +6 -74
154 lines not on this page · raw message
lib/device/dev-cache.h +0 -2
@@ -51,8 +51,6 @@ void dev_cache_scan(void);int dev_cache_has_scanned (void );int dev_cache_add_dir (const char *path); -int dev_cache_add_loopfile (const char *path); -__attribute__((nonnull (1 )))struct device *dev_cache_get (struct cmd_context *cmd,const char *name,struct dev_filter *f);const char *dev_cache_filtered_reason (const char *name);