tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

spellfixes.patch (4661B)


      1 Author: Elimar Riesebieter <riesebie@lxtec.de>
      2 Description: fix some spell errorrs in alsactl binary.
      3 
      4 Index: alsa-utils-1.1.3/alsactl/alsactl.c
      5 ===================================================================
      6 --- alsa-utils-1.1.3.orig/alsactl/alsactl.c
      7 +++ alsa-utils-1.1.3/alsactl/alsactl.c
      8 @@ -90,7 +90,7 @@ static struct arg args[] = {
      9  { FILEARG | 'e', "pid-file", "pathname for the process id (daemon mode)" },
     10  { HEADER, NULL, "Available init options:" },
     11  { ENVARG | 'E', "env", "set environment variable for init phase (NAME=VALUE)" },
     12 -{ FILEARG | 'i', "initfile", "main configuation file for init phase" },
     13 +{ FILEARG | 'i', "initfile", "main configuration file for init phase" },
     14  { 0, NULL, "  (default " DATADIR "/init/00main)" },
     15  { 'b', "background", "run daemon in background" },
     16  { 's', "syslog", "use syslog for messages" },
     17 Index: alsa-utils-1.1.3/alsactl/init_parse.c
     18 ===================================================================
     19 --- alsa-utils-1.1.3.orig/alsactl/init_parse.c
     20 +++ alsa-utils-1.1.3/alsactl/init_parse.c
     21 @@ -939,7 +939,7 @@ static int get_key(char **line, char **k
     22  }
     23  
     24  /* extract possible KEY{attr} */
     25 -static char *get_key_attribute(struct space *space, char *str, char *res, size_t ressize)
     26 +static char *get_key_attribute(struct space *space, char *str, char *res, size_t resize)
     27  {
     28  	char *pos;
     29  	char *attr;
     30 @@ -953,7 +953,7 @@ static char *get_key_attribute(struct sp
     31  			return NULL;
     32  		}
     33  		pos[0] = '\0';
     34 -		strlcpy(res, attr, ressize);
     35 +		strlcpy(res, attr, resize);
     36  		pos[0] = '}';
     37  		dbg("attribute='%s'", res);
     38  		return res;
     39 @@ -1209,7 +1209,7 @@ found:
     40  		/* possibly truncate to format-char specified length */
     41  		if (len != -1) {
     42  			head[len] = '\0';
     43 -			dbg("truncate to %i chars, subtitution string becomes '%s'", len, head);
     44 +			dbg("truncate to %i chars, substitution string becomes '%s'", len, head);
     45  		}
     46  		strlcat(string, temp, maxsize);
     47  	}
     48 @@ -1242,7 +1242,7 @@ found:
     49  static
     50  int run_program1(struct space *space,
     51  		 const char *command0, char *result,
     52 -		 size_t ressize, size_t *reslen, int log)
     53 +		 size_t resize, size_t *reslen, int log)
     54  {
     55  	if (strncmp(command0, "__ctl_search", 12) == 0) {
     56  		const char *res = elemid_get(space, "do_search");
     57 @@ -1254,7 +1254,7 @@ int run_program1(struct space *space,
     58  		const char *res = elemid_get(space, "do_count");
     59  		if (res == NULL || strcmp(res, "0") == 0)
     60  			return EXIT_FAILURE;
     61 -		strlcpy(result, res, ressize);
     62 +		strlcpy(result, res, resize);
     63  		return EXIT_SUCCESS;
     64  	}
     65  	Perror(space, "unknown buildin command '%s'", command0);
     66 Index: alsa-utils-1.1.3/alsactl/init_utils_run.c
     67 ===================================================================
     68 --- alsa-utils-1.1.3.orig/alsactl/init_utils_run.c
     69 +++ alsa-utils-1.1.3/alsactl/init_utils_run.c
     70 @@ -24,12 +24,12 @@
     71  static
     72  int run_program1(struct space *space,
     73  	         const char *command0, char *result,
     74 -		 size_t ressize, size_t *reslen, int log);
     75 +		 size_t resize, size_t *reslen, int log);
     76  
     77  static
     78  int run_program0(struct space *space,
     79  	         const char *command0, char *result,
     80 -		 size_t ressize, size_t *reslen, int log)
     81 +		 size_t resize, size_t *reslen, int log)
     82  {
     83  	int retval = 0;
     84  	int status;
     85 @@ -175,11 +175,11 @@ int run_program0(struct space *space,
     86  
     87  					/* store result for rule processing */
     88  					if (result) {
     89 -						if (respos + count < ressize) {
     90 +						if (respos + count < resize) {
     91  							memcpy(&result[respos], inbuf, count);
     92  							respos += count;
     93  						} else {
     94 -							Perror(space, "ressize %ld too short", (long)ressize);
     95 +							Perror(space, "resize %ld too short", (long)resize);
     96  							retval = -1;
     97  						}
     98  					}
     99 @@ -239,9 +239,9 @@ int run_program0(struct space *space,
    100  
    101  static
    102  int run_program(struct space *space, const char *command0, char *result,
    103 -		size_t ressize, size_t *reslen, int log)
    104 +		size_t resize, size_t *reslen, int log)
    105  {
    106  	if (command0[0] == '_' && command0[1] == '_')
    107 -		return run_program1(space, command0, result, ressize, reslen, log);
    108 -	return run_program0(space, command0, result, ressize, reslen, log);
    109 +		return run_program1(space, command0, result, resize, reslen, log);
    110 +	return run_program0(space, command0, result, resize, reslen, log);
    111  }
    112 Index: alsa-utils-1.1.3/alsactl/state.c
    113 ===================================================================
    114 --- alsa-utils-1.1.3.orig/alsactl/state.c
    115 +++ alsa-utils-1.1.3/alsactl/state.c
    116 @@ -1160,7 +1160,7 @@ static int restore_config_value(snd_ctl_
    117  	case SND_CTL_ELEM_TYPE_IEC958:
    118  		break;
    119  	default:
    120 -		cerror(doit, "Unknow control type: %d", type);
    121 +		cerror(doit, "Unknown control type: %d", type);
    122  		return -EINVAL;
    123  	}
    124  	return 0;