Re: [PATCH 4/8] Remove service.d directory since plugins are gone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK

On 1/14/2012 10:13 PM, Steven Dake wrote:
> Signed-off-by: Steven Dake <sdake@xxxxxxxxxx>
> ---
>  corosync.spec.in |    1 -
>  exec/coroparse.c |   64 ------------------------------------------------------
>  2 files changed, 0 insertions(+), 65 deletions(-)
> 
> diff --git a/corosync.spec.in b/corosync.spec.in
> index 58603ca..7f084f1 100644
> --- a/corosync.spec.in
> +++ b/corosync.spec.in
> @@ -156,7 +156,6 @@ fi
>  %{_bindir}/corosync-xmlproc
>  %endif
>  %dir %{_sysconfdir}/corosync
> -%dir %{_sysconfdir}/corosync/service.d
>  %dir %{_sysconfdir}/corosync/uidgid.d
>  %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
>  %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
> diff --git a/exec/coroparse.c b/exec/coroparse.c
> index a095612..bd930fc 100644
> --- a/exec/coroparse.c
> +++ b/exec/coroparse.c
> @@ -900,66 +900,6 @@ error_exit:
>  	return res;
>  }
>  
> -static int read_service_files_into_icmap(
> -	const char **error_string)
> -{
> -	FILE *fp;
> -	const char *dirname;
> -	DIR *dp;
> -	struct dirent *dirent;
> -	struct dirent *entry;
> -	char filename[PATH_MAX + FILENAME_MAX + 1];
> -	int res = 0;
> -	struct stat stat_buf;
> -	size_t len;
> -	int return_code;
> -	char key_name[ICMAP_KEYNAME_MAXLEN];
> -	struct main_cp_cb_data data;
> -
> -	dirname = COROSYSCONFDIR "/service.d";
> -	dp = opendir (dirname);
> -
> -	if (dp == NULL)
> -		return 0;
> -
> -	len = offsetof(struct dirent, d_name) + NAME_MAX + 1;
> -
> -	entry = malloc(len);
> -	if (entry == NULL) {
> -		res = 0;
> -		goto error_exit;
> -	}
> -
> -	for (return_code = readdir_r(dp, entry, &dirent);
> -		dirent != NULL && return_code == 0;
> -		return_code = readdir_r(dp, entry, &dirent)) {
> -
> -		snprintf(filename, sizeof (filename), "%s/%s", dirname, dirent->d_name);
> -		stat (filename, &stat_buf);
> -		if (S_ISREG(stat_buf.st_mode)) {
> -
> -			fp = fopen (filename, "r");
> -			if (fp == NULL) continue;
> -
> -			key_name[0] = 0;
> -
> -			res = parse_section(fp, key_name, error_string, main_config_parser_cb, &data);
> -
> -			fclose (fp);
> -
> -			if (res != 0) {
> -				goto error_exit;
> -			}
> -		}
> -	}
> -
> -error_exit:
> -	free (entry);
> -	closedir(dp);
> -
> -	return res;
> -}
> -
>  /* Read config file and load into icmap */
>  static int read_config_file_into_icmap(
>  	const char **error_string)
> @@ -997,10 +937,6 @@ static int read_config_file_into_icmap(
>  	}
>  
>  	if (res == 0) {
> -	        res = read_service_files_into_icmap(error_string);
> -	}
> -
> -	if (res == 0) {
>  		snprintf (error_reason, sizeof(error_string_response),
>  			"Successfully read main configuration file '%s'.\n", filename);
>  		*error_string = error_reason;

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux